remove hardcoded rmb, use dynamic value

This commit is contained in:
Omair Saleh
2022-09-30 06:08:58 +08:00
parent 52bebef842
commit c1330111ca
2 changed files with 7 additions and 7 deletions
@@ -80,9 +80,9 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping, Sho
$transactionTypes[$transaction->type],
$transaction->issuerCompany->name,
$transaction->reciver,
$transaction->currency_id === 1 ? 'MYR' : 'RMB',
$transaction->currency->short_code,
$transaction->amount,
$transaction->original_currency_id === 1 ? 'MYR' : 'RMB',
$transaction->original_currency->short_code,
$transaction->original_amount,
$transaction->currency_rate,
$transaction->tax,
@@ -93,4 +93,4 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping, Sho
$marking
];
}
}
}
@@ -54,21 +54,21 @@
@php
$sub_total_booking_amount = number_format((float)$transactions->sum('original_amount'), 2, '.', '');
@endphp
<td>RMB {{$sub_total_booking_amount}}</td>
<td>{{$transaction->original_currency->short_code}} {{$sub_total_booking_amount}}</td>
</tr>
<tr>
<td width="70%" style="text-align: right;">Transfer fee: </td>
@php
$transfer_fee = number_format((float)$transferFeeTransactions->sum('service_charge'), 2, '.', '');
@endphp
<td>RMB {{$transfer_fee}}</td>
<td>{{$transaction->original_currency->short_code}} {{$transfer_fee}}</td>
</tr>
<tr>
<td width="70%" style="text-align: right;">Total booking amount: </td>
@php
$total_booking_amount = number_format((float) ($transactions->sum('original_amount') + $transfer_fee), 2, '.', '');
@endphp
<td>RMB {{$total_booking_amount}}</td>
<td>{{$transaction->original_currency->short_code}} {{$total_booking_amount}}</td>
</tr>
<tr>
<td width="70%" style="text-align: right;">Sub total amount: </td>
@@ -100,4 +100,4 @@
</tr>
</table>
</htmlpagefooter>
@endsection
@endsection