bug fix in delete accounting docs
This commit is contained in:
parent
d189709a45
commit
dba2506c4c
|
@ -8,6 +8,7 @@ use App\Entity\Commodity;
|
|||
use App\Entity\HesabdariDoc;
|
||||
use App\Entity\HesabdariRow;
|
||||
use App\Entity\HesabdariTable;
|
||||
use App\Entity\Log as EntityLog;
|
||||
use App\Entity\Money;
|
||||
use App\Entity\PayInfoTemp;
|
||||
use App\Entity\Person;
|
||||
|
@ -449,6 +450,14 @@ class HesabdariController extends AbstractController
|
|||
$log->insert('حسابداری','سند حسابداری شماره ' . $relatedDoc->getCode() . ' حذف شد.',$this->getUser(),$request->headers->get('activeBid'));
|
||||
}
|
||||
}
|
||||
|
||||
//delete logs from documents
|
||||
$logs = $entityManager->getRepository(EntityLog::class)->findBy(['doc'=>$doc]);
|
||||
foreach($logs as $item){
|
||||
$item->setDoc(null);
|
||||
$entityManager->persist($item);
|
||||
$entityManager->flush();
|
||||
}
|
||||
$entityManager->remove($doc);
|
||||
$entityManager->flush();
|
||||
$log->insert('حسابداری','سند حسابداری شماره ' . $doc->getCode() . ' حذف شد.',$this->getUser(),$request->headers->get('activeBid'));
|
||||
|
|
|
@ -127,6 +127,26 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="py-3 py-sm-5 px-md-7">
|
||||
<div class="block block-rounded block-transparent bg-body">
|
||||
<div class="block-content block-content-full">
|
||||
<div class="row justify-content-sm-between align-items-center p-md-3">
|
||||
<div class="col-sm-6">
|
||||
<h4 class="mb-2">راه اندازی حسابیکس در کسب و کار شما</h4>
|
||||
<p class="text-muted mb-sm-0">
|
||||
حسابیکس بسیار انعطاف پذیر و برای مدیریت اکثر کسب و کارها کارآمد است.برای آموزش راه اندازی اولیه کسب و کار خود در حسابیکس کافی است با ما تماس بگیرید .
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-6 text-sm-end">
|
||||
<a class="btn btn-primary px-4 py-2 mt-1" href="{{path('general_contact')}}">تماس با ما<i class="fa fa-fw fa-arrow-left opacity-50 ms-1"></i>
|
||||
</a>
|
||||
<a class="btn btn-info px-4 py-2 mt-1" href="{{ twigFunctions.systemSettings().appSite }}/user/login">ارسال تیکت<i class="fa fa-fw fa-arrow-left opacity-50 ms-1"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="block block-rounded block-transparent">
|
||||
|
|
Loading…
Reference in a new issue