diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 01b66fa..6235b5c 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -631,7 +631,11 @@ export class QuotationController extends Controller { } await permissionCheckCompany(req.user, record.customerBranch.customer.registeredBranch); - if (customerBranch && record.customerBranchId !== body.customerBranchId) { + if ( + customerBranch && + body.customerBranchId && + record.customerBranchId !== body.customerBranchId + ) { await permissionCheckCompany(req.user, customerBranch.customer.registeredBranch); }