Skip to content

Commit

Permalink
fix: validate gl for previous fiscal year
Browse files Browse the repository at this point in the history
  • Loading branch information
GursheenK committed Mar 20, 2024
1 parent 50bfb8e commit a1d108c
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 a1d108c

Please sign in to comment.