From 5bbb0d482df7784a515179e4f7098d77f424eee5 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 10 May 2024 14:14:06 +0530 Subject: [PATCH] fix: patch due dates in loan interest accruals --- lending/patches.txt | 3 ++- lending/patches/v15_0/update_due_date_in_accruals.py | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 lending/patches/v15_0/update_due_date_in_accruals.py diff --git a/lending/patches.txt b/lending/patches.txt index dd2f3004..367deabe 100644 --- a/lending/patches.txt +++ b/lending/patches.txt @@ -28,4 +28,5 @@ lending.patches.v15_0.add_loan_product_code_and_rename_loan_name lending.patches.v15_0.update_penalty_interest_method_in_loan_products lending.patches.v15_0.update_min_bpi_application_days lending.patches.v15_0.create_custom_field_for_collection_offset_sequence_for_settlement_collection -lending.patches.v15_0.rename_irac_provisioning_configuration_loan_product \ No newline at end of file +lending.patches.v15_0.rename_irac_provisioning_configuration_loan_product +lending.patches.v15_0.update_due_date_in_accruals \ No newline at end of file diff --git a/lending/patches/v15_0/update_due_date_in_accruals.py b/lending/patches/v15_0/update_due_date_in_accruals.py new file mode 100644 index 00000000..0fe0f5f2 --- /dev/null +++ b/lending/patches/v15_0/update_due_date_in_accruals.py @@ -0,0 +1,11 @@ +import frappe + + +def execute(): + frappe.db.sql( + """ + UPDATE `tabLoan Interest Accrual` + SET due_date = posting_date + WHERE ifnull(due_date, '') = '' + """ + )