This commit is contained in:
babak alizadeh 2024-10-15 14:22:16 +03:30
parent 419422f725
commit 6a7ba2191f
3 changed files with 6 additions and 7 deletions

View file

@ -48,7 +48,7 @@ class ArchiveController extends AbstractController
#[Route('/api/archive/info', name: 'app_archive_info')] #[Route('/api/archive/info', name: 'app_archive_info')]
public function app_archive_info(Provider $provider,Request $request,Access $access,Log $log,EntityManagerInterface $entityManager,$code = 0): JsonResponse public function app_archive_info(Provider $provider,Request $request,Access $access,Log $log,EntityManagerInterface $entityManager,$code = 0): JsonResponse
{ {
$acc = $access->hasRole('archiveInfo'); $acc = $access->hasRole('join');
if(!$acc) if(!$acc)
throw $this->createAccessDeniedException(); throw $this->createAccessDeniedException();
$resp = $this->getArchiveInfo($entityManager,$acc); $resp = $this->getArchiveInfo($entityManager,$acc);
@ -58,7 +58,7 @@ class ArchiveController extends AbstractController
#[Route('/api/archive/order/settings', name: 'app_archive_order_settings')] #[Route('/api/archive/order/settings', name: 'app_archive_order_settings')]
public function app_archive_order_settings(twigFunctions $functions,Request $request,Access $access,Log $log,EntityManagerInterface $entityManager,$code = 0): JsonResponse public function app_archive_order_settings(twigFunctions $functions,Request $request,Access $access,Log $log,EntityManagerInterface $entityManager,$code = 0): JsonResponse
{ {
$acc = $access->hasRole('archiveInfo'); $acc = $access->hasRole('join');
if(!$acc) if(!$acc)
throw $this->createAccessDeniedException(); throw $this->createAccessDeniedException();
$settings = $functions->systemSettings(); $settings = $functions->systemSettings();
@ -70,7 +70,7 @@ class ArchiveController extends AbstractController
#[Route('/api/archive/order/submit', name: 'app_archive_order_submit')] #[Route('/api/archive/order/submit', name: 'app_archive_order_submit')]
public function app_archive_order_submit(twigFunctions $functions,Request $request,Access $access,Log $log,EntityManagerInterface $entityManager,$code = 0): JsonResponse public function app_archive_order_submit(twigFunctions $functions,Request $request,Access $access,Log $log,EntityManagerInterface $entityManager,$code = 0): JsonResponse
{ {
$acc = $access->hasRole('archiveInfo'); $acc = $access->hasRole('join');
if(!$acc) if(!$acc)
throw $this->createAccessDeniedException(); throw $this->createAccessDeniedException();
$params = []; $params = [];
@ -221,7 +221,7 @@ class ArchiveController extends AbstractController
#[Route('/api/archive/orders/list', name: 'app_archive_orders_list')] #[Route('/api/archive/orders/list', name: 'app_archive_orders_list')]
public function app_archive_orders_list(Jdate $jdate, Provider $provider,Request $request,Access $access,Log $log,EntityManagerInterface $entityManager,$code = 0): JsonResponse public function app_archive_orders_list(Jdate $jdate, Provider $provider,Request $request,Access $access,Log $log,EntityManagerInterface $entityManager,$code = 0): JsonResponse
{ {
$acc = $access->hasRole('archiveInfo'); $acc = $access->hasRole('join');
if (!$acc) if (!$acc)
throw $this->createAccessDeniedException(); throw $this->createAccessDeniedException();
$orders = $entityManager->getRepository(ArchiveOrders::class)->findBy([ $orders = $entityManager->getRepository(ArchiveOrders::class)->findBy([

View file

@ -475,9 +475,7 @@ class StoreroomController extends AbstractController
if ($smsres == 2) { if ($smsres == 2) {
return $this->json([ return $this->json([
'code' => 11, 'result' => 2
'data' => '',
'message' => 'operation success but sms not send'
]); ]);
} }
} }

View file

@ -63,6 +63,7 @@ class CommodityRepository extends ServiceEntityRepository
return $this->createQueryBuilder('p') return $this->createQueryBuilder('p')
->where('p.bid = :val') ->where('p.bid = :val')
->andWhere("p.name LIKE :search") ->andWhere("p.name LIKE :search")
->orWhere("p.barcodes LIKE :search")
->setParameter('val', $bid) ->setParameter('val', $bid)
->setParameter('search', '%' . $search . '%') ->setParameter('search', '%' . $search . '%')
->setMaxResults($maxResults) ->setMaxResults($maxResults)