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:
@@ -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')) {
|
||||
|
||||
Reference in New Issue
Block a user