diff --git a/resources/views/pages/customer_support.blade.php b/resources/views/pages/customer_support.blade.php index 6989a226..4769aae8 100644 --- a/resources/views/pages/customer_support.blade.php +++ b/resources/views/pages/customer_support.blade.php @@ -61,49 +61,7 @@ $payments = $booking->transactions()->where('type', \App\Classes\ValueObjects\Constants\TransactionType::PAYMENT)->get(); $purchaseOrder = $booking->transactions()->where('type', \App\Classes\ValueObjects\Constants\TransactionType::PURCHASE_ORDER)->first(); @endphp -
-

Booking Reference: {{$booking->marking}}

-

Amount: {{$booking->fix_amount.' '.$booking->fixedCurrency->short_code}}

-

Status: {{$booking->status === 3 ? 'Complete' : 'In Progress'}}

-

Purchase Order Status: {{$purchaseOrder ? ($purchaseOrder->status === 3 ? 'Approved' : ($purchaseOrder->status === 1 ? 'Pending Approval' : 'Incomplete Submission')) : 'Pending Submission'}}

- @foreach($payments as $payment) - @php - $bill = $payment->transactions()->where('type', \App\Classes\ValueObjects\Constants\TransactionType::BILL)->first(); - $transferProof = null; - $status = 'Pending Submission'; - if($payment->status === 1) { - $status = 'Pending Approval'; - } - - if($payment->status === 2) { - $status = 'Pending Confirmation'; - } - - if(in_array($payment->status, [4, 5])) { - $status = 'Rejected/Failed Payment'; - } - - if($bill->status === 1) { - $status = 'Pending Transfer Proof'; - } - - if(in_array($bill->status, [2, 3])) { - $status = 'Transfer Complete'; - $transferProof = $bill->documents()->first(); - } - - @endphp -

Amount: {{$payment->original_amount.' '.$payment->originalCurrency->short_code}}

-

Status: {{$status}}

-

Payment Date: {{$payment->created_at->format('d-m-Y')}}

- @if($bill) -

Supplier: {{$bill->issuer->name}}

-

Supplier Order Date: {{$bill->created_at->format('d-m-Y')}}

- @if($transferProof)

Transfer Proof Upload Date: {{$transferProof->created_at->format('d-m-Y')}}

@endif - @endif - @endforeach -
@endforeach @endif