initial commit

This commit is contained in:
Aqqil Azman
2024-05-13 09:58:28 +08:00
parent 77df383a74
commit 97a8e34f3d
3 changed files with 128 additions and 0 deletions
@@ -0,0 +1,77 @@
<table style="margin-bottom: 25px; border: none;">
<tbody>
<tr>
<td>{{$supplier->name}}</td>
<td>{{\Carbon\Carbon::now('Asia/Singapore')->format('d-m-Y h:s')}}</td>
</tr>
</tbody>
</table>
<br>
<table style="width:100%">
<tbody>
<tr>
<td>Reference</td>
<td>Marking</td>
<td>Rate</td>
<td>Amount</td>
<td>Bank in Details</td>
</tr>
@foreach($transactions as $transaction)
<tr style="margin-bottom: 10px;">
<td>{{$transaction->owner->owner->marking}}</td>
<td>{{$transaction->owner->owner->company->reference}}</td>
<td>{{$transaction->currency_rate}}</td>
<td>{{$transaction->currency->short_code}} {{number_format((float)$transaction->amount, 2, '.', '')}}</td>
<td>Account Holder Name: {{$transaction->owner->owner->bank->holder_name}}<br>{{$transaction->owner->owner->bank->bank_name}}: {{$transaction->owner->owner->bank->account_no}}
<br>Branch: {{$transaction->owner->owner->bank->bank_branch}}@if($transaction->original_currency->short_code === 'USD')<br>Swift Code: {{$transaction->owner->owner->bank->swift}}@endif<br>Bank in Amount: {{$transaction->original_currency->short_code}} {{$transaction->original_amount}}</td>
</tr>
@endforeach
</tbody>
</table>
<table style="margin-bottom: 25px; border: none;">
<tbody>
<tr>
<td width="70%" style="text-align: right;">Sub total booking amount: </td>
@php
$sub_total_booking_amount = number_format((float)$transactions->sum('original_amount'), 2, '.', '');
@endphp
<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>{{$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>{{$transaction->original_currency->short_code}} {{$total_booking_amount}}</td>
</tr>
<tr>
<td width="70%" style="text-align: right;">Sub total amount: </td>
@php
$sub_total_amount = number_format((float)$transactions->sum('amount') + ($transfer_fee * 1/$transactions[0]->currency_rate), 2, '.', '');
@endphp
<td>MYR {{$sub_total_amount}}</td>
</tr>
<tr>
<td width="70%" style="text-align: right;">Service charge: </td>
@php
$service_charge = number_format((float)$transactions->sum('service_charge'), 2, '.', '');
@endphp
<td>MYR {{$service_charge}}</td>
</tr>
<tr>
<td width="70%" style="text-align: right;">Total amount: </td>
@php
$total_amount = number_format((float)$sub_total_amount + $service_charge, 2, '.', '');
@endphp
<td>MYR {{$total_amount}}</td>
</tr>
</tbody>
</table>