fix: validate gl for previous fiscal year

(cherry picked from commit a1d108c062)
This commit is contained in:
Gursheen Anand
2024-03-20 18:45:04 +05:30
committed by Mergify
parent 67481ad062
commit 82b613353b

View File

@@ -121,7 +121,8 @@ class PeriodClosingVoucher(AccountsController):
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}
"GL Entry",
{"posting_date": ("<=", last_year_closing), "company": self.company, "is_cancelled": 0},
):
return