diff --git a/hesabixCore/src/Controller/ArchiveController.php b/hesabixCore/src/Controller/ArchiveController.php index cb1b15e..9680203 100644 --- a/hesabixCore/src/Controller/ArchiveController.php +++ b/hesabixCore/src/Controller/ArchiveController.php @@ -48,7 +48,7 @@ class ArchiveController extends AbstractController #[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 { - $acc = $access->hasRole('archiveInfo'); + $acc = $access->hasRole('join'); if(!$acc) throw $this->createAccessDeniedException(); $resp = $this->getArchiveInfo($entityManager,$acc); @@ -58,7 +58,7 @@ class ArchiveController extends AbstractController #[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 { - $acc = $access->hasRole('archiveInfo'); + $acc = $access->hasRole('join'); if(!$acc) throw $this->createAccessDeniedException(); $settings = $functions->systemSettings(); @@ -70,7 +70,7 @@ class ArchiveController extends AbstractController #[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 { - $acc = $access->hasRole('archiveInfo'); + $acc = $access->hasRole('join'); if(!$acc) throw $this->createAccessDeniedException(); $params = []; @@ -221,7 +221,7 @@ class ArchiveController extends AbstractController #[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 { - $acc = $access->hasRole('archiveInfo'); + $acc = $access->hasRole('join'); if (!$acc) throw $this->createAccessDeniedException(); $orders = $entityManager->getRepository(ArchiveOrders::class)->findBy([ diff --git a/hesabixCore/src/Controller/StoreroomController.php b/hesabixCore/src/Controller/StoreroomController.php index dfb4487..95d9a7d 100644 --- a/hesabixCore/src/Controller/StoreroomController.php +++ b/hesabixCore/src/Controller/StoreroomController.php @@ -475,9 +475,7 @@ class StoreroomController extends AbstractController if ($smsres == 2) { return $this->json([ - 'code' => 11, - 'data' => '', - 'message' => 'operation success but sms not send' + 'result' => 2 ]); } } diff --git a/hesabixCore/src/Repository/CommodityRepository.php b/hesabixCore/src/Repository/CommodityRepository.php index df211a5..1993ef2 100644 --- a/hesabixCore/src/Repository/CommodityRepository.php +++ b/hesabixCore/src/Repository/CommodityRepository.php @@ -63,6 +63,7 @@ class CommodityRepository extends ServiceEntityRepository return $this->createQueryBuilder('p') ->where('p.bid = :val') ->andWhere("p.name LIKE :search") + ->orWhere("p.barcodes LIKE :search") ->setParameter('val', $bid) ->setParameter('search', '%' . $search . '%') ->setMaxResults($maxResults)