mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-26 14:41:42 +01:00
fix: consider stock freeze date in recalculate_amount_difference_field patch
(cherry picked from commit cd72532789)
This commit is contained in:
@@ -75,6 +75,10 @@ def execute():
|
|||||||
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
|
||||||
|
|
||||||
|
stock_frozen_upto = frappe.db.get_single_value("Stock Settings", "stock_frozen_upto")
|
||||||
|
if stock_frozen_upto and getdate(stock_frozen_upto) > getdate(posting_date):
|
||||||
|
posting_date = stock_frozen_upto
|
||||||
|
|
||||||
fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False)
|
fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False)
|
||||||
if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date):
|
if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date):
|
||||||
posting_date = fiscal_year[1]
|
posting_date = fiscal_year[1]
|
||||||
|
|||||||
Reference in New Issue
Block a user