mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
multiple po and invoice fix
This commit is contained in:
@@ -320,8 +320,8 @@ class BookingController extends Controller
|
||||
$china_bankslip = null;
|
||||
}
|
||||
|
||||
$po = $booking->purchaseOrder()->first();
|
||||
$invoice = $booking->invoice()->first();
|
||||
$po = $booking->purchaseOrder()->get();
|
||||
$invoice = $booking->invoice()->get();
|
||||
|
||||
if($booking){
|
||||
if ($user_bankslip){
|
||||
@@ -338,11 +338,17 @@ 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;
|
||||
|
||||
@@ -21,10 +21,13 @@
|
||||
</div>
|
||||
<el-row :gutter="12" type="flex">
|
||||
<el-col :span="12" align="center">
|
||||
<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 v-for="po in booking_details.user_po_path" :key='po'>
|
||||
<a target="_blank" :href="getURL(po)">
|
||||
<img v-if="isImage(po)" v-bind:src="po" class="image">
|
||||
<p v-else>Download</p>
|
||||
<br/>
|
||||
</a>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -57,10 +60,13 @@
|
||||
</div>
|
||||
<el-row :gutter="12" type="flex">
|
||||
<el-col :span="12" align="center">
|
||||
<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 v-for="invoice in booking_details.invoice_path" :key='invoice'>
|
||||
<a target="_blank" :href="getURL(invoice)">
|
||||
<img v-if="isImage(invoice)" v-bind:src="invoice" class="image">
|
||||
<p v-else>Download</p>
|
||||
<br/>
|
||||
</a>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
@@ -20,14 +20,6 @@
|
||||
</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">
|
||||
@@ -56,14 +48,6 @@
|
||||
</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