Skip to content

Commit

Permalink
fix: update Period Closing Voucher per Company
Browse files Browse the repository at this point in the history
Validate period closing voucher company-wise

(cherry picked from commit 74b274f)
  • Loading branch information
zeta17 authored and mergify[bot] committed Jun 10, 2022
1 parent 395f86f commit 5ebbe81
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def validate_posting_date(self):

pce = frappe.db.sql(
"""select name from `tabPeriod Closing Voucher`
where posting_date > %s and fiscal_year = %s and docstatus = 1""",
(self.posting_date, self.fiscal_year),
where posting_date > %s and fiscal_year = %s and docstatus = 1 and company = %s""",
(self.posting_date, self.fiscal_year, self.company),
)
if pce and pce[0][0]:
frappe.throw(
Expand Down

0 comments on commit 5ebbe81

Please sign in to comment.