Skip to content

Commit

Permalink
Merge pull request #40583 from frappe/mergify/bp/version-14-hotfix/pr…
Browse files Browse the repository at this point in the history
…-40572

fix: PCV validation for previous fiscal year (backport #40572)
  • Loading branch information
GursheenK authored Mar 21, 2024
2 parents 757cf8a + 82b6133 commit c072cd9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,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 c072cd9

Please sign in to comment.