debug invoice pdf

This commit is contained in:
Omair Saleh
2023-08-10 14:30:30 +08:00
parent 4ac98cdd97
commit 0e6b1a4b44
+6 -5
View File
@@ -74,6 +74,7 @@
@php
$subtotal = 0;
@endphp
@foreach ($po_order_transaction->transactionDetails as $key => $transaction_detail)
@php
$exactUnitPrice = bcdiv($transaction_detail->price, $transaction->currency_rate, 5); // Retain precision with 5 decimals
@@ -95,10 +96,14 @@
@endforeach
</tbody>
<tfoot>
@php
$voucherDiscount = getVoucherDiscount($voucher_redemption);
$subtotalWithDiscount = bcsub($subtotal, $voucherDiscount, 5); // Use bcsub to subtract
@endphp
<tr class="subtotal">
<td colspan="4"></td>
<td class="right middle">Subtotal</td>
<td class="right middle">{{ number_format($subtotal, 2) }}</td>
<td class="right middle">{{ number_format($subtotalWithDiscount, 2) }}</td>
</tr>
<tr class="billingcharges">
<td colspan="4"></td>
@@ -106,10 +111,6 @@
<td class="right">{{ number_format($transaction->service_charge, 2) }}</td>
</tr>
@php
$voucherDiscount = getVoucherDiscount($voucher_redemption);
@endphp
@if($voucher_redemption)
<tr class="voucher">
<td colspan="4"></td>