Merge branch '1688-order-reference' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0

This commit is contained in:
edmondlang
2024-07-15 23:13:21 +08:00
@@ -36,13 +36,27 @@
<td>Bank in Details</td>
</tr>
@foreach($transactions as $transaction)
@php
$attributes = $transaction->owner->owner->modelAttributes()->where('name', 'ORDER_REFERENCE_NO')->pluck('value')->toArray();
$order_reference_no = implode(', ', $attributes);
@endphp
<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>
<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}}
@if ($order_reference_no)
<br>Order Reference No: {{ $order_reference_no }}
@endif
</td>
</tr>
@endforeach
</tbody>