Update block payment sag lelong to 2 days before lelong
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user