add table kaedah bayaran dalam oeprasi dan acc
This commit is contained in:
@@ -316,13 +316,26 @@ class PembidaController extends Controller
|
||||
$listwinner[$index1]['jenisbayaran']['kaedah_bayaran'] = ($detailspayment) ? $detailspayment['status_payment_opt'] : 0;
|
||||
|
||||
}
|
||||
|
||||
$sum = 0;
|
||||
$kaedah = Payment::where('kodcaw',$request->kodcaw)
|
||||
->where('status', '=', 2)
|
||||
->where('lelong_id', $request->lelong_id)
|
||||
->select('payment.status_payment_opt', 'payment.total_payment')
|
||||
// ->groupBy('payment.status_payment_opt')
|
||||
->get();
|
||||
$kaedah_cdm = $kaedah->where('status_payment_opt', 3)->sum('total_payment');
|
||||
$kaedah_fpx = $kaedah->where('status_payment_opt', 2)->sum('total_payment');
|
||||
$kaedah_tunai = $kaedah->where('status_payment_opt', 1)->sum('total_payment');
|
||||
|
||||
$bilcdm = $kaedah->where('status_payment_opt', 3)->count('norujukan');
|
||||
$bilfpx = $kaedah->where('status_payment_opt', 2)->count('norujukan');
|
||||
$biltunai = $kaedah->where('status_payment_opt', 1)->count('norujukan');
|
||||
|
||||
$kodcaw = $request->kodcaw;
|
||||
$lelong_id = $request->lelong_id;
|
||||
$payment_id = $request->payment_id;
|
||||
// dd($kodcaw);
|
||||
return view('pembida.pembayaranbidaan',compact('listwinner','lelong_id', 'getkodcaw', 'kodcaw'));
|
||||
return view('pembida.pembayaranbidaan',compact('bilcdm','bilfpx','biltunai','kaedah_cdm','kaedah_fpx','kaedah_tunai','listwinner','lelong_id', 'getkodcaw', 'kodcaw'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user