我想根据值设置使用条件打印某些条款和条件。
例如,有10条"条款和条件"付款。默认费率为" rate1"但如果" rate2"选择,条件3和4应该改为别的。
如果" rate1"然后设置,
1. This is condition for both (1 or 2)
2. This is condition for both (1 or 2)
3. This is condition for rate 1
4. This is condition for rate 1
.
.
.
9. This is condition for both (1 or 2)
10. This is condition for both (1 or 2)
如果" rate2"然后设置,
1. This is condition for both (1 or 2)
2. This is condition for both (1 or 2)
3. This is condition for rate 2
4. This is condition for rate 2
.
.
.
9. This is condition for both (1 or 2)
10. This is condition for both (1 or 2)
条款和条件是"静态",不存储在对象中。
我的RML是这样的:
<tr>
<td><para>1</para></td>
<td><para>This is condition for both (1 or 2)</para></td>
</tr>
<tr>
<td><para>2</para></td>
<td><para>This is condition for both (1 or 2)</para></td>
</tr>
<tr>
<td><para>3</para></td>
<td><para>This is condition for rate 1</para></td>
</tr>
我有什么方法可以使用&#34; condition&#34;在第3行。
提前谢谢你。
答案 0 :(得分:0)
我不确定它是否在RML中具有“if else conditions”。
但在我的情况下,我设法解决如下问题,对我这样的人有帮助。
[[ r.rate2 != '']]
[['3. Condition for Rate 2 '']]
[[ r.rate1 != '']]
[['3. Condition for Rate 1 '']]
OR
[[(r.rate1 == 0 and ' ') or '3. Condition for Rate 1']]
[[(r.rate2 == 0 and ' ') or '3. Condition for Rate 2']]
这似乎不是一个好方法,但解决了问题。
如果找到更好的方式,将永远受到赞赏。