fix disabled after payment
This commit is contained in:
@@ -144,8 +144,8 @@ class PembiayaanService
|
||||
{
|
||||
$getRecentlyAttemptPayment = function () use ($norujukanList) {
|
||||
return Http::pool(function (Pool $pool) use ($norujukanList) {
|
||||
foreach ($norujukanList as $norujukan) {
|
||||
$pool->get(config('api.url') . '/portal/searchsagonline/', ['norujukan' => $norujukan]);
|
||||
foreach ($norujukanList as $list) {
|
||||
$pool->get(($list['tag_syarikat'] == CompanyStatus::COM_PKB ? config('api.url') : config('api.url_koop')) . '/portal/searchsagonline/', ['norujukan' => $list['norujukan']]);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -167,7 +167,10 @@ class PembiayaanService
|
||||
|
||||
private function checkPembiayaanPaymentDisabled($pembiayaan)
|
||||
{
|
||||
$norujukanList = array_map(fn($x) => $x->norujukan, $pembiayaan);
|
||||
$norujukanList = array_map(fn($x) => [
|
||||
'tag_syarikat' => $x->tag_syarikat,
|
||||
'norujukan' => $x->norujukan,
|
||||
], $pembiayaan);
|
||||
|
||||
$norujukanRecentlyAttemptPayment = $this->getNorujukanRecentlyAttemptPayment($norujukanList);
|
||||
|
||||
@@ -205,6 +208,7 @@ class PembiayaanService
|
||||
$kodCawanganBranchesNotPermitPaymentUjrah = array_map(fn($x) => $x['kodcaw'], $branchesNotPermitPaymentUjrah);
|
||||
|
||||
$isNorujukanPaymentRecentlyAttempted = function ($x) use ($norujukanRecentlyAttemptPayment) {
|
||||
$norujukanRecentlyAttemptPayment = array_column($norujukanRecentlyAttemptPayment, 'norujukan');
|
||||
return in_array($x->norujukan, $norujukanRecentlyAttemptPayment);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user