fix bug with updating booking status to complete uppon invoice approval

This commit is contained in:
omair saleh
2020-09-23 14:56:53 +08:00
parent 56282add06
commit 0680e99524
+4 -1
View File
@@ -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