Update block payment sag lelong to 2 days before lelong

This commit is contained in:
Afiq Hamzah
2024-11-10 12:03:52 +08:00
parent 3c26cad7cc
commit d2315dfe3c
+3 -3
View File
@@ -157,11 +157,11 @@ class PembiayaanService
$getPembiayaanAkanDilelong = fn() => (new InformationController())->pembiayaanakandilelong()->getData();
$isCurrentDateGreaterThanEqual3DaysBeforeLelong = function ($x) {
$isCurrentDateGreaterThanEqual2DaysBeforeLelong = function ($x) {
$tarikhLelong = Carbon::parse($x->t_lelong);
$currentDate = Carbon::now();
if ($currentDate->gte($tarikhLelong->subDays(3))) {
if ($currentDate->gte($tarikhLelong->subDays(2))) {
return true;
}
@@ -169,7 +169,7 @@ class PembiayaanService
};
$pembiayaanAkanDilelong = array_filter($getPembiayaanAkanDilelong(), $isCurrentDateGreaterThanEqual3DaysBeforeLelong);
$pembiayaanAkanDilelong = array_filter($getPembiayaanAkanDilelong(), $isCurrentDateGreaterThanEqual2DaysBeforeLelong);
$norujukanAkanDilelong = array_map(fn($x) => $x->norujukan, $pembiayaanAkanDilelong);