bug fix in banks controller
This commit is contained in:
parent
1835fca354
commit
2535104807
|
@ -131,8 +131,11 @@ class BankController extends AbstractController
|
|||
$rows = $entityManager->getRepository(HesabdariRow::class)->findby(['bid' => $acc['bid'], 'bank' => $bank]);
|
||||
if (count($rows) > 0)
|
||||
return $this->json(['result' => 2]);
|
||||
if (!$acc['bid']->getWalletMatchBank()) {
|
||||
if ($acc['bid']->getWalletMatchBank()->getId() == $bank->getId())
|
||||
return $this->json(['result' => 3]);
|
||||
}
|
||||
|
||||
$name = $bank->getName();
|
||||
$entityManager->remove($bank);
|
||||
$log->insert('بانکداری', ' حساب بانکی با نام ' . $name . ' حذف شد. ', $this->getUser(), $acc['bid']->getId());
|
||||
|
|
Loading…
Reference in a new issue