Skip to content

Commit

Permalink
Merge pull request #40576 from frappe/mergify/bp/version-15-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 fa95bd3 + 4b973b2 commit 3dcd738
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 3dcd738

Please sign in to comment.