mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
chore: fix patch
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import frappe
|
||||
from frappe.utils import nowdate
|
||||
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
from erpnext.accounts.utils import FiscalYearError, get_fiscal_year
|
||||
|
||||
|
||||
def execute():
|
||||
# Only do for current fiscal year, no need to repost for all years
|
||||
for company in frappe.get_all("Company"):
|
||||
try:
|
||||
fiscal_year_details = get_fiscal_year(date=nowdate(), company=company.name, as_dict=True)
|
||||
|
||||
purchase_invoice = frappe.qb.DocType("Purchase Invoice")
|
||||
@@ -24,3 +25,5 @@ def execute():
|
||||
).where(
|
||||
purchase_invoice.docstatus == 1
|
||||
).run()
|
||||
except FiscalYearError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user