Error while saving Sales transaction with vat

I created user permission for specific cost center. If i make quotation it is giving permission error. by the way if i make the quotation with out Sales Tax (KSA VAT) i am able to save. But with tax it is giving permission error.
main.js?attr=S-VvVR89PPs4s4m0fKbJ0yXfL86XkNuZbnLnMPdiqy8V_vwQ4kAapTX16bNR12UT:2730 POST http://10.10.10.201:8000/api/method/frappe.desk.form.save.savedocs 403 (FORBIDDEN)
xhrSendProcessor @ main.js?attr=S-VvVR89PPs4s4m0fKbJ0yXfL86XkNuZbnLnMPdiqy8V_vwQ4kAapTX16bNR12UT:2730
window.XMLHttpRequest.send @ main.js?attr=S-VvVR89PPs4s4m0fKbJ0yXfL86XkNuZbnLnMPdiqy8V_vwQ4kAapTX16bNR12UT:2738
send @ jquery.min.js:4
ajax @ jquery.min.js:4
frappe.request.call @ request.js:248
frappe.call @ request.js:98
_call @ save.js:201
save @ save.js:25
frappe.ui.form.save @ save.js:228
(anonymous) @ form.js:633
Promise.then (async)
(anonymous) @ dom.js:265
frappe.run_serially @ dom.js:263
validate_and_save @ form.js:624
(anonymous) @ form.js:568
save @ form.js:565
Save @ toolbar.js:499
(anonymous) @ page.js:254
dispatch @ jquery.min.js:3
r.handle @ jquery.min.js:3
request.js:418 Traceback (most recent call last):
File “apps/frappe/frappe/desk/form/save.py”, line 21, in savedocs
doc.save()
File “apps/frappe/frappe/model/document.py”, line 285, in save
return self._save(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 307, in _save
self.insert()
File “apps/frappe/frappe/model/document.py”, line 226, in insert
self.check_permission(“create”)
File “apps/frappe/frappe/model/document.py”, line 187, in check_permission
self.raise_no_permission_to(permlevel or permtype)
File “apps/frappe/frappe/model/document.py”, line 201, in raise_no_permission_to
raise frappe.PermissionError
frappe.exceptions.PermissionError

request.js:418 Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 68, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 31, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 67, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1208, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/desk/form/save.py”, line 21, in savedocs
doc.save()
File “apps/frappe/frappe/model/document.py”, line 285, in save
return self._save(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 307, in _save
self.insert()
File “apps/frappe/frappe/model/document.py”, line 226, in insert
self.check_permission(“create”)
File “apps/frappe/frappe/model/document.py”, line 187, in check_permission
self.raise_no_permission_to(permlevel or permtype)
File “apps/frappe/frappe/model/document.py”, line 201, in raise_no_permission_to
raise frappe.PermissionError
frappe.exceptions.PermissionError

Anyone Kindly help… Still looking for solution

Why would you need user permission for a specific Cost center ??

Dear @centaur thanks for your reply. Actually we have several branches. We make invoices delivery note …etc in separate series… and the user in one branch should not see other branches invoice or delivery note quotation etc… so I add user permission for user in cost center to restrict and to fetch the cost center automatically. I have custom field in user to assign the cost center…

Yes i understand that…

but why not set the User Permission for the Branch rather than Cost Center, so the particular user can only see the documents respective to their branch only

Cost Center is more of an Accounting Dimension.

Once again thanks for your quick response @centaur. I choose cost center because the transaction invloved in accounts like sales invoice and other thing is if i choose cost center i dont need to add custom field in invoice… anyhow will check as you told… is invoice has branch field with core? or i have to add custom field only…

For User Permission…User Permissions

Though the example is for company… you can do for the same for Branch as well.

Aren’t documents assigned to a particular Sales person for that territory ?