diff --git a/app/Services/PembiayaanService.php b/app/Services/PembiayaanService.php index c7a141c..d434697 100644 --- a/app/Services/PembiayaanService.php +++ b/app/Services/PembiayaanService.php @@ -272,7 +272,15 @@ class PembiayaanService return in_array($x->norujukan, $norujukanExcludeList); }; - return array_map(function ($x) use ($isNorujukanPaymentRecentlyAttempted, $isNorujukanAkanDilelong, $isNorujukanIsInFasa2, $isCawanganNotPermitUjrahPayment, $checkExcludePaymentList) { + $isCawanganVersion2 = function ($x){ + + if($x->tag_syarikat == 1 && $x->kodcaw != 'KB1'){ + return true; + } + return false; + }; + + return array_map(function ($x) use ($isNorujukanPaymentRecentlyAttempted, $isNorujukanAkanDilelong, $isNorujukanIsInFasa2, $isCawanganNotPermitUjrahPayment, $checkExcludePaymentList,$isCawanganVersion2) { $x->disabled_payment = false; @@ -282,6 +290,7 @@ class PembiayaanService || $isNorujukanPaymentRecentlyAttempted($x) || $isCawanganNotPermitUjrahPayment($x) || $checkExcludePaymentList($x) + || $isCawanganVersion2($x) ) { $x->disabled_payment = true; }