mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
removed vee-validate which causes cief bank details not showing in user upload bank slip
added exception if userbankslip not save show error added tax rate to supplier booking added order number and payment for to booking seeder
This commit is contained in:
@@ -417,19 +417,26 @@ class BookingController extends Controller
|
||||
'user_bankslip', $bankslip_file, $unique_image_path
|
||||
);
|
||||
|
||||
$user_bankslip = $booking->userBankSlip()->first();
|
||||
if($upload_path){
|
||||
$user_bankslip = $booking->userBankSlip()->first();
|
||||
|
||||
// if user bankslip not exist, create new one
|
||||
if(!$user_bankslip){
|
||||
$user_bankslip = new UserBankSlip;
|
||||
// if user bankslip not exist, create new one
|
||||
if(!$user_bankslip){
|
||||
$user_bankslip = new UserBankSlip;
|
||||
}
|
||||
$user_bankslip->booking_id = $booking->id;
|
||||
$user_bankslip->bankslip_path = $upload_path;
|
||||
$user_bankslip->transfer_amount = $request->input('transfer_amount');
|
||||
$user_bankslip->save();
|
||||
|
||||
|
||||
return response()->json(['message'=>"Success"],200);
|
||||
}
|
||||
else{
|
||||
return response()->json(['message' => 'File not uploaded. Please contact support'], 400);
|
||||
}
|
||||
$user_bankslip->booking_id = $booking->id;
|
||||
$user_bankslip->bankslip_path = $upload_path;
|
||||
$user_bankslip->transfer_amount = $request->input('transfer_amount');
|
||||
$user_bankslip->save();
|
||||
|
||||
|
||||
return response()->json(['message'=>"Success"],200);
|
||||
}
|
||||
else {
|
||||
return response()->json(['message' => 'No file detected'], 400);
|
||||
|
||||
Reference in New Issue
Block a user