fix: check if body contains customer branch
This commit is contained in:
parent
5aa5e55f99
commit
ff858aaf50
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue