mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fix invoice decimals bug
This commit is contained in:
@@ -174,15 +174,21 @@
|
||||
<td colspan="4"></td>
|
||||
<td class="right middle">Total</td>
|
||||
<td class="total right middle">
|
||||
@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
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user