diff --git a/hesabixCore/src/Controller/ApprovalController.php b/hesabixCore/src/Controller/ApprovalController.php index 32a6e27..0cf8839 100644 --- a/hesabixCore/src/Controller/ApprovalController.php +++ b/hesabixCore/src/Controller/ApprovalController.php @@ -29,7 +29,7 @@ class ApprovalController extends AbstractController EntityManagerInterface $entityManager ): Response { try { - $acc = $access->hasRole('settings'); + $acc = $access->hasRole('store'); if (!$acc) { throw $this->createAccessDeniedException(); } @@ -82,6 +82,68 @@ class ApprovalController extends AbstractController } } + #[Route('/api/approval/unapprove/storeroom/{ticketCode}', name: 'api_approval_unapprove_storeroom', methods: ['POST'])] + public function unapproveStoreroomTicket( + $ticketCode, + #[CurrentUser] ?User $user, + Access $access, + LogService $logService, + EntityManagerInterface $entityManager + ): Response { + try { + $acc = $access->hasRole('store'); + if (!$acc) { + throw $this->createAccessDeniedException(); + } + + $business = $acc['bid']; + $businessSettings = $entityManager->getRepository(Business::class)->find($business->getId()); + + if (!$businessSettings->isRequireTwoStepApproval()) { + return $this->json(['success' => false, 'message' => 'تأیید دو مرحله‌ای فعال نیست']); + } + + $ticket = $entityManager->getRepository(\App\Entity\StoreroomTicket::class)->findOneBy([ + 'code' => $ticketCode, + 'bid' => $business + ]); + + if (!$ticket) { + return $this->json(['success' => false, 'message' => 'حواله انبار یافت نشد']); + } + + $canApprove = $this->canUserApproveStoreroomTicket($user, $businessSettings); + if (!$canApprove) { + return $this->json(['success' => false, 'message' => 'شما مجوز تأیید این حواله را ندارید']); + } + + $ticket->setIsPreview(true); + $ticket->setIsApproved(false); + $ticket->setApprovedBy(null); + + $entityManager->persist($ticket); + $entityManager->flush(); + + $logService->insert( + 'لغو تأیید حواله انبار', + "حواله انبار {$ticket->getCode()} توسط {$user->getFullName()} لغو تأیید شد", + $user, + $business + ); + + return $this->json([ + 'success' => true, + 'message' => 'حواله انبار با موفقیت لغو تأیید شد' + ]); + + } catch (\Exception $e) { + return $this->json([ + 'success' => false, + 'message' => 'خطا در لغو تأیید حواله انبار: ' . $e->getMessage() + ], 500); + } + } + #[Route('/api/approval/approve/sales/{docId}', name: 'api_approval_approve_sales', methods: ['POST'])] public function approveSalesInvoice( $docId, @@ -91,7 +153,7 @@ class ApprovalController extends AbstractController EntityManagerInterface $entityManager ): Response { try { - $acc = $access->hasRole('settings'); + $acc = $access->hasRole('sell'); if (!$acc) { throw $this->createAccessDeniedException(); } @@ -166,7 +228,7 @@ class ApprovalController extends AbstractController EntityManagerInterface $entityManager ): Response { try { - $acc = $access->hasRole('settings'); + $acc = $access->hasRole('sell'); if (!$acc) { throw $this->createAccessDeniedException(); } @@ -250,7 +312,7 @@ class ApprovalController extends AbstractController EntityManagerInterface $entityManager ): Response { try { - $acc = $access->hasRole('settings'); + $acc = $access->hasRole('sell'); if (!$acc) { throw $this->createAccessDeniedException(); } @@ -316,50 +378,6 @@ class ApprovalController extends AbstractController } } - #[Route('/api/approval/check-permission/{docId}', name: 'api_approval_check_permission', methods: ['GET'])] - public function checkApprovalPermission( - $docId, - #[CurrentUser] ?User $user, - Access $access, - EntityManagerInterface $entityManager - ): Response { - try { - $acc = $access->hasRole('settings'); - if (!$acc) { - return $this->json(['canApprove' => false, 'message' => 'دسترسی محدود']); - } - - $business = $acc['bid']; - $businessSettings = $entityManager->getRepository(Business::class)->find($business->getId()); - - $document = $entityManager->getRepository(HesabdariDoc::class)->findOneByIncludePreview([ - 'id' => $docId, - 'bid' => $business - ]); - - if (!$document) { - return $this->json(['canApprove' => false, 'message' => 'سند یافت نشد']); - } - - $canApprove = $this->canUserApproveDocument($user, $businessSettings, $document); - - return $this->json([ - 'canApprove' => $canApprove, - 'documentStatus' => [ - 'isPreview' => $document->isPreview(), - 'isApproved' => $document->isApproved(), - 'approvedBy' => $document->getApprovedBy() ? $document->getApprovedBy()->getFullName() : null - ] - ]); - - } catch (\Exception $e) { - return $this->json([ - 'canApprove' => false, - 'message' => 'خطا در بررسی مجوز: ' . $e->getMessage() - ], 500); - } - } - private function canUserApproveDocument(User $user, Business $business, HesabdariDoc $document): bool { if ($user->getEmail() === $business->getOwner()->getEmail()) { @@ -370,11 +388,9 @@ class ApprovalController extends AbstractController switch ($documentType) { case 'invoice': - return $business->getInvoiceApprover() === $user->getEmail(); + return $business->getApproverSellInvoice() === $user->getEmail(); case 'warehouse': - return $business->getWarehouseApprover() === $user->getEmail(); - case 'financial': - return $business->getFinancialApprover() === $user->getEmail(); + return $business->getApproverWarehouseTransfer() === $user->getEmail(); default: return false; } @@ -405,7 +421,7 @@ class ApprovalController extends AbstractController return true; } - return $business->getWarehouseApprover() === $user->getEmail(); + return $business->getApproverWarehouseTransfer() === $user->getEmail(); } private function canUserApproveSalesInvoice(User $user, Business $business): bool @@ -414,15 +430,6 @@ class ApprovalController extends AbstractController return true; } - return $business->getInvoiceApprover() === $user->getEmail(); - } - - private function canUserApproveFinancialDocument(User $user, Business $business): bool - { - if ($user->getEmail() === $business->getOwner()->getEmail()) { - return true; - } - - return $business->getFinancialApprover() === $user->getEmail(); + return $business->getApproverSellInvoice() === $user->getEmail(); } } diff --git a/hesabixCore/src/Controller/BusinessController.php b/hesabixCore/src/Controller/BusinessController.php index 47368e4..18d7fbb 100644 --- a/hesabixCore/src/Controller/BusinessController.php +++ b/hesabixCore/src/Controller/BusinessController.php @@ -103,7 +103,21 @@ class BusinessController extends AbstractController ]); if (!$perms) throw $this->createAccessDeniedException(); - return $this->json(Explore::ExploreBusiness($bus)); + $result = Explore::ExploreBusiness($bus); + // Read approval settings from Business entity (only new fields) + $result['approvers'] = [ + 'sellInvoice' => $bus->getApproverSellInvoice(), + 'buyInvoice' => $bus->getApproverBuyInvoice(), + 'returnBuy' => $bus->getApproverReturnBuy(), + 'returnSell' => $bus->getApproverReturnSell(), + 'warehouseTransfer' => $bus->getApproverWarehouseTransfer(), + 'receiveFromPersons' => $bus->getApproverReceiveFromPersons(), + 'payToPersons' => $bus->getApproverPayToPersons(), + 'accountingDocs' => $bus->getApproverAccountingDocs(), + 'bankTransfers' => $bus->getApproverBankTransfers(), + ]; + + return $this->json($result); } #[Route('/api/business/list/count', name: 'api_bussiness_list_count')] @@ -246,32 +260,26 @@ class BusinessController extends AbstractController $business->setWalletEnable(false); } } - if (array_key_exists('requireTwoStepApproval', $params)) { - $business->setRequireTwoStepApproval((bool)$params['requireTwoStepApproval']); - } - // Set approvers - if (array_key_exists('invoiceApprover', $params)) { - $business->setInvoiceApprover($params['invoiceApprover']); - } + // Approval settings + $business->setRequireTwoStepApproval((bool)$params['requireTwoStepApproval'] ?? false); - if (array_key_exists('warehouseApprover', $params)) { - $business->setWarehouseApprover($params['warehouseApprover']); - } + $approvers = $params['approvers'] ?? []; - if (array_key_exists('financialApprover', $params)) { - $business->setFinancialApprover($params['financialApprover']); - } + $business->setApproverSellInvoice($approvers['sellInvoice'] ?? null); + $business->setApproverBuyInvoice($approvers['buyInvoice'] ?? null); + $business->setApproverReturnBuy($approvers['returnBuy'] ?? null); + $business->setApproverReturnSell($approvers['returnSell'] ?? null); + $business->setApproverWarehouseTransfer($approvers['warehouseTransfer'] ?? null); + $business->setApproverReceiveFromPersons($approvers['receiveFromPersons'] ?? null); + $business->setApproverPayToPersons($approvers['payToPersons'] ?? null); + $business->setApproverAccountingDocs($approvers['accountingDocs'] ?? null); + $business->setApproverBankTransfers($approvers['bankTransfers'] ?? null); - if (array_key_exists('requireWarrantyOnDelivery', $params)) { - $business->setRequireWarrantyOnDelivery($params['requireWarrantyOnDelivery']); - } - if (array_key_exists('activationGraceDays', $params)) { - $business->setActivationGraceDays($params['activationGraceDays']); - } - if (array_key_exists('matchWarrantyToSerial', $params)) { - $business->setMatchWarrantyToSerial($params['matchWarrantyToSerial']); - } + // Warranty settings + $business->setRequireWarrantyOnDelivery($params['requireWarrantyOnDelivery'] ?? false); + $business->setActivationGraceDays($params['activationGraceDays'] ?? 7); + $business->setMatchWarrantyToSerial($params['matchWarrantyToSerial'] ?? false); //get Money type if (!array_key_exists('arzmain', $params) && $isNew) { @@ -287,9 +295,12 @@ class BusinessController extends AbstractController $business->setDateSubmit(time()); $entityManager->persist($business); $entityManager->flush(); + + // No registry usage; settings persisted on Business entity if ($isNew) { $perms = new Permission(); - $giftCredit = (int) $registryMGR->get('system_settings', 'gift_credit', 0); + $giftCreditRaw = $registryMGR->get('system_settings', 'gift_credit'); + $giftCredit = (int) ($giftCreditRaw ?? 0); $business->setSmsCharge($giftCredit); $perms->setBid($business); $perms->setUser($this->getUser()); diff --git a/hesabixCore/src/Entity/Business.php b/hesabixCore/src/Entity/Business.php index 08b7aac..721eea1 100644 --- a/hesabixCore/src/Entity/Business.php +++ b/hesabixCore/src/Entity/Business.php @@ -316,14 +316,39 @@ class Business #[ORM\Column(nullable: true)] private ?bool $requireTwoStepApproval = null; - #[ORM\Column(length: 255, nullable: true)] - private ?string $invoiceApprover = null; + // Two-step approval extended configuration + #[ORM\Column(nullable: true)] + private ?bool $approvalUseSameApprover = null; #[ORM\Column(length: 255, nullable: true)] - private ?string $warehouseApprover = null; + private ?string $approverAll = null; #[ORM\Column(length: 255, nullable: true)] - private ?string $financialApprover = null; + private ?string $approverSellInvoice = null; + + #[ORM\Column(length: 255, nullable: true)] + private ?string $approverBuyInvoice = null; + + #[ORM\Column(length: 255, nullable: true)] + private ?string $approverReturnBuy = null; + + #[ORM\Column(length: 255, nullable: true)] + private ?string $approverReturnSell = null; + + #[ORM\Column(length: 255, nullable: true)] + private ?string $approverWarehouseTransfer = null; + + #[ORM\Column(length: 255, nullable: true)] + private ?string $approverReceiveFromPersons = null; + + #[ORM\Column(length: 255, nullable: true)] + private ?string $approverPayToPersons = null; + + #[ORM\Column(length: 255, nullable: true)] + private ?string $approverAccountingDocs = null; + + #[ORM\Column(length: 255, nullable: true)] + private ?string $approverBankTransfers = null; #[ORM\Column(nullable: true)] private ?bool $requireWarrantyOnDelivery = null; @@ -2231,36 +2256,102 @@ class Business return $this; } - public function getInvoiceApprover(): ?string + public function getApproverSellInvoice(): ?string { - return $this->invoiceApprover; + return $this->approverSellInvoice; } - public function setInvoiceApprover(?string $invoiceApprover): static + public function setApproverSellInvoice(?string $approverSellInvoice): static { - $this->invoiceApprover = $invoiceApprover; + $this->approverSellInvoice = $approverSellInvoice; return $this; } - public function getWarehouseApprover(): ?string + public function getApproverBuyInvoice(): ?string { - return $this->warehouseApprover; + return $this->approverBuyInvoice; } - public function setWarehouseApprover(?string $warehouseApprover): static + public function setApproverBuyInvoice(?string $approverBuyInvoice): static { - $this->warehouseApprover = $warehouseApprover; + $this->approverBuyInvoice = $approverBuyInvoice; return $this; } - public function getFinancialApprover(): ?string + public function getApproverReturnBuy(): ?string { - return $this->financialApprover; + return $this->approverReturnBuy; } - public function setFinancialApprover(?string $financialApprover): static + public function setApproverReturnBuy(?string $approverReturnBuy): static { - $this->financialApprover = $financialApprover; + $this->approverReturnBuy = $approverReturnBuy; + return $this; + } + + public function getApproverReturnSell(): ?string + { + return $this->approverReturnSell; + } + + public function setApproverReturnSell(?string $approverReturnSell): static + { + $this->approverReturnSell = $approverReturnSell; + return $this; + } + + public function getApproverWarehouseTransfer(): ?string + { + return $this->approverWarehouseTransfer; + } + + public function setApproverWarehouseTransfer(?string $approverWarehouseTransfer): static + { + $this->approverWarehouseTransfer = $approverWarehouseTransfer; + return $this; + } + + public function getApproverReceiveFromPersons(): ?string + { + return $this->approverReceiveFromPersons; + } + + public function setApproverReceiveFromPersons(?string $approverReceiveFromPersons): static + { + $this->approverReceiveFromPersons = $approverReceiveFromPersons; + return $this; + } + + public function getApproverPayToPersons(): ?string + { + return $this->approverPayToPersons; + } + + public function setApproverPayToPersons(?string $approverPayToPersons): static + { + $this->approverPayToPersons = $approverPayToPersons; + return $this; + } + + public function getApproverAccountingDocs(): ?string + { + return $this->approverAccountingDocs; + } + + public function setApproverAccountingDocs(?string $approverAccountingDocs): static + { + $this->approverAccountingDocs = $approverAccountingDocs; + return $this; + } + + public function getApproverBankTransfers(): ?string + { + return $this->approverBankTransfers; + } + + public function setApproverBankTransfers(?string $approverBankTransfers): static + { + $this->approverBankTransfers = $approverBankTransfers; return $this; } diff --git a/hesabixCore/src/Service/Explore.php b/hesabixCore/src/Service/Explore.php index 672d2a5..964c452 100644 --- a/hesabixCore/src/Service/Explore.php +++ b/hesabixCore/src/Service/Explore.php @@ -579,9 +579,17 @@ class Explore 'walletEnabled' => $item->isWalletEnable(), 'walletMatchBank' => $item->getWalletMatchBank() ? $item->getWalletMatchBank()->getId() : null, 'requireTwoStepApproval' => $item->isRequireTwoStepApproval(), - 'invoiceApprover' => $item->getInvoiceApprover(), - 'warehouseApprover' => $item->getWarehouseApprover(), - 'financialApprover' => $item->getFinancialApprover(), + 'approvers' => [ + 'sellInvoice' => $item->getApproverSellInvoice(), + 'buyInvoice' => $item->getApproverBuyInvoice(), + 'returnBuy' => $item->getApproverReturnBuy(), + 'returnSell' => $item->getApproverReturnSell(), + 'warehouseTransfer' => $item->getApproverWarehouseTransfer(), + 'receiveFromPersons' => $item->getApproverReceiveFromPersons(), + 'payToPersons' => $item->getApproverPayToPersons(), + 'accountingDocs' => $item->getApproverAccountingDocs(), + 'bankTransfers' => $item->getApproverBankTransfers(), + ], 'updateSellPrice' => $item->isCommodityUpdateSellPriceAuto(), 'updateBuyPrice' => $item->isCommodityUpdateBuyPriceAuto(), 'requireWarrantyOnDelivery' => $item->getRequireWarrantyOnDelivery(), diff --git a/webUI/src/components/plugins/warranty/BulkImportDialog.vue b/webUI/src/components/plugins/warranty/BulkImportDialog.vue index a8853f4..4a25fb9 100644 --- a/webUI/src/components/plugins/warranty/BulkImportDialog.vue +++ b/webUI/src/components/plugins/warranty/BulkImportDialog.vue @@ -82,6 +82,7 @@ v-model="item.warrantyStartDate" label="شروع گارانتی" :rules="[rules.date]" + :ignore-year-range="true" /> @@ -89,6 +90,7 @@ v-model="item.warrantyEndDate" label="پایان گارانتی" :rules="[rules.date, (value: any) => rules.endDate(value, item.warrantyStartDate)]" + :ignore-year-range="true" /> diff --git a/webUI/src/components/plugins/warranty/SerialDialog.vue b/webUI/src/components/plugins/warranty/SerialDialog.vue index c36b178..71bccef 100644 --- a/webUI/src/components/plugins/warranty/SerialDialog.vue +++ b/webUI/src/components/plugins/warranty/SerialDialog.vue @@ -33,13 +33,13 @@ - diff --git a/webUI/src/utils/approvalUtils.js b/webUI/src/utils/approvalUtils.js index 58d9fa9..228ffad 100644 --- a/webUI/src/utils/approvalUtils.js +++ b/webUI/src/utils/approvalUtils.js @@ -24,11 +24,9 @@ export function canApproveDocument(businessSettings, currentUserEmail, isBusines // Check specific approver based on document type switch (documentType) { case 'invoice': - return businessSettings.invoiceApprover === currentUserEmail; + return businessSettings.approvers.sellInvoice === currentUserEmail; case 'warehouse': - return businessSettings.warehouseApprover === currentUserEmail; - case 'financial': - return businessSettings.financialApprover === currentUserEmail; + return businessSettings.approvers.warehouseTransfer === currentUserEmail; default: return false; } diff --git a/webUI/src/views/acc/persons/receive/list.vue b/webUI/src/views/acc/persons/receive/list.vue index b518bce..e68ace0 100755 --- a/webUI/src/views/acc/persons/receive/list.vue +++ b/webUI/src/views/acc/persons/receive/list.vue @@ -35,13 +35,13 @@ - + - وضعیت تایید + وضعیت تایید + v-if="checkApprover()"> @@ -404,7 +404,7 @@ export default defineComponent({ invoiceIndex: true }, plugins: {}, - business: { requireTwoStepApproval: false, invoiceApprover: null }, + business: { requireTwoStepApproval: false, approvers: { sellInvoice: null } }, currentUser: { email: '', owner: false }, sumSelected: 0, sumSelectedProfit: 0, @@ -507,6 +507,9 @@ export default defineComponent({ isPluginActive(pluginCode) { return this.plugins && this.plugins[pluginCode] !== undefined; }, + checkApprover() { + return this.business.requireTwoStepApproval && (this.business.approvers.sellInvoice == this.currentUser.email || this.currentUser.owner === true); + }, async loadPlugins() { try { const response = await axios.post('/api/plugin/get/actives'); @@ -519,10 +522,10 @@ export default defineComponent({ async loadBusinessInfo() { try { const response = await axios.get('/api/business/get/info/' + localStorage.getItem('activeBid')); - this.business = response.data || { requireTwoStepApproval: false, invoiceApprover: null }; + this.business = response.data || { requireTwoStepApproval: false, approvers: { sellInvoice: null } }; } catch (error) { console.error('Error loading business info:', error); - this.business = { requireTwoStepApproval: false, invoiceApprover: null }; + this.business = { requireTwoStepApproval: false, approvers: { sellInvoice: null } }; } }, async loadCurrentUser() { @@ -639,11 +642,11 @@ export default defineComponent({ return 'success'; }, canShowApprovalButton(item) { - if (!this.business?.requireTwoStepApproval) return false; + if (!this.checkApprover()) return false; - if (item?.isApproved || (!item?.isPreview && !item?.isApproved)) return false; + if (item?.isApproved) return false; - return this.business?.invoiceApprover === this.currentUser?.email || this.currentUser?.owner === true; + return true; }, async approveInvoice(code) { try { @@ -660,7 +663,7 @@ export default defineComponent({ } }, canShowUnapproveButton(item) { - return !this.canShowApprovalButton(item); + return !this.canShowApprovalButton(item) && this.checkApprover(); }, async unapproveInvoice(code) { try { diff --git a/webUI/src/views/acc/settings/bussiness.vue b/webUI/src/views/acc/settings/bussiness.vue index 4a88dff..e0cb83d 100755 --- a/webUI/src/views/acc/settings/bussiness.vue +++ b/webUI/src/views/acc/settings/bussiness.vue @@ -24,10 +24,13 @@ {{ $t('dialog.global_settings') }} - + + تایید اسناد + + {{ $t('dialog.warranty_settings') }} - + نسخه پشتیبان @@ -198,7 +201,170 @@ - + + + + +

تایید اسناد

+ + + + + +
+ با فعال‌سازی این گزینه، تمام اسناد انتخابی نیاز به تایید خواهند داشت. +
+ + +
+ +

تعیین تاییدکنندگان

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ mdi-information + در صورت عدم انتخاب تاییدکننده برای هر بخش، فقط مدیر کسب و کار مجاز به تایید است. +
+
+
+
+
+
+ + + + + نکات + + + + + + + + + +
+
+
+
+

تنظیمات گارانتی

@@ -370,126 +536,7 @@
- - - - - تایید دومرحله‌ای - - - -
- با فعال‌سازی این گزینه، تمام فاکتورها، حواله‌های انبار، دریافت‌ها و پرداخت‌ها نیاز به تایید مدیر خواهند داشت. -
- - -
- -

تعیین تاییدکنندگان

- - - - - -
- این کاربر افزون بر مدیر کسب و کار می‌تواند فاکتورهای فروش را تایید کند -
-
- - - - - -
- این کاربر افزون بر مدیر کسب و کار می‌تواند حواله‌های انبار را تایید کند -
-
- - - -
- -
- mdi-information - در صورت عدم انتخاب تاییدکننده، فقط مدیر کسب و کار می‌تواند اسناد را تایید کند -
-
- mdi-check-circle - نکته: صاحب کسب و کار همیشه می‌تواند تمام اسناد را تأیید کند و نیازی به تعیین مجدد ندارد -
-
-
-
-
+ @@ -594,7 +641,7 @@
- +

نسخه پشتیبان از اطلاعات کسب و کار

@@ -743,9 +790,17 @@ export default { walletEnabled: false, walletMatchBank: null, requireTwoStepApproval: false, - invoiceApprover: null, - warehouseApprover: null, - financialApprover: null, + approvers: { + sellInvoice: null, + buyInvoice: null, + returnBuy: null, + returnSell: null, + warehouseTransfer: null, + receiveFromPersons: null, + payToPersons: null, + accountingDocs: null, + bankTransfers: null + }, year: { startShamsi: '', endShamsi: '', @@ -871,9 +926,7 @@ export default { 'walletEnabled': this.content.walletEnabled, 'walletMatchBank': this.content.walletMatchBank, 'requireTwoStepApproval': this.content.requireTwoStepApproval, - 'invoiceApprover': this.content.invoiceApprover, - 'warehouseApprover': this.content.warehouseApprover, - 'financialApprover': this.content.financialApprover, + 'approvers': this.content.approvers, 'year': this.content.year, 'commodityUpdateBuyPriceAuto': this.content.updateBuyPrice, 'commodityUpdateSellPriceAuto': this.content.updateSellPrice, @@ -924,19 +977,11 @@ export default { this.content.walletMatchBank = this.content.walletMatchBank.id; } - // اطمینان از وجود فیلدهای تأییدکننده - if (!this.content.hasOwnProperty('invoiceApprover')) { - this.content.invoiceApprover = null; - } - if (!this.content.hasOwnProperty('warehouseApprover')) { - this.content.warehouseApprover = null; - } - if (!this.content.hasOwnProperty('financialApprover')) { - this.content.financialApprover = null; - } - if (!this.content.hasOwnProperty('requireTwoStepApproval')) { - this.content.requireTwoStepApproval = false; - } + // اطمینان از وجود فیلدهای تایید اسناد + if (!this.content.hasOwnProperty('requireTwoStepApproval')) this.content.requireTwoStepApproval = false; + if (!this.content.hasOwnProperty('approvers')) this.content.approvers = {}; + const approverKeys = ['sellInvoice','buyInvoice','returnBuy','returnSell','warehouseTransfer','receiveFromPersons','payToPersons','accountingDocs','bankTransfers']; + approverKeys.forEach(k => { if (!this.content.approvers.hasOwnProperty(k)) this.content.approvers[k] = null; }); // سپس سایر داده‌ها را بارگذاری کن const [moneyResponse, banksResponse, usersResponse, pluginsResponse] = await Promise.all([ diff --git a/webUI/src/views/acc/storeroom/io/ticketList.vue b/webUI/src/views/acc/storeroom/io/ticketList.vue index 9d989e4..a3d02ec 100755 --- a/webUI/src/views/acc/storeroom/io/ticketList.vue +++ b/webUI/src/views/acc/storeroom/io/ticketList.vue @@ -81,6 +81,12 @@ تایید حواله
+ + + لغو تایید حواله + تایید حواله + + + لغو تایید حواله + تایید حواله + + + لغو تایید حواله + تایید حواله + + + لغو تایید حواله +