mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 23:22:52 +00:00
fix: Don't validate if no GL Entry exists
This commit is contained in:
@@ -99,6 +99,11 @@ class PeriodClosingVoucher(AccountsController):
|
|||||||
|
|
||||||
previous_fiscal_year = get_fiscal_year(last_year_closing, company=self.company, boolean=True)
|
previous_fiscal_year = get_fiscal_year(last_year_closing, company=self.company, boolean=True)
|
||||||
|
|
||||||
|
if previous_fiscal_year and not frappe.db.exists(
|
||||||
|
"GL Entry", {"posting_date": ("<=", last_year_closing), "company": self.company}
|
||||||
|
):
|
||||||
|
return
|
||||||
|
|
||||||
if previous_fiscal_year and not frappe.db.exists(
|
if previous_fiscal_year and not frappe.db.exists(
|
||||||
"Period Closing Voucher",
|
"Period Closing Voucher",
|
||||||
{"posting_date": ("<=", last_year_closing), "docstatus": 1, "company": self.company},
|
{"posting_date": ("<=", last_year_closing), "docstatus": 1, "company": self.company},
|
||||||
|
|||||||
Reference in New Issue
Block a user