FIX_Percentage issues fixed : ps

This commit is contained in:
VE10-Sanjeev 2024-06-12 09:23:09 +00:00
parent 6ab498149c
commit 435b7d862f

View File

@ -303,7 +303,12 @@
<td colspan="5" align="right">Subtotal : &nbsp;&nbsp;<?= number_format($value->subtotal, 2, '.', ',') ?></td>
</tr>
<tr>
<td colspan="5" align="right">Discount : &nbsp;&nbsp;<?= $value->discount ? "(-)" . number_format($value->discount, 2, '.', ',') : number_format(0, 2, '.', ',') ?></td>
<?php if($value->dis_type == "%"){
$dis_value = ($value->subtotal * $value->discount) / 100;
}else{
$dis_value = $value->discount ? $value->discount : 0;
} ?>
<td colspan="5" align="right">Discount : &nbsp;&nbsp;<?= $dis_value ? "(-)" ."". number_format($dis_value, 2, '.', ',') : "".number_format(0, 2, '.', ',') ?></td>
</tr>
<!-- -->