added confirmSupplier booking

removed droptable due to database contraints issue
fixed rename booking foreight key in po table issue
added supplierstable seeder
updated supplierreport frontend
updated upload po frontend
This commit is contained in:
Jack Goh
2018-06-28 14:46:30 +08:00
parent d054703170
commit 0cf92b9936
12 changed files with 98 additions and 17 deletions
+14 -1
View File
@@ -417,7 +417,7 @@ class BookingController extends Controller
$user_po = new PurchaseOrder;
$user_po->image_path = $upload_path;
$user_po->book_id = $booking->id;
$user_po->booking_id = $booking->id;
$user_po->save();
return response()->json(['message'=>'Success'],200);
@@ -644,4 +644,17 @@ class BookingController extends Controller
return response()->json(['message'=>"Success"],200);
}
public function confirmSupplier(Request $request, $id)
{
$booking = Booking::where('id', $id)->firstOrFail();
$booking->status = 4; // processing transfer
$booking->admin_status = 5; // upload china bankslip
if($booking->save()){
return response()->json(['message'=>"Success"],200);
}
}
}