From 404e68bdc202a6b7e2e6e115af0254238779065b Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Tue, 2 Dec 2025 17:49:16 +0530 Subject: [PATCH] fix: more patch related changes --- erpnext/patches.txt | 4 ++-- .../patches/v15_0/recalculate_amount_difference_field.py | 6 +++--- .../migrate_account_freezing_settings_to_company.py | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename erpnext/patches/{v15_0 => v16_0}/migrate_account_freezing_settings_to_company.py (100%) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index f46d8987d08..3e640e7bf0c 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -265,7 +265,6 @@ erpnext.patches.v16_0.create_company_custom_fields [post_model_sync] erpnext.patches.v15_0.rename_gross_purchase_amount_to_net_purchase_amount -erpnext.patches.v15_0.migrate_account_freezing_settings_to_company erpnext.patches.v15_0.create_asset_depreciation_schedules_from_assets execute:frappe.delete_doc_if_exists('Workspace', 'ERPNext Integrations Settings') erpnext.patches.v14_0.update_posting_datetime_and_dropped_indexes #22-02-2024 @@ -450,4 +449,5 @@ erpnext.patches.v16_0.set_company_wise_warehouses erpnext.patches.v16_0.set_valuation_method_on_companies erpnext.patches.v15_0.migrate_old_item_wise_tax_detail_data_to_table erpnext.patches.v16_0.migrate_budget_records_to_new_structure -erpnext.patches.v16_0.update_currency_exchange_settings_for_frankfurter \ No newline at end of file +erpnext.patches.v16_0.update_currency_exchange_settings_for_frankfurter +erpnext.patches.v16_0.migrate_account_freezing_settings_to_company \ No newline at end of file diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index f3cece4c416..d7b56c206d2 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -58,9 +58,9 @@ def execute(): ): posting_date = period_closing_voucher[0].period_end_date - acc_frozen_till_date = frappe.db.get_value("Company", company, "accounts_frozen_till_date") - if acc_frozen_till_date and getdate(acc_frozen_till_date) > getdate(posting_date): - posting_date = acc_frozen_till_date + 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): + 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): diff --git a/erpnext/patches/v15_0/migrate_account_freezing_settings_to_company.py b/erpnext/patches/v16_0/migrate_account_freezing_settings_to_company.py similarity index 100% rename from erpnext/patches/v15_0/migrate_account_freezing_settings_to_company.py rename to erpnext/patches/v16_0/migrate_account_freezing_settings_to_company.py