Skip to content

Commit

Permalink
fix: validate gl for previous fiscal year
Browse files Browse the repository at this point in the history
(cherry picked from commit a1d108c)
  • Loading branch information
GursheenK authored and mergify[bot] committed Mar 21, 2024
1 parent 67481ad commit 82b6133
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 82b6133

Please sign in to comment.