From be3111400c8030cc88e5fbfecf8ff46475d970a9 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Mon, 3 Jul 2023 10:06:09 +0800 Subject: [PATCH] fix generate invoice --- resources/views/pages/pdfs/invoice.blade.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/views/pages/pdfs/invoice.blade.php b/resources/views/pages/pdfs/invoice.blade.php index 77bad44a..5851909f 100644 --- a/resources/views/pages/pdfs/invoice.blade.php +++ b/resources/views/pages/pdfs/invoice.blade.php @@ -175,7 +175,10 @@ Total @if($transaction->booking()->first()->fix_currency_id !== 1) - {{ number_format( number_format($subtotal, 2) + $transaction->service_charge + $transaction->tax + $voucher_discount, 2) }} + @php + $rounded_subtotal = number_format($subtotal, 2); + @endphp + {{ number_format($rounded_subtotal + $transaction->service_charge + $transaction->tax + $voucher_discount, 2) }} @else {{ number_format($transaction->amount + $transaction->service_charge + $transaction->tax + $voucher_discount, 2) }} @endif