add imbang duga api and lejeram api and fix round down
This commit is contained in:
@@ -3120,11 +3120,11 @@ class AdminPageController extends Controller
|
||||
$year = $current->year;
|
||||
$month = $tarikh->month;
|
||||
|
||||
$test = Gadai::on($cawangan['mysql'])
|
||||
->whereBetween('tempoh',[0.5,1])
|
||||
->where('sttebus','<>','')
|
||||
->whereYear('t_gadai',$current->year())
|
||||
->pluck('norujukan');
|
||||
// $test = Gadai::on($cawangan['mysql'])
|
||||
// ->whereBetween('tempoh',[0.5,1])
|
||||
// ->where('sttebus','<>','')
|
||||
// ->whereYear('t_gadai',$current->year())
|
||||
// ->pluck('norujukan');
|
||||
|
||||
$get_norujukan = Gadai::on($cawangan['mysql'])
|
||||
->selectRaw("norujukan,CASE WHEN (YEAR(t_gadai) = YEAR(t_update) and MONTH(t_gadai) = MONTH(t_update)) THEN '1' ELSE '0' END AS result")
|
||||
@@ -3143,6 +3143,7 @@ class AdminPageController extends Controller
|
||||
})
|
||||
->whereIn('trans.norujukan',$get_norujukan)
|
||||
->where('transaction.trans_type','T')
|
||||
->where('onepercent','=',0)
|
||||
->sum('keuntungan_rebet');
|
||||
|
||||
$sum_keun_ansuran = Transaction::on('mysql7')
|
||||
@@ -3153,6 +3154,7 @@ class AdminPageController extends Controller
|
||||
})
|
||||
->whereIn('trans.norujukan',$get_norujukan)
|
||||
->where('transaction.trans_type','A')
|
||||
->where('onepercent','=',0)
|
||||
->sum('bayaran_keuntungan');
|
||||
|
||||
$total = $sum_keun_tebus + $sum_keun_ansuran;
|
||||
|
||||
Reference in New Issue
Block a user