From c607e5f940d7032cc7c11d870d3bf99b30bcef4c Mon Sep 17 00:00:00 2001 From: vimalraj27 Date: Wed, 20 Nov 2024 13:27:21 +0530 Subject: [PATCH] fix: Get submitted documents in validate_for_closed_fiscal_year --- .../repost_accounting_ledger/repost_accounting_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index f37e542dd894..0bd9a2a05154 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -45,7 +45,7 @@ def validate_for_closed_fiscal_year(self): latest_pcv = ( frappe.db.get_all( "Period Closing Voucher", - filters={"company": self.company}, + filters={"company": self.company, "docstatus": 1}, order_by="period_end_date desc", pluck="period_end_date", limit=1,