mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-25 15:34:02 +00:00
customer support interface
This commit is contained in:
@@ -51,53 +51,111 @@
|
||||
</section>
|
||||
@endif
|
||||
@if($booking)
|
||||
@php
|
||||
$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
|
||||
<section>
|
||||
<section id="booking">
|
||||
<h3>Booking</h3>
|
||||
<p>Booking Details: <span id="customer-booking-details"></span></p>
|
||||
<p>Booking Status: <span id="customer-booking-status"></span></p>
|
||||
</section>
|
||||
<section id="payment">
|
||||
<h3>Payment</h3>
|
||||
<p>Payment Details: <span id="customer-payment-details"></span></p>
|
||||
<p>Payment Status: <span id="customer-payment-status"></span></p>
|
||||
<p>Bank Transaction Mapping: <span id="customer-payment-mapping"></span></p>
|
||||
</section>
|
||||
<section id="transfer-proof">
|
||||
<h3>Transfer Proof</h3>
|
||||
<p>Transfer Details: <span id="customer-transfer-details"></span></p>
|
||||
<p>Transfer Status: <span id="customer-transfer-status"></span></p>
|
||||
</section>
|
||||
<section id="purchase-order">
|
||||
<h3>Purchase Order</h3>
|
||||
<p>Order Details: <span id="customer-order-details"></span></p>
|
||||
<p>Order Status: <span id="customer-order-status"></span></p>
|
||||
</section>
|
||||
<section id="invoice">
|
||||
<h3>Invoice</h3>
|
||||
<p>Invoice Details: <span id="customer-invoice-details"></span></p>
|
||||
<p>Invoice Status: <span id="customer-invoice-status"></span></p>
|
||||
</section>
|
||||
<section id="bank-slip">
|
||||
<h3>Bank Slip</h3>
|
||||
<p>Bank Slip Details: <span id="customer-bank-slip-details"></span></p>
|
||||
<p>Bank Slip Status: <span id="customer-bank-slip-status"></span></p>
|
||||
</section>
|
||||
<section id="bank-account">
|
||||
<h3>Bank Account</h3>
|
||||
<p>Bank Account Details: <span id="customer-bank-account-details"></span></p>
|
||||
<p>Bank Account Status: <span id="customer-bank-account-status"></span></p>
|
||||
</section>
|
||||
<section id="refund">
|
||||
<h3>Refund</h3>
|
||||
<p>Refund Details: <span id="customer-refund-details"></span></p>
|
||||
<p>Refund Status: <span id="customer-refund-status"></span></p>
|
||||
</section>
|
||||
<section id="supplier">
|
||||
<h3>Supplier</h3>
|
||||
<p>Supplier Details: <span id="customer-supplier-details"></span></p>
|
||||
<p>Supplier Status: <span id="customer-supplier-status"></span></p>
|
||||
<h3>Booking Reference: {{$booking->marking}}</h3>
|
||||
<p>Amount: <span>{{$booking->fix_amount.' '.$booking->fixedCurrency->short_code}}</span></p>
|
||||
<p>Status: <span>{{$booking->status === 3 ? 'Complete' : 'In Progress'}}</span></p>
|
||||
<p>Purchase Order Status: <span>{{$purchaseOrder ? ($purchaseOrder->status === 3 ? 'Approved' : ($purchaseOrder->status === 1 ? 'Pending Approval' : 'Incomplete Submission')) : 'Pending Submission'}}</span></p>
|
||||
@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';
|
||||
$transferProof = $bill->documents()->first();
|
||||
}
|
||||
|
||||
if($bill->status === 1) {
|
||||
$status = 'Pending Transfer Proof';
|
||||
}
|
||||
|
||||
if(in_array($bill->status, [2, 3])) {
|
||||
$status = 'Transfer Complete';
|
||||
$transferProof = $bill->documents()->first();
|
||||
}
|
||||
|
||||
@endphp
|
||||
<p>Amount: <span>{{$payment->original_amount.' '.$payment->originalCurrency->short_code}}</span></p>
|
||||
<p>Status: <span>{{$status}}</span></p>
|
||||
<p>Payment Date: <span>{{$payment->created_at->format('d-m-Y')}}</span></p>
|
||||
@if($bill)
|
||||
<p>Supplier: <span>{{$bill->issuer->name}}</span></p>
|
||||
<p>Supplier Order Date: <span>{{$bill->created_at->format('d-m-Y')}}</span></p>
|
||||
@if($transferProof)<p>Transfer Proof Upload Date: <span>{{$transferProof->created_at->format('d-m-Y')}}</span></p>@endif
|
||||
@endif
|
||||
@endforeach
|
||||
</section>
|
||||
@endif
|
||||
@if(!$booking)
|
||||
@php
|
||||
$bookings = $company->bookings->whereIn('status', [2, 3])->get();
|
||||
@endphp
|
||||
<section>
|
||||
@foreach($bookings as $booking)
|
||||
@php
|
||||
$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
|
||||
<section>
|
||||
<h3>Booking Reference: {{$booking->marking}}</h3>
|
||||
<p>Amount: <span>{{$booking->fix_amount.' '.$booking->fixedCurrency->short_code}}</span></p>
|
||||
<p>Status: <span>{{$booking->status === 3 ? 'Complete' : 'In Progress'}}</span></p>
|
||||
<p>Purchase Order Status: <span>{{$purchaseOrder ? ($purchaseOrder->status === 3 ? 'Approved' : ($purchaseOrder->status === 1 ? 'Pending Approval' : 'Incomplete Submission')) : 'Pending Submission'}}</span></p>
|
||||
@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';
|
||||
$transferProof = $bill->documents()->first();
|
||||
}
|
||||
|
||||
if($bill->status === 1) {
|
||||
$status = 'Pending Transfer Proof';
|
||||
}
|
||||
|
||||
if(in_array($bill->status, [2, 3])) {
|
||||
$status = 'Transfer Complete';
|
||||
$transferProof = $bill->documents()->first();
|
||||
}
|
||||
|
||||
@endphp
|
||||
<p>Amount: <span>{{$payment->original_amount.' '.$payment->originalCurrency->short_code}}</span></p>
|
||||
<p>Status: <span>{{$status}}</span></p>
|
||||
<p>Payment Date: <span>{{$payment->created_at->format('d-m-Y')}}</span></p>
|
||||
@if($bill)
|
||||
<p>Supplier: <span>{{$bill->issuer->name}}</span></p>
|
||||
<p>Supplier Order Date: <span>{{$bill->created_at->format('d-m-Y')}}</span></p>
|
||||
@if($transferProof)<p>Transfer Proof Upload Date: <span>{{$transferProof->created_at->format('d-m-Y')}}</span></p>@endif
|
||||
@endif
|
||||
@endforeach
|
||||
</section>
|
||||
@endforeach
|
||||
</section>
|
||||
@endif
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user