Skip to content

Commit

Permalink
Merge pull request #40572 from GursheenK/pcv-validate-only-valid-gles
Browse files Browse the repository at this point in the history
fix: PCV validation for previous fiscal year
  • Loading branch information
deepeshgarg007 authored Mar 20, 2024
2 parents 0a495bf + a1d108c commit 1714ac6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def check_if_previous_year_closed(self):
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

Expand Down

0 comments on commit 1714ac6

Please sign in to comment.