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;
|
$china_bankslip = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$po = $booking->purchaseOrder()->first();
|
$po = $booking->purchaseOrder()->get();
|
||||||
$invoice = $booking->invoice()->first();
|
$invoice = $booking->invoice()->get();
|
||||||
|
|
||||||
if($booking){
|
if($booking){
|
||||||
if ($user_bankslip){
|
if ($user_bankslip){
|
||||||
@@ -338,11 +338,17 @@ class BookingController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($po){
|
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){
|
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;
|
$booking->service_charge = 0;
|
||||||
|
|||||||
@@ -21,10 +21,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-row :gutter="12" type="flex">
|
<el-row :gutter="12" type="flex">
|
||||||
<el-col :span="12" align="center">
|
<el-col :span="12" align="center">
|
||||||
<a target="_blank" :href="getURL(booking_details.user_po_path)">
|
<div v-for="po in booking_details.user_po_path" :key='po'>
|
||||||
<img v-if="isImage(booking_details.user_po_path)" v-bind:src="booking_details.user_po_path" class="image">
|
<a target="_blank" :href="getURL(po)">
|
||||||
<p v-else>Download</p>
|
<img v-if="isImage(po)" v-bind:src="po" class="image">
|
||||||
</a>
|
<p v-else>Download</p>
|
||||||
|
<br/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -57,10 +60,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-row :gutter="12" type="flex">
|
<el-row :gutter="12" type="flex">
|
||||||
<el-col :span="12" align="center">
|
<el-col :span="12" align="center">
|
||||||
<a target="_blank" :href="getURL(booking_details.invoice_path)">
|
<div v-for="invoice in booking_details.invoice_path" :key='invoice'>
|
||||||
<img v-if="isImage(booking_details.invoice_path)" v-bind:src="booking_details.invoice_path" class="image">
|
<a target="_blank" :href="getURL(invoice)">
|
||||||
<p v-else>Download</p>
|
<img v-if="isImage(invoice)" v-bind:src="invoice" class="image">
|
||||||
</a>
|
<p v-else>Download</p>
|
||||||
|
<br/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -20,14 +20,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
@@ -56,14 +48,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user