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 {
|
): JsonResponse {
|
||||||
$acc = $access->hasRole('sell');
|
$acc = $access->hasRole('sell');
|
||||||
if (!$acc) {
|
if (!$acc) {
|
||||||
$log->insert('SellController', 'Access denied for code: ' . $code, $this->getUser(), null);
|
|
||||||
throw $this->createAccessDeniedException();
|
throw $this->createAccessDeniedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
$log->insert('SellController', 'Searching for doc with code: ' . $code, $this->getUser(), $acc['bid']->getId());
|
|
||||||
$doc = $entityManager->getRepository(HesabdariDoc::class)->findOneBy([
|
$doc = $entityManager->getRepository(HesabdariDoc::class)->findOneBy([
|
||||||
'bid' => $acc['bid'],
|
'bid' => $acc['bid'],
|
||||||
'code' => $code,
|
'code' => $code,
|
||||||
|
@ -642,7 +640,6 @@ private function calculateProfit(int $docId, array $acc, EntityManagerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows = $entityManager->getRepository(HesabdariRow::class)->findBy(['doc' => $doc]);
|
$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) {
|
$data = array_map(function ($row) use ($log) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue