add order reference to white form

This commit is contained in:
Jia Sheng
2024-07-15 21:09:57 +08:00
parent cb7c38a50d
commit 8debbd4ef4
@@ -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>