fix last keuntungan_rebet

This commit is contained in:
MUHD HAFIFIE
2021-04-22 14:36:57 +08:00
parent 045b984a08
commit e4bb2b1fb6
2 changed files with 33 additions and 5 deletions
-5
View File
@@ -736,9 +736,6 @@ class TebusController extends Controller
$dateSM = new Carbon('2021-04-21');
$dateSM->addDays(1);
$dateRM = new Carbon('2021-04-22');
$dateRM->addDays(1);
$current = Carbon::now();
$current = new Carbon();
@@ -754,12 +751,10 @@ class TebusController extends Controller
->join($cawangan['db_name'].'.gadai as db2','transaksi_keuntungan.norujukan','=','db2.norujukan')
// ->where('transaksi_keuntungan.tarikh_bayaran' ,'>=', $datetawarruq)
->where('transaksi_keuntungan.tarikh_bayaran' ,'<=', $daterequest)
->where('transaksi_keuntungan.tarikh_bayaran' ,'>=', $dateRM)
->whereYear('tarikh_bayaran','=',$current->year)
->whereNotNull('db2.hargajualan')
->sum('keuntungan_rebet');
$total = $keuntungan + $keuntunganreducing;
return response($total);