mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 15:00:27 +00:00
@@ -62,15 +62,6 @@ def execute():
|
|||||||
):
|
):
|
||||||
posting_date = period_closing_voucher[0].period_end_date
|
posting_date = period_closing_voucher[0].period_end_date
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
try:
|
|
||||||
fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today())
|
|
||||||
except Exception:
|
|
||||||
return
|
|
||||||
else:
|
|
||||||
if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date):
|
|
||||||
posting_date = fiscal_year[1]
|
|
||||||
=======
|
|
||||||
acc_frozen_upto = frappe.db.get_single_value("Accounts Settings", "acc_frozen_upto")
|
acc_frozen_upto = frappe.db.get_single_value("Accounts Settings", "acc_frozen_upto")
|
||||||
if acc_frozen_upto and getdate(acc_frozen_upto) > getdate(posting_date):
|
if acc_frozen_upto and getdate(acc_frozen_upto) > getdate(posting_date):
|
||||||
posting_date = acc_frozen_upto
|
posting_date = acc_frozen_upto
|
||||||
@@ -79,10 +70,14 @@ def execute():
|
|||||||
if stock_frozen_upto and getdate(stock_frozen_upto) > getdate(posting_date):
|
if stock_frozen_upto and getdate(stock_frozen_upto) > getdate(posting_date):
|
||||||
posting_date = stock_frozen_upto
|
posting_date = stock_frozen_upto
|
||||||
|
|
||||||
fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False)
|
try:
|
||||||
if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date):
|
fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today())
|
||||||
posting_date = fiscal_year[1]
|
except Exception:
|
||||||
>>>>>>> 696f931678 (fix: consider account freeze date in recalculate_amount_difference_field patch)
|
return
|
||||||
|
else:
|
||||||
|
if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date):
|
||||||
|
posting_date = fiscal_year[1]
|
||||||
|
|
||||||
query = query.where(parent.posting_date > posting_date)
|
query = query.where(parent.posting_date > posting_date)
|
||||||
|
|
||||||
if result := query.run(as_dict=True):
|
if result := query.run(as_dict=True):
|
||||||
|
|||||||
Reference in New Issue
Block a user