mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
fix bug with updating booking status to complete uppon invoice approval
This commit is contained in:
@@ -315,7 +315,8 @@ class InvoiceController extends Controller
|
||||
// Change Status to 7 if approve
|
||||
// Add email event here
|
||||
if ($validatedData['status'] === 'approve') {
|
||||
$booking = Booking::find($id);
|
||||
|
||||
$booking = Booking::findOrFail($id);
|
||||
$booking->status = 7;
|
||||
$booking->admin_status = 7;
|
||||
$booking->save();
|
||||
@@ -323,6 +324,8 @@ class InvoiceController extends Controller
|
||||
if(!$booking) {
|
||||
return response()->json(['message' => 'Unable to Complete Booking. Please Approve Again'], 500);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Response
|
||||
|
||||
Reference in New Issue
Block a user