mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-24 15:04:19 +00:00
customer support interface
This commit is contained in:
@@ -51,12 +51,111 @@
|
||||
</section>
|
||||
@if(!$booking)
|
||||
@php
|
||||
$bookings = $company->bookings->whereIn('status', [2, 3])->get();
|
||||
$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';
|
||||
}
|
||||
|
||||
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
|
||||
@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>--}}
|
||||
{{-- <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';--}}
|
||||
{{-- }--}}
|
||||
|
||||
{{-- 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--}}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user