Merge pull request #40572 from GursheenK/pcv-validate-only-valid-gles

fix: PCV validation for previous fiscal year
This commit is contained in:
Deepesh Garg
2024-03-20 20:55:08 +05:30
committed by GitHub

View File

@@ -141,7 +141,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