Commit c61b0821 by wd

小数位数运算修复

parent 4782b896
......@@ -62,7 +62,7 @@
<?php $totalsArr = array_column($totalsArr,null,'code'); ?>
<tr class="col-<?php echo count($totalsArr); ?>">
<td class="label">Row Tatol</td>
<td><span><span class="price">$<?php if (isset($totalsArr['discount'])){echo sprintf("%01.3f",round(intval($totalsArr['subtotal']['value'])+intval($totalsArr['discount']['value']),2));}else{echo intval($totalsArr['subtotal']['value']);} ?></span></span> </td>
<td><span><span class="price">$<?php if (isset($totalsArr['discount'])){echo sprintf("%01.2f",round(floatval($totalsArr['subtotal']['value'])+floatval($totalsArr['discount']['value']),2));}else{echo sprintf("%01.2f",intval($totalsArr['subtotal']['value']));} ?></span></span> </td>
</tr>
</tbody>
<?php endif; ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment