diff --git a/resources/views/pages/pdfs/invoice.blade.php b/resources/views/pages/pdfs/invoice.blade.php
index 92e42b83..d6b2383d 100644
--- a/resources/views/pages/pdfs/invoice.blade.php
+++ b/resources/views/pages/pdfs/invoice.blade.php
@@ -174,15 +174,21 @@
|
Total |
+ @php
+ $service_charge = (float)number_format($transaction->service_charge, 2,'.','');
+ $tax = (float)number_format($transaction->tax, 2,'.','');
+ $rounded_voucher = (float)number_format($voucher_discount, 2,'.','');
+ @endphp
@if($transaction->booking()->first()->fix_currency_id !== 1)
@php
- $service_charge = (float)number_format($transaction->service_charge, 2,'.','');
- $tax = (float)number_format($transaction->tax, 2,'.','');
- $rounded_voucher = (float)number_format($voucher_discount, 2,'.','');
+ $rounded_subtotal = (float)number_format($subtotal, 2,'.','');
@endphp
- {{ number_format($subtotal + $service_charge + $tax + $rounded_voucher, 2) }}
+ {{ number_format($rounded_subtotal + $service_charge + $tax + $rounded_voucher, 2) }}
@else
- {{ number_format($transaction->amount + $transaction->service_charge + $transaction->tax + $voucher_discount, 2) }}
+ @php
+ $rounded_transaction_amount = (float)number_format($transaction->amount, 2,'.','');
+ @endphp
+ {{ number_format($rounded_transaction_amount + $service_charge + $tax + $rounded_voucher, 2) }}
@endif
|