From 5dab40347d38ef158fc0238f757a260a2f36483b Mon Sep 17 00:00:00 2001 From: anandbaburajan Date: Fri, 25 Aug 2023 17:23:42 +0530 Subject: [PATCH 1/2] chore: rename process_asset_classification --- lending/hooks.py | 2 +- .../days_past_due_log/days_past_due_log.json | 152 +++++++++--------- lending/loan_management/doctype/loan/loan.py | 16 +- .../test_loan_interest_accrual.py | 10 +- .../doctype/loan_repayment/loan_repayment.js | 2 +- .../doctype/loan_repayment/loan_repayment.py | 8 +- .../loan_restructure/loan_restructure.js | 2 +- .../process_asset_classification.json | 104 ------------ .../__init__.py | 0 .../process_loan_asset_classification.js} | 2 +- .../process_loan_asset_classification.json | 104 ++++++++++++ .../process_loan_asset_classification.py} | 10 +- .../test_asset_classification.py | 0 lending/patches.txt | 1 + ...me_process_asset_classification_doctype.py | 15 ++ ...3XWNVMB2.js => lending.bundle.2O3MYYF2.js} | 2 +- ....js.map => lending.bundle.2O3MYYF2.js.map} | 2 +- 17 files changed, 225 insertions(+), 207 deletions(-) delete mode 100644 lending/loan_management/doctype/process_asset_classification/process_asset_classification.json rename lending/loan_management/doctype/{process_asset_classification => process_loan_asset_classification}/__init__.py (100%) rename lending/loan_management/doctype/{process_asset_classification/process_asset_classification.js => process_loan_asset_classification/process_loan_asset_classification.js} (72%) create mode 100644 lending/loan_management/doctype/process_loan_asset_classification/process_loan_asset_classification.json rename lending/loan_management/doctype/{process_asset_classification/process_asset_classification.py => process_loan_asset_classification/process_loan_asset_classification.py} (80%) rename lending/loan_management/doctype/{process_asset_classification => process_loan_asset_classification}/test_asset_classification.py (100%) create mode 100644 lending/patches/v15_0/rename_process_asset_classification_doctype.py rename lending/public/dist/js/{lending.bundle.3XWNVMB2.js => lending.bundle.2O3MYYF2.js} (96%) rename lending/public/dist/js/{lending.bundle.3XWNVMB2.js.map => lending.bundle.2O3MYYF2.js.map} (81%) diff --git a/lending/hooks.py b/lending/hooks.py index 664e1ce1..6ad9fce6 100644 --- a/lending/hooks.py +++ b/lending/hooks.py @@ -128,7 +128,7 @@ "daily_long": [ "lending.loan_management.doctype.process_loan_security_shortfall.process_loan_security_shortfall.create_process_loan_security_shortfall", "lending.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual.process_loan_interest_accrual_for_term_loans", - "lending.loan_management.doctype.process_asset_classification.process_asset_classification.create_process_asset_classification", + "lending.loan_management.doctype.process_loan_asset_classification.process_loan_asset_classification.create_process_loan_asset_classification", ], "monthly_long": [ "lending.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual.process_loan_interest_accrual_for_demand_loans", diff --git a/lending/loan_management/doctype/days_past_due_log/days_past_due_log.json b/lending/loan_management/doctype/days_past_due_log/days_past_due_log.json index 7f366b12..9fc0ab94 100644 --- a/lending/loan_management/doctype/days_past_due_log/days_past_due_log.json +++ b/lending/loan_management/doctype/days_past_due_log/days_past_due_log.json @@ -1,78 +1,78 @@ { -"actions": [], -"creation": "2023-04-26 17:07:40.828226", -"default_view": "List", -"doctype": "DocType", -"editable_grid": 1, -"engine": "InnoDB", -"field_order": [ - "loan", - "posting_date", - "days_past_due", - "process_asset_classification" -], -"fields": [ - { - "fieldname": "loan", - "fieldtype": "Link", - "label": "Loan", - "options": "Loan", - "read_only": 1 - }, - { - "fieldname": "posting_date", - "fieldtype": "Date", - "label": "Posting Date", - "read_only": 1 - }, - { - "fieldname": "days_past_due", - "fieldtype": "Int", - "label": "Days Past Due", - "read_only": 1 - }, - { - "fieldname": "process_asset_classification", - "fieldtype": "Link", - "label": "Process Asset Classification", - "options": "Process Asset Classification", - "read_only": 1 - } -], -"in_create": 1, -"links": [], -"modified": "2023-05-18 13:54:43.543481", -"modified_by": "Administrator", -"module": "Loan Management", -"name": "Days Past Due Log", -"owner": "Administrator", -"permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Loan Manager", - "share": 1, - "write": 1 - } -], -"sort_field": "modified", -"sort_order": "DESC", -"states": [] + "actions": [], + "creation": "2023-04-26 17:07:40.828226", + "default_view": "List", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "loan", + "posting_date", + "days_past_due", + "process_loan_asset_classification" + ], + "fields": [ + { + "fieldname": "loan", + "fieldtype": "Link", + "label": "Loan", + "options": "Loan", + "read_only": 1 + }, + { + "fieldname": "posting_date", + "fieldtype": "Date", + "label": "Posting Date", + "read_only": 1 + }, + { + "fieldname": "days_past_due", + "fieldtype": "Int", + "label": "Days Past Due", + "read_only": 1 + }, + { + "fieldname": "process_loan_asset_classification", + "fieldtype": "Link", + "label": "Process Loan Asset Classification", + "options": "Process Loan Asset Classification", + "read_only": 1 + } + ], + "in_create": 1, + "links": [], + "modified": "2023-08-25 15:37:21.206963", + "modified_by": "Administrator", + "module": "Loan Management", + "name": "Days Past Due Log", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Loan Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] } \ No newline at end of file diff --git a/lending/loan_management/doctype/loan/loan.py b/lending/loan_management/doctype/loan/loan.py index 4196de50..88d10804 100644 --- a/lending/loan_management/doctype/loan/loan.py +++ b/lending/loan_management/doctype/loan/loan.py @@ -549,7 +549,7 @@ def make_refund_jv(loan, amount=0, reference_number=None, reference_date=None, s @frappe.whitelist() def update_days_past_due_in_loans( - posting_date=None, loan_type=None, loan_name=None, process_asset_classification=None + posting_date=None, loan_type=None, loan_name=None, process_loan_asset_classification=None ): """Update days past due in loans""" posting_date = posting_date or getdate() @@ -579,7 +579,7 @@ def update_days_past_due_in_loans( posting_date or getdate(), ) - create_dpd_record(loan.loan, posting_date, days_past_due, process_asset_classification) + create_dpd_record(loan.loan, posting_date, days_past_due, process_loan_asset_classification) checked_loans.append(loan.loan) open_loans_with_no_overdue = [] @@ -601,17 +601,19 @@ def update_days_past_due_in_loans( d.name, d.company, d.applicant_type, d.applicant, 0, 0, posting_date or getdate() ) - create_dpd_record(d.name, posting_date, 0, process_asset_classification) + create_dpd_record(d.name, posting_date, 0, process_loan_asset_classification) def restore_pervious_dpd_state(applicant_type, applicant, repayment_reference): pac = frappe.db.get_value( - "Process Asset Classification", {"payment_reference": repayment_reference}, "previous_process" + "Process Loan Asset Classification", + {"payment_reference": repayment_reference}, + "previous_process", ) for d in frappe.db.get_all( "Days Past Due Log", filters={ - "process_asset_classification": pac, + "process_loan_asset_classification": pac, "applicant_type": applicant_type, "applicant": applicant, }, @@ -620,14 +622,14 @@ def restore_pervious_dpd_state(applicant_type, applicant, repayment_reference): frappe.db.set_value("Loan", d.loan, "days_past_due", d.days_past_due) -def create_dpd_record(loan, posting_date, days_past_due, process_asset_classification=None): +def create_dpd_record(loan, posting_date, days_past_due, process_loan_asset_classification=None): frappe.get_doc( { "doctype": "Days Past Due Log", "loan": loan, "posting_date": posting_date, "days_past_due": days_past_due, - "process_asset_classification": process_asset_classification, + "process_loan_asset_classification": process_loan_asset_classification, } ).insert(ignore_permissions=True) diff --git a/lending/loan_management/doctype/loan_interest_accrual/test_loan_interest_accrual.py b/lending/loan_management/doctype/loan_interest_accrual/test_loan_interest_accrual.py index fb77548b..785a86de 100644 --- a/lending/loan_management/doctype/loan_interest_accrual/test_loan_interest_accrual.py +++ b/lending/loan_management/doctype/loan_interest_accrual/test_loan_interest_accrual.py @@ -20,8 +20,8 @@ from lending.loan_management.doctype.loan_interest_accrual.loan_interest_accrual import ( days_in_year, ) -from lending.loan_management.doctype.process_asset_classification.process_asset_classification import ( - create_process_asset_classification, +from lending.loan_management.doctype.process_loan_asset_classification.process_loan_asset_classification import ( + create_process_loan_asset_classification, ) from lending.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual import ( process_loan_interest_accrual_for_demand_loans, @@ -122,7 +122,7 @@ def test_dpd_calculation(self): make_loan_disbursement_entry(loan.name, loan.loan_amount, disbursement_date="2023-02-01") process_loan_interest_accrual_for_term_loans(posting_date="2023-02-01") - create_process_asset_classification( + create_process_loan_asset_classification( posting_date="2023-02-02", loan_type=loan.loan_type, loan=loan.name ) @@ -137,7 +137,7 @@ def test_dpd_calculation(self): self.assertEqual(loan_details.asset_classification_code, "SMA-0") self.assertEqual(loan_details.asset_classification_name, "Special Mention Account - 0") - create_process_asset_classification( + create_process_loan_asset_classification( posting_date="2023-04-05", loan_type=loan.loan_type, loan=loan.name ) loan_details = frappe.db.get_value( @@ -151,7 +151,7 @@ def test_dpd_calculation(self): self.assertEqual(loan_details.asset_classification_code, "SMA-2") self.assertEqual(loan_details.asset_classification_name, "Special Mention Account - 2") - create_process_asset_classification( + create_process_loan_asset_classification( posting_date="2023-07-05", loan_type=loan.loan_type, loan=loan.name ) loan_details = frappe.db.get_value( diff --git a/lending/loan_management/doctype/loan_repayment/loan_repayment.js b/lending/loan_management/doctype/loan_repayment/loan_repayment.js index 709a668b..390096d9 100644 --- a/lending/loan_management/doctype/loan_repayment/loan_repayment.js +++ b/lending/loan_management/doctype/loan_repayment/loan_repayment.js @@ -5,7 +5,7 @@ lending.common.setup_filters("Loan Repayment"); frappe.ui.form.on('Loan Repayment', { setup(frm) { - frm.ignore_doctypes_on_cancel_all = ["Process Asset Classification"]; + frm.ignore_doctypes_on_cancel_all = ["Process Loan Asset Classification"]; }, onload: function(frm) { frm.set_query('against_loan', function() { diff --git a/lending/loan_management/doctype/loan_repayment/loan_repayment.py b/lending/loan_management/doctype/loan_repayment/loan_repayment.py index fb348000..6d1ba306 100644 --- a/lending/loan_management/doctype/loan_repayment/loan_repayment.py +++ b/lending/loan_management/doctype/loan_repayment/loan_repayment.py @@ -18,8 +18,8 @@ from lending.loan_management.doctype.loan_security_shortfall.loan_security_shortfall import ( update_shortfall_status, ) -from lending.loan_management.doctype.process_asset_classification.process_asset_classification import ( - create_process_asset_classification, +from lending.loan_management.doctype.process_loan_asset_classification.process_loan_asset_classification import ( + create_process_loan_asset_classification, ) from lending.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual import ( process_loan_interest_accrual_for_demand_loans, @@ -41,7 +41,7 @@ def before_submit(self): def on_submit(self): if self.repayment_type == "Normal Repayment": - create_process_asset_classification( + create_process_loan_asset_classification( posting_date=self.posting_date, loan_type=self.loan_type, loan=self.against_loan, @@ -71,7 +71,7 @@ def on_cancel(self): self.ignore_linked_doctypes = [ "GL Entry", "Payment Ledger Entry", - "Process Asset Classification", + "Process Loan Asset Classification", ] self.make_gl_entries(cancel=1) diff --git a/lending/loan_management/doctype/loan_restructure/loan_restructure.js b/lending/loan_management/doctype/loan_restructure/loan_restructure.js index cd346783..1a6c7bc6 100644 --- a/lending/loan_management/doctype/loan_restructure/loan_restructure.js +++ b/lending/loan_management/doctype/loan_restructure/loan_restructure.js @@ -4,7 +4,7 @@ frappe.ui.form.on("Loan Restructure", { refresh: function (frm) { frm.trigger("toggle_fields"); - frm.ignore_doctypes_on_cancel_all = ['Loan Balance Adjustment', 'Loan Repayment', 'Loan Repayment Schedule', 'Process Asset Classification']; + frm.ignore_doctypes_on_cancel_all = ['Loan Balance Adjustment', 'Loan Repayment', 'Loan Repayment Schedule', 'Process Loan Asset Classification']; }, new_repayment_method: function (frm) { diff --git a/lending/loan_management/doctype/process_asset_classification/process_asset_classification.json b/lending/loan_management/doctype/process_asset_classification/process_asset_classification.json deleted file mode 100644 index 380dd8e7..00000000 --- a/lending/loan_management/doctype/process_asset_classification/process_asset_classification.json +++ /dev/null @@ -1,104 +0,0 @@ -{ -"actions": [], -"autoname": "LM-ACC-.#####", -"creation": "2023-04-28 13:07:48.767990", -"default_view": "List", -"doctype": "DocType", -"editable_grid": 1, -"engine": "InnoDB", -"field_order": [ - "posting_date", - "loan_type", - "loan", - "previous_process", - "payment_reference", - "amended_from" -], -"fields": [ - { - "fieldname": "posting_date", - "fieldtype": "Date", - "in_list_view": 1, - "label": "Posting Date", - "reqd": 1 - }, - { - "fieldname": "loan_type", - "fieldtype": "Link", - "label": "Loan Type", - "options": "Loan Type" - }, - { - "fieldname": "loan", - "fieldtype": "Link", - "label": "Loan ", - "options": "Loan" - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "label": "Amended From", - "no_copy": 1, - "options": "Process Asset Classification", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "previous_process", - "fieldtype": "Link", - "label": "Previous Process", - "options": "Process Asset Classification", - "read_only": 1 - }, - { - "fieldname": "payment_reference", - "fieldtype": "Link", - "label": "Payment Reference", - "options": "Loan Repayment", - "read_only": 1 - } -], -"index_web_pages_for_search": 1, -"is_submittable": 1, -"links": [], -"modified": "2023-05-17 10:59:34.824696", -"modified_by": "Administrator", -"module": "Loan Management", -"name": "Process Asset Classification", -"naming_rule": "Expression (old style)", -"owner": "Administrator", -"permissions": [ - { - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Loan Manager", - "share": 1, - "submit": 1, - "write": 1 - } -], -"sort_field": "modified", -"sort_order": "DESC", -"states": [], -"track_changes": 1 -} \ No newline at end of file diff --git a/lending/loan_management/doctype/process_asset_classification/__init__.py b/lending/loan_management/doctype/process_loan_asset_classification/__init__.py similarity index 100% rename from lending/loan_management/doctype/process_asset_classification/__init__.py rename to lending/loan_management/doctype/process_loan_asset_classification/__init__.py diff --git a/lending/loan_management/doctype/process_asset_classification/process_asset_classification.js b/lending/loan_management/doctype/process_loan_asset_classification/process_loan_asset_classification.js similarity index 72% rename from lending/loan_management/doctype/process_asset_classification/process_asset_classification.js rename to lending/loan_management/doctype/process_loan_asset_classification/process_loan_asset_classification.js index dde01169..20d07580 100644 --- a/lending/loan_management/doctype/process_asset_classification/process_asset_classification.js +++ b/lending/loan_management/doctype/process_loan_asset_classification/process_loan_asset_classification.js @@ -1,7 +1,7 @@ // Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -// frappe.ui.form.on("Process Asset Classification", { +// frappe.ui.form.on("Process Loan Asset Classification", { // refresh(frm) { // }, diff --git a/lending/loan_management/doctype/process_loan_asset_classification/process_loan_asset_classification.json b/lending/loan_management/doctype/process_loan_asset_classification/process_loan_asset_classification.json new file mode 100644 index 00000000..c0552d3a --- /dev/null +++ b/lending/loan_management/doctype/process_loan_asset_classification/process_loan_asset_classification.json @@ -0,0 +1,104 @@ +{ + "actions": [], + "autoname": "LM-ACC-.#####", + "creation": "2023-04-28 13:07:48.767990", + "default_view": "List", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "posting_date", + "loan_type", + "loan", + "previous_process", + "payment_reference", + "amended_from" + ], + "fields": [ + { + "fieldname": "posting_date", + "fieldtype": "Date", + "in_list_view": 1, + "label": "Posting Date", + "reqd": 1 + }, + { + "fieldname": "loan_type", + "fieldtype": "Link", + "label": "Loan Type", + "options": "Loan Type" + }, + { + "fieldname": "loan", + "fieldtype": "Link", + "label": "Loan ", + "options": "Loan" + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "label": "Amended From", + "no_copy": 1, + "options": "Process Loan Asset Classification", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "previous_process", + "fieldtype": "Link", + "label": "Previous Process", + "options": "Process Loan Asset Classification", + "read_only": 1 + }, + { + "fieldname": "payment_reference", + "fieldtype": "Link", + "label": "Payment Reference", + "options": "Loan Repayment", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "is_submittable": 1, + "links": [], + "modified": "2023-05-17 10:59:34.824696", + "modified_by": "Administrator", + "module": "Loan Management", + "name": "Process Loan Asset Classification", + "naming_rule": "Expression (old style)", + "owner": "Administrator", + "permissions": [ + { + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Loan Manager", + "share": 1, + "submit": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "states": [], + "track_changes": 1 +} \ No newline at end of file diff --git a/lending/loan_management/doctype/process_asset_classification/process_asset_classification.py b/lending/loan_management/doctype/process_loan_asset_classification/process_loan_asset_classification.py similarity index 80% rename from lending/loan_management/doctype/process_asset_classification/process_asset_classification.py rename to lending/loan_management/doctype/process_loan_asset_classification/process_loan_asset_classification.py index ddeb8e52..c19c941c 100644 --- a/lending/loan_management/doctype/process_asset_classification/process_asset_classification.py +++ b/lending/loan_management/doctype/process_loan_asset_classification/process_loan_asset_classification.py @@ -6,7 +6,7 @@ from frappe.utils import getdate -class ProcessAssetClassification(Document): +class ProcessLoanAssetClassification(Document): def on_submit(self): from lending.loan_management.doctype.loan.loan import update_days_past_due_in_loans @@ -14,24 +14,24 @@ def on_submit(self): posting_date=self.posting_date, loan_type=self.loan_type, loan_name=self.loan, - process_asset_classification=self.name, + process_loan_asset_classification=self.name, ) -def create_process_asset_classification( +def create_process_loan_asset_classification( posting_date=None, loan_type=None, loan=None, payment_reference=None ): posting_date = posting_date or getdate() previous_process = frappe.db.get_all( - "Process Asset Classification", + "Process Loan Asset Classification", filters={"posting_date": ("<=", posting_date), "loan": ("in", ["", loan])}, fields=["name"], order_by="posting_date desc", limit=1, ) - asset_classification = frappe.new_doc("Process Asset Classification") + asset_classification = frappe.new_doc("Process Loan Asset Classification") asset_classification.posting_date = posting_date asset_classification.loan_type = loan_type asset_classification.loan = loan diff --git a/lending/loan_management/doctype/process_asset_classification/test_asset_classification.py b/lending/loan_management/doctype/process_loan_asset_classification/test_asset_classification.py similarity index 100% rename from lending/loan_management/doctype/process_asset_classification/test_asset_classification.py rename to lending/loan_management/doctype/process_loan_asset_classification/test_asset_classification.py diff --git a/lending/patches.txt b/lending/patches.txt index dde35f50..ecdce995 100644 --- a/lending/patches.txt +++ b/lending/patches.txt @@ -2,6 +2,7 @@ # Patches added in this section will be executed before doctypes are migrated # Read docs to understand patches: https://frappeframework.com/docs/v14/user/en/database-migrations lending.patches.v15_0.generate_loan_repayment_schedule +lending.patches.v15_0.rename_process_asset_classification_doctype [post_model_sync] # Patches added in this section will be executed after doctypes are migrated diff --git a/lending/patches/v15_0/rename_process_asset_classification_doctype.py b/lending/patches/v15_0/rename_process_asset_classification_doctype.py new file mode 100644 index 00000000..8d3faaeb --- /dev/null +++ b/lending/patches/v15_0/rename_process_asset_classification_doctype.py @@ -0,0 +1,15 @@ +# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + + +import frappe + + +def execute(): + if frappe.db.table_exists("Process Asset Classification") and not frappe.db.table_exists( + "Process Loan Asset Classification" + ): + frappe.rename_doc( + "DocType", "Process Asset Classification", "Process Loan Asset Classification", force=True + ) + frappe.reload_doc("assets", "doctype", "process_loan_asset_classification") diff --git a/lending/public/dist/js/lending.bundle.3XWNVMB2.js b/lending/public/dist/js/lending.bundle.2O3MYYF2.js similarity index 96% rename from lending/public/dist/js/lending.bundle.3XWNVMB2.js rename to lending/public/dist/js/lending.bundle.2O3MYYF2.js index a6275dc8..ed0b7d4c 100644 --- a/lending/public/dist/js/lending.bundle.3XWNVMB2.js +++ b/lending/public/dist/js/lending.bundle.2O3MYYF2.js @@ -40,4 +40,4 @@ } }; })(); -//# sourceMappingURL=lending.bundle.3XWNVMB2.js.map +//# sourceMappingURL=lending.bundle.2O3MYYF2.js.map diff --git a/lending/public/dist/js/lending.bundle.3XWNVMB2.js.map b/lending/public/dist/js/lending.bundle.2O3MYYF2.js.map similarity index 81% rename from lending/public/dist/js/lending.bundle.3XWNVMB2.js.map rename to lending/public/dist/js/lending.bundle.2O3MYYF2.js.map index df76f648..64a1a70d 100644 --- a/lending/public/dist/js/lending.bundle.3XWNVMB2.js.map +++ b/lending/public/dist/js/lending.bundle.2O3MYYF2.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../../../../apps/lending/lending/public/js/loan_common.js"], - "sourcesContent": ["// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors\n// For license information, please see license.txt\nfrappe.provide(\"lending.common\");\n\nlending.common = {\n\tsetup_filters: function(doctype) {\n\t\tfrappe.ui.form.on(doctype, {\n\t\t\trefresh: function(frm) {\n\t\t\t\tif (['Loan Disbursement', 'Loan Repayment', 'Loan Interest Accrual', 'Loan Write Off'].includes(frm.doc.doctype)\n\t\t\t\t\t&& frm.doc.docstatus > 0) {\n\t\t\t\t\tcur_frm.add_custom_button(__('Accounting Ledger'), function() {\n\t\t\t\t\t\tfrappe.route_options = {\n\t\t\t\t\t\t\tvoucher_no: frm.doc.name,\n\t\t\t\t\t\t\tfrom_date: frm.doc.posting_date,\n\t\t\t\t\t\t\tto_date: frm.doc.posting_date,\n\t\t\t\t\t\t\tcompany: frm.doc.company,\n\t\t\t\t\t\t\tgroup_by: \"Group by Voucher (Consolidated)\",\n\t\t\t\t\t\t\tshow_cancelled_entries: frm.doc.docstatus === 2\n\t\t\t\t\t\t};\n\t\t\t\t\t\tfrappe.set_route(\"query-report\", \"General Ledger\");\n\t\t\t\t\t}, __(\"View\"));\n\t\t\t\t}\n\t\t\t\terpnext.hide_company();\n\t\t\t},\n\n\t\t\tapplicant: function(frm) {\n\t\t\t\tif (![\"Loan Application\", \"Loan\"].includes(frm.doc.doctype)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\n\t\t\t\tif (frm.doc.applicant) {\n\t\t\t\t\tfrappe.model.with_doc(frm.doc.applicant_type, frm.doc.applicant, function() {\n\t\t\t\t\t\tvar applicant = frappe.model.get_doc(frm.doc.applicant_type, frm.doc.applicant);\n\t\t\t\t\t\tfrm.set_value(\"applicant_name\",\n\t\t\t\t\t\t\tapplicant.employee_name || applicant.member_name);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfrm.set_value(\"applicant_name\", null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}"], + "sourcesContent": ["// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors\n// For license information, please see license.txt\nfrappe.provide(\"lending.common\");\n\nlending.common = {\n\tsetup_filters: function(doctype) {\n\t\tfrappe.ui.form.on(doctype, {\n\t\t\trefresh: function(frm) {\n\t\t\t\tif (['Loan Disbursement', 'Loan Repayment', 'Loan Interest Accrual', 'Loan Write Off'].includes(frm.doc.doctype)\n\t\t\t\t\t&& frm.doc.docstatus > 0) {\n\t\t\t\t\tcur_frm.add_custom_button(__('Accounting Ledger'), function() {\n\t\t\t\t\t\tfrappe.route_options = {\n\t\t\t\t\t\t\tvoucher_no: frm.doc.name,\n\t\t\t\t\t\t\tfrom_date: frm.doc.posting_date,\n\t\t\t\t\t\t\tto_date: frm.doc.posting_date,\n\t\t\t\t\t\t\tcompany: frm.doc.company,\n\t\t\t\t\t\t\tgroup_by: \"Group by Voucher (Consolidated)\",\n\t\t\t\t\t\t\tshow_cancelled_entries: frm.doc.docstatus === 2\n\t\t\t\t\t\t};\n\t\t\t\t\t\tfrappe.set_route(\"query-report\", \"General Ledger\");\n\t\t\t\t\t}, __(\"View\"));\n\t\t\t\t}\n\t\t\t\terpnext.hide_company();\n\t\t\t},\n\n\t\t\tapplicant: function(frm) {\n\t\t\t\tif (![\"Loan Application\", \"Loan\"].includes(frm.doc.doctype)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (frm.doc.applicant) {\n\t\t\t\t\tfrappe.model.with_doc(frm.doc.applicant_type, frm.doc.applicant, function() {\n\t\t\t\t\t\tvar applicant = frappe.model.get_doc(frm.doc.applicant_type, frm.doc.applicant);\n\t\t\t\t\t\tfrm.set_value(\"applicant_name\",\n\t\t\t\t\t\t\tapplicant.employee_name || applicant.member_name);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfrm.set_value(\"applicant_name\", null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}"], "mappings": ";;AAEA,SAAO,QAAQ,gBAAgB;AAE/B,UAAQ,SAAS;AAAA,IAChB,eAAe,SAAS,SAAS;AAChC,aAAO,GAAG,KAAK,GAAG,SAAS;AAAA,QAC1B,SAAS,SAAS,KAAK;AACtB,cAAI,CAAC,qBAAqB,kBAAkB,yBAAyB,gBAAgB,EAAE,SAAS,IAAI,IAAI,OAAO,KAC3G,IAAI,IAAI,YAAY,GAAG;AAC1B,oBAAQ,kBAAkB,GAAG,mBAAmB,GAAG,WAAW;AAC7D,qBAAO,gBAAgB;AAAA,gBACtB,YAAY,IAAI,IAAI;AAAA,gBACpB,WAAW,IAAI,IAAI;AAAA,gBACnB,SAAS,IAAI,IAAI;AAAA,gBACjB,SAAS,IAAI,IAAI;AAAA,gBACjB,UAAU;AAAA,gBACV,wBAAwB,IAAI,IAAI,cAAc;AAAA,cAC/C;AACA,qBAAO,UAAU,gBAAgB,gBAAgB;AAAA,YAClD,GAAG,GAAG,MAAM,CAAC;AAAA,UACd;AACA,kBAAQ,aAAa;AAAA,QACtB;AAAA,QAEA,WAAW,SAAS,KAAK;AACxB,cAAI,CAAC,CAAC,oBAAoB,MAAM,EAAE,SAAS,IAAI,IAAI,OAAO,GAAG;AAC5D;AAAA,UACD;AAEA,cAAI,IAAI,IAAI,WAAW;AACtB,mBAAO,MAAM,SAAS,IAAI,IAAI,gBAAgB,IAAI,IAAI,WAAW,WAAW;AAC3E,kBAAI,YAAY,OAAO,MAAM,QAAQ,IAAI,IAAI,gBAAgB,IAAI,IAAI,SAAS;AAC9E,kBAAI;AAAA,gBAAU;AAAA,gBACb,UAAU,iBAAiB,UAAU;AAAA,cAAW;AAAA,YAClD,CAAC;AAAA,UACF,OACK;AACJ,gBAAI,UAAU,kBAAkB,IAAI;AAAA,UACrC;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,EACD;", "names": [] } From 74d87716c9e12317e75dc3c398de38fbbf78f95e Mon Sep 17 00:00:00 2001 From: anandbaburajan Date: Fri, 25 Aug 2023 19:08:55 +0530 Subject: [PATCH 2/2] chore: fix typo --- .../v15_0/rename_process_asset_classification_doctype.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lending/patches/v15_0/rename_process_asset_classification_doctype.py b/lending/patches/v15_0/rename_process_asset_classification_doctype.py index 8d3faaeb..a81c35af 100644 --- a/lending/patches/v15_0/rename_process_asset_classification_doctype.py +++ b/lending/patches/v15_0/rename_process_asset_classification_doctype.py @@ -12,4 +12,4 @@ def execute(): frappe.rename_doc( "DocType", "Process Asset Classification", "Process Loan Asset Classification", force=True ) - frappe.reload_doc("assets", "doctype", "process_loan_asset_classification") + frappe.reload_doc("loan_management", "doctype", "process_loan_asset_classification")