mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-29 17:24:14 +00:00
fixed retrive po path in booking controller
updated chinabankslip error message to be more clear fixed supplier booking report loading button updated upload invoice frontend to show user po image
This commit is contained in:
@@ -441,7 +441,11 @@ class BookingController extends Controller
|
||||
$booking = Booking::where('id',$id)->first();
|
||||
$user_po = $booking->purchaseOrder()->first();
|
||||
|
||||
return response()->json(['po_path'=> $user_po],200);
|
||||
if($user_po){
|
||||
return response()->json(['user_po_path'=> $user_po->image_path ],200);
|
||||
}
|
||||
|
||||
return response()->json(['message'=> 'waiting customer to upload their po'],400);
|
||||
}
|
||||
|
||||
public function delete(Booking $book_id)
|
||||
@@ -593,7 +597,7 @@ class BookingController extends Controller
|
||||
//upload
|
||||
public function uploadInvoice(Request $request, $id)
|
||||
{
|
||||
$booking = Booking::where('user_id',Auth::user()->id)->where('id',$id)->first();
|
||||
$booking = Booking::where('id',$id)->first();
|
||||
|
||||
/* Validation */
|
||||
if (!$booking)
|
||||
|
||||
@@ -131,4 +131,6 @@ class BookingSupplierController extends Controller
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class ChinaBankSlipController extends Controller
|
||||
|
||||
// TODO: first or fail
|
||||
if(!$china_bankslip){
|
||||
return response()->json(["message"=> "not found"],400);
|
||||
return response()->json(["message"=> "China bankslip not found. Please upload first."],400);
|
||||
}
|
||||
|
||||
$china_bankslip->actual_transfer_amount = $request->input('actual_transfer_amount');
|
||||
|
||||
Reference in New Issue
Block a user