|
@@ -48,8 +48,8 @@
|
|
|
<div class="col-4 p-0">
|
|
|
<table class="table table-sm table-bordered">
|
|
|
<tr><th></th><th>本期金额</th><th>截止本期金额</th></tr>
|
|
|
- <tr id="tp_set"><td>材料价差费用</td><td><%= material.m_tp !== null ? ctx.helper.round(material.m_tp, 2) : null %></td><td><%= material.m_tp !== null ? ctx.helper.round(ctx.helper.add(material.pre_tp, material.m_tp), 2) : null %></td></tr>
|
|
|
- <tr id="rate_set"><td>材料价差费用(含税)</td><td><%= material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), 2) : null %></td><td><%= material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(ctx.helper.add(material.pre_tp, material.m_tp), 1+material.rate/100), 2) : null %></td></tr>
|
|
|
+ <tr id="tp_set"><td>材料价差费用</td><td><%= material.m_tp !== null ? ctx.helper.round(material.m_tp, 2) : null %></td><td><%= material.m_tp !== null && material.pre_tp !== null ? ctx.helper.round(ctx.helper.add(material.pre_tp, material.m_tp), 2) : null %></td></tr>
|
|
|
+ <tr id="rate_set"><td>材料价差费用(含税)</td><td><%= material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), 2) : null %></td><td><%= material.m_tp !== null && pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), 2)), 2) : null %></td></tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -78,5 +78,6 @@
|
|
|
const materialID = <%- material.id %>;
|
|
|
let m_tp = <%= material.m_tp !== null ? material.m_tp : 0 %>;
|
|
|
const pre_tp = <%= material.pre_tp !== null ? material.pre_tp : 0 %>;
|
|
|
+ const pre_tp_hs = <%= pre_tp_hs !== null ? pre_tp_hs : 0 %>;
|
|
|
const calcBase = JSON.parse('<%- JSON.stringify(calcBase) %>');
|
|
|
</script>
|