remove logs from search documents in sell controller
This commit is contained in:
parent
39c1deb5a0
commit
fb1124333d
|
@ -625,11 +625,9 @@ private function calculateProfit(int $docId, array $acc, EntityManagerInterface
|
|||
): JsonResponse {
|
||||
$acc = $access->hasRole('sell');
|
||||
if (!$acc) {
|
||||
$log->insert('SellController', 'Access denied for code: ' . $code, $this->getUser(), null);
|
||||
throw $this->createAccessDeniedException();
|
||||
}
|
||||
|
||||
$log->insert('SellController', 'Searching for doc with code: ' . $code, $this->getUser(), $acc['bid']->getId());
|
||||
$doc = $entityManager->getRepository(HesabdariDoc::class)->findOneBy([
|
||||
'bid' => $acc['bid'],
|
||||
'code' => $code,
|
||||
|
@ -642,7 +640,6 @@ private function calculateProfit(int $docId, array $acc, EntityManagerInterface
|
|||
}
|
||||
|
||||
$rows = $entityManager->getRepository(HesabdariRow::class)->findBy(['doc' => $doc]);
|
||||
$log->insert('SellController', 'Found ' . count($rows) . ' rows for code: ' . $code, $this->getUser(), $acc['bid']->getId());
|
||||
|
||||
$data = array_map(function ($row) use ($log) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue