Add exclude payment list in payment block list

This commit is contained in:
Afiq Hamzah
2024-12-17 10:02:58 +08:00
parent 846f56433a
commit 96fdcd2e32
+33 -1
View File
@@ -212,8 +212,35 @@ class PembiayaanService
return false;
};
$checkExcludePaymentList = function($x) {
$norujukanExcludeList = [
'011237240808-0003',
'011237240719-0015',
'011237240806-0011',
'011237240828-0001',
'011237240904-0007',
'011237240904-0008',
'011237240904-0009',
'011237240719-0023',
'011237240719-0024',
'011237240719-0025',
'011237240618-0026',
'011237240719-0027',
'011237240719-0028',
'011237240618-0020',
'011237240719-0030',
'011237240618-0029',
'011237240731-0026',
'011237240715-0027',
'011237240912-0009',
];
return in_array($x->norujukan, $norujukanExcludeList);
};
return array_map(function ($x) use ($isNorujukanPaymentRecentlyAttempted, $isNorujukanAkanDilelong, $isNorujukanIsInFasa2, $isCawanganNotPermitUjrahPayment) {
return array_map(function ($x) use ($isNorujukanPaymentRecentlyAttempted, $isNorujukanAkanDilelong, $isNorujukanIsInFasa2, $isCawanganNotPermitUjrahPayment, $checkExcludePaymentList) {
$x->disabled_payment = false;
@@ -222,6 +249,7 @@ class PembiayaanService
|| $isNorujukanIsInFasa2($x)
|| $isNorujukanPaymentRecentlyAttempted($x)
|| $isCawanganNotPermitUjrahPayment($x)
|| $checkExcludePaymentList($x)
) {
$x->disabled_payment = true;
}
@@ -231,5 +259,9 @@ class PembiayaanService
}, $pembiayaan);
}
}