mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 06:58:27 +00:00
fix: validate docs in closed accounting period on save (#36157)
fix: validate docs in closed accounting period on save (#36157)
(cherry picked from commit 5985e02574)
Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
This commit is contained in:
@@ -285,10 +285,34 @@ standard_queries = {
|
||||
"Customer": "erpnext.controllers.queries.customer_query",
|
||||
}
|
||||
|
||||
period_closing_doctypes = [
|
||||
"Sales Invoice",
|
||||
"Purchase Invoice",
|
||||
"Journal Entry",
|
||||
"Bank Clearance",
|
||||
"Stock Entry",
|
||||
"Dunning",
|
||||
"Invoice Discounting",
|
||||
"Payment Entry",
|
||||
"Period Closing Voucher",
|
||||
"Process Deferred Accounting",
|
||||
"Asset",
|
||||
"Asset Capitalization",
|
||||
"Asset Repair",
|
||||
"Delivery Note",
|
||||
"Landed Cost Voucher",
|
||||
"Purchase Receipt",
|
||||
"Stock Reconciliation",
|
||||
"Subcontracting Receipt",
|
||||
]
|
||||
|
||||
doc_events = {
|
||||
"*": {
|
||||
"validate": "erpnext.support.doctype.service_level_agreement.service_level_agreement.apply",
|
||||
},
|
||||
tuple(period_closing_doctypes): {
|
||||
"validate": "erpnext.accounts.doctype.accounting_period.accounting_period.validate_accounting_period_on_doc_save",
|
||||
},
|
||||
"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",
|
||||
@@ -464,15 +488,6 @@ advance_payment_doctypes = ["Sales Order", "Purchase Order"]
|
||||
|
||||
invoice_doctypes = ["Sales Invoice", "Purchase Invoice"]
|
||||
|
||||
period_closing_doctypes = [
|
||||
"Sales Invoice",
|
||||
"Purchase Invoice",
|
||||
"Journal Entry",
|
||||
"Bank Clearance",
|
||||
"Asset",
|
||||
"Stock Entry",
|
||||
]
|
||||
|
||||
bank_reconciliation_doctypes = [
|
||||
"Payment Entry",
|
||||
"Journal Entry",
|
||||
|
||||
Reference in New Issue
Block a user