mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-22 05:44:13 +00:00
multiple po and invoice fix
This commit is contained in:
@@ -246,7 +246,7 @@ class BookingController extends Controller
|
||||
$user_bankslip = $booking->userBankSlip()->first();
|
||||
$china_bankslip = $booking->chinaBankSlip()->get();
|
||||
|
||||
$po = $booking->purchaseOrder()->first();
|
||||
$po = $booking->purchaseOrder()->get();
|
||||
$invoice = $booking->invoice()->first();
|
||||
|
||||
if ($user_bankslip){
|
||||
@@ -268,12 +268,19 @@ class BookingController extends Controller
|
||||
}
|
||||
|
||||
if($po){
|
||||
$booking->user_po_path = Storage::url($po->image_path);
|
||||
for($index = 0;$index < count($po); $index++){
|
||||
$po[$index] = Storage::url($po[$index]->image_path);
|
||||
}
|
||||
$booking->user_po_path = $po;
|
||||
}
|
||||
|
||||
if($invoice){
|
||||
$booking->invoice_path = Storage::url($invoice->invoice_path);
|
||||
for($index = 0;$index < count($invoice); $index++){
|
||||
$invoice[$index] = Storage::url($invoice[$index]->invoice_path);
|
||||
}
|
||||
$booking->invoice_path = $invoice;
|
||||
}
|
||||
|
||||
$booking->service_charge = 0;
|
||||
if($booking){
|
||||
if ($booking->amount < 10000 && ($booking->term === 'x2_cash' || $booking->term === 'x2_cheque' || $booking->term === 'x2_ba')) {
|
||||
|
||||
@@ -12,13 +12,22 @@
|
||||
<div class="card">
|
||||
<div class="card-header">Purchase Order</div>
|
||||
<div class="row">
|
||||
<div class="card-body">
|
||||
<a target="_blank" :href="getURL(booking_details.user_po_path)">
|
||||
<img v-if="isImage(booking_details.user_po_path)" v-bind:src="booking_details.user_po_path" class="image">
|
||||
<div v-for="user_po_path in booking_details.user_po_path" :key='cn_bankslip'>
|
||||
<a target="_blank" :href="getURL(cn_bankslip)">
|
||||
<img v-if="isImage(user_po_path)" v-bind:src="user_po_path" class="image">
|
||||
<p v-else>Download</p>
|
||||
<br/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="row">-->
|
||||
<!--<div class="card-body">-->
|
||||
<!--<a target="_blank" :href="getURL(booking_details.user_po_path)">-->
|
||||
<!--<img v-if="isImage(booking_details.user_po_path)" v-bind:src="booking_details.user_po_path" class="image">-->
|
||||
<!--<p v-else>Download</p>-->
|
||||
<!--</a>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
@@ -39,13 +48,22 @@
|
||||
<div class="card">
|
||||
<div class="card-header">Invoice</div>
|
||||
<div class="row">
|
||||
<div class="card-body">
|
||||
<a target="_blank" :href="getURL(booking_details.invoice_path)">
|
||||
<img v-if="isImage(booking_details.invoice_path)" v-bind:src="booking_details.invoice_path" class="image">
|
||||
<div v-for="invoice_path in booking_details.invoice_path" :key='cn_bankslip'>
|
||||
<a target="_blank" :href="getURL(cn_bankslip)">
|
||||
<img v-if="isImage(invoice_path)" v-bind:src="invoice_path" class="image">
|
||||
<p v-else>Download</p>
|
||||
<br/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="row">-->
|
||||
<!--<div class="card-body"> -->
|
||||
<!--<a target="_blank" :href="getURL(booking_details.invoice_path)">-->
|
||||
<!--<img v-if="isImage(booking_details.invoice_path)" v-bind:src="booking_details.invoice_path" class="image">-->
|
||||
<!--<p v-else>Download</p>-->
|
||||
<!--</a>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user