bug fix final in remote docs
This commit is contained in:
parent
8704f6b4f4
commit
e9f2a14a27
|
@ -281,7 +281,7 @@ class DirectHesabdariDoc extends AbstractController
|
|||
}
|
||||
|
||||
#[Route('/api/hesabdari/direct/doc/delete/{id}', name: 'delete_hesabdari_doc_delete')]
|
||||
public function delete(Log $log, Access $access, int $id, EntityManagerInterface $entityManager): JsonResponse
|
||||
public function delete(\App\Service\Log $logservice, Access $access, int $id, EntityManagerInterface $entityManager): JsonResponse
|
||||
{
|
||||
$acc = $access->hasRole('accounting');
|
||||
if (!$acc) {
|
||||
|
@ -306,7 +306,7 @@ class DirectHesabdariDoc extends AbstractController
|
|||
}
|
||||
$entityManager->remove($hesabdariDoc);
|
||||
$entityManager->flush();
|
||||
$log->insert('حسابداری', 'حذف سند حسابداری شماره ' . $hesabdariDoc->getCode(), $this->getUser(), $acc['bid'], $hesabdariDoc);
|
||||
$logservice->insert('حسابداری', 'حذف سند حسابداری شماره ' . $hesabdariDoc->getCode(), $this->getUser(), $acc['bid'], null);
|
||||
return new JsonResponse(['success' => true, 'message' => 'سند با موفقیت حذف شد'], 200);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue