bug fix in bank account remove

This commit is contained in:
Hesabix 2024-12-06 15:28:16 +00:00
parent 2535104807
commit e8f6c05159

View file

@ -131,7 +131,7 @@ class BankController extends AbstractController
$rows = $entityManager->getRepository(HesabdariRow::class)->findby(['bid' => $acc['bid'], 'bank' => $bank]); $rows = $entityManager->getRepository(HesabdariRow::class)->findby(['bid' => $acc['bid'], 'bank' => $bank]);
if (count($rows) > 0) if (count($rows) > 0)
return $this->json(['result' => 2]); return $this->json(['result' => 2]);
if (!$acc['bid']->getWalletMatchBank()) { if ($acc['bid']->getWalletMatchBank()) {
if ($acc['bid']->getWalletMatchBank()->getId() == $bank->getId()) if ($acc['bid']->getWalletMatchBank()->getId() == $bank->getId())
return $this->json(['result' => 3]); return $this->json(['result' => 3]);
} }