mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 03:45:08 +00:00
fix: update Period Closing Voucher per Company
Validate period closing voucher company-wise
(cherry picked from commit 74b274f555)
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user