fix: update Period Closing Voucher per Company
Validate period closing voucher company-wise
This commit is contained in:
parent
450bef8443
commit
74b274f555
@ -54,8 +54,8 @@ class PeriodClosingVoucher(AccountsController):
|
|||||||
|
|
||||||
pce = frappe.db.sql(
|
pce = frappe.db.sql(
|
||||||
"""select name from `tabPeriod Closing Voucher`
|
"""select name from `tabPeriod Closing Voucher`
|
||||||
where posting_date > %s and fiscal_year = %s and docstatus = 1""",
|
where posting_date > %s and fiscal_year = %s and docstatus = 1 and company = %s""",
|
||||||
(self.posting_date, self.fiscal_year),
|
(self.posting_date, self.fiscal_year, self.company),
|
||||||
)
|
)
|
||||||
if pce and pce[0][0]:
|
if pce and pce[0][0]:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user