mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
updated supplier booking controller
This commit is contained in:
@@ -133,35 +133,11 @@ class BookingSupplierController extends Controller
|
||||
}
|
||||
|
||||
|
||||
public function supplierbookingreport(Request $request, $id)
|
||||
public function report(Request $request, $id)
|
||||
{
|
||||
$bookingsupplier = BookingSupplier::where("admin_id", Auth::user()->id)->where('id', $id)->first();
|
||||
if (!$bookingsupplier)
|
||||
{
|
||||
return response()->json(['message'=>'Access denied'], 200);
|
||||
}
|
||||
$supplier_booking = Booking::firstOrFail($id)->supplierBooking()->firstOrFail();
|
||||
|
||||
// //get customer booking id, date,amount, rate, total, gst, rebate, bank in amount, beneficiary account number, bank slip.
|
||||
// return BookingSupplier::find($id);
|
||||
|
||||
// //display report
|
||||
// $bookingsupplier = BookingSupplier::with (['supplier_bookings' => function($query){
|
||||
// $query -> select ('book_id','date','transfer_amount','rate','rebate', 'amountInRMB', 'rmbBankAmount');
|
||||
// }])->get();
|
||||
|
||||
// //get uploaded customer booking bank slip
|
||||
// $userbankslip = UserBankSlip::with (['user_bank_slips' => function($query){
|
||||
// $query -> select ('book_id','bankslip_url');
|
||||
// }])->get();
|
||||
|
||||
// //get active beneficiary account
|
||||
// $beneficiary = SettingBeneficiary::with (['setting_beneficiaries' => function($query){
|
||||
// $query -> select ('bank_name','acc_no');
|
||||
// }])->get();
|
||||
|
||||
$supplier_booking = $booking->supplierBooking()->first();
|
||||
$user_bankslip = $booking->userBankSlip()->first();
|
||||
|
||||
return response()->json($supplier_booking ,200);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user