fix skit2

This commit is contained in:
Hafifie PKB
2024-10-11 01:01:36 +08:00
parent 0303bc7628
commit 30343d0d65
3 changed files with 17 additions and 111 deletions
+7 -6
View File
@@ -1820,8 +1820,9 @@ class TebusController extends Controller
'kodcaw' => $request->kodcaw,
]);
$calculation_keuntungan_sebenar = $this->untungrugicalculationLejer($request->kodcaw,$request_dibina);
$upah_diterima = $calculation_keuntungan_sebenar->getContent();
// $calculation_keuntungan_sebenar = $this->untungrugicalculationLejer($request->kodcaw,$request_dibina);
// $upah_diterima = $calculation_keuntungan_sebenar->getContent();
$upah_diterima = $total;
$calculation = $totaltunggakan_sebelum - $upah_diterima;
$accrual_net = $totaltunggakan_now - $calculation;
@@ -1837,20 +1838,20 @@ class TebusController extends Controller
$akrunet->setConnection($cawangan['mysql']);
$akrunet->tahun = $current->year;
$akrunet->bulan = $tarikh->month;
$akrunet->jumlah = ($accrual_net - $total);
$akrunet->jumlah = ($accrual_net);
$akrunet->save();
}else{
if($available_akru[0]['jumlah'] !== ($accrual_net - $total))
if($available_akru[0]['jumlah'] !== ($accrual_net))
{
AkruNet::on($cawangan['mysql'])->where('bulan','=',(int)$month_sekarang)->where('tahun',$current->year)
->update(['jumlah' => ($accrual_net - $total)]);
->update(['jumlah' => ($accrual_net)]);
}
}
}
//dd($jumlahakru,$accrual_net,$total);
$total_accrual_net = $jumlahakru + ($accrual_net - $total);
$total_accrual_net = $jumlahakru + ($accrual_net);
}else{