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;
|
||||
|
||||
Reference in New Issue
Block a user