debug invoice pdf

This commit is contained in:
Omair Saleh
2023-08-10 15:44:29 +08:00
parent 45d7e50e08
commit e966c49426
+2 -1
View File
@@ -134,11 +134,12 @@
$expectedTotal = bcadd(bcadd(bcadd($subtotal, $transaction->service_charge, 5), $transaction->tax, 5), $voucherDiscount, 5);
$discrepancy = bcsub($displayedTotal, $expectedTotal, 5);
$total = bcadd(bcadd(bcadd($subtotal, $transaction->service_charge, 5), $transaction->tax, 5), $voucherDiscount, 5); // Keep precision
$displayedTotal = (((float) number_format($subtotal, 2)) + ((float) number_format($transaction->service_charge, 2)) + ((float) number_format($voucherDiscount, 2)) + ((float) number_format($transaction->tax, 2)))
@endphp
<tr>
<td colspan="4"></td>
<td class="right middle">Adjustment</td>
<td class="right middle">{{ number_format(($total - (((float) number_format($subtotal, 2)) + ((float) number_format($transaction->service_charge, 2)) + ((float) number_format($voucherDiscount, 2)) + ((float) number_format($transaction->tax, 2)))), 2) }}</td>
<td class="right middle">{{ ($total - $displayedTotal) }}</td>
</tr>
<tr>
<td colspan="4"></td>