mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-27 22:05:19 +00:00
feat: add pre-submit credit limit warning on save
This commit is contained in:
@@ -340,6 +340,14 @@ period_closing_doctypes = [
|
||||
"Subcontracting Receipt",
|
||||
]
|
||||
|
||||
pre_submit_validation_doctypes = [
|
||||
"Sales Invoice",
|
||||
"Purchase Invoice",
|
||||
"Delivery Note",
|
||||
"Purchase Receipt",
|
||||
"Sales Order",
|
||||
]
|
||||
|
||||
doc_events = {
|
||||
"*": {
|
||||
"validate": [
|
||||
@@ -350,6 +358,9 @@ doc_events = {
|
||||
tuple(period_closing_doctypes): {
|
||||
"validate": "erpnext.accounts.doctype.accounting_period.accounting_period.validate_accounting_period_on_doc_save",
|
||||
},
|
||||
tuple(pre_submit_validation_doctypes): {
|
||||
"validate": "erpnext.accounts.utils.pre_submit_validation",
|
||||
},
|
||||
"Stock Entry": {
|
||||
"on_submit": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty",
|
||||
"on_cancel": "erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty",
|
||||
|
||||
Reference in New Issue
Block a user