diff --git a/erpnext/loan_management/doctype/loan/loan.json b/erpnext/loan_management/doctype/loan/loan.json index acf09f5c037..663316ac6ff 100644 --- a/erpnext/loan_management/doctype/loan/loan.json +++ b/erpnext/loan_management/doctype/loan/loan.json @@ -8,6 +8,7 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "applicant_details_section", "applicant_type", "applicant", "applicant_name", @@ -348,12 +349,46 @@ "no_copy": 1, "options": "Company:company:default_currency", "read_only": 1 + }, + { + "fieldname": "applicant_details_section", + "fieldtype": "Section Break", + "label": "Applicant Details" } ], "index_web_pages_for_search": 1, "is_submittable": 1, - "links": [], - "modified": "2020-11-24 12:27:23.208240", + "links": [ + { + "link_doctype": "Loan Security Pledge", + "link_fieldname": "loan" + }, + { + "link_doctype": "Loan Disbursement", + "link_fieldname": "against_loan" + }, + { + "link_doctype": "Loan Interest Accrual", + "link_fieldname": "loan" + }, + { + "link_doctype": "Loan Repayment", + "link_fieldname": "against_loan" + }, + { + "link_doctype": "Loan Security Unpledge", + "link_fieldname": "loan" + }, + { + "link_doctype": "Loan Security Shortfall", + "link_fieldname": "loan" + }, + { + "link_doctype": "Loan Write Off", + "link_fieldname": "loan" + } + ], + "modified": "2021-01-30 21:59:31.893221", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan", diff --git a/erpnext/loan_management/doctype/loan/loan_dashboard.py b/erpnext/loan_management/doctype/loan/loan_dashboard.py deleted file mode 100644 index 7a8190f7450..00000000000 --- a/erpnext/loan_management/doctype/loan/loan_dashboard.py +++ /dev/null @@ -1,19 +0,0 @@ -from __future__ import unicode_literals -from frappe import _ - -def get_data(): - return { - 'fieldname': 'loan', - 'non_standard_fieldnames': { - 'Loan Disbursement': 'against_loan', - 'Loan Repayment': 'against_loan', - }, - 'transactions': [ - { - 'items': ['Loan Security Pledge', 'Loan Security Shortfall', 'Loan Disbursement'] - }, - { - 'items': ['Loan Repayment', 'Loan Interest Accrual', 'Loan Write Off', 'Loan Security Unpledge'] - } - ] - } \ No newline at end of file diff --git a/erpnext/loan_management/doctype/loan_application/loan_application.json b/erpnext/loan_management/doctype/loan_application/loan_application.json index a353a7740d3..26eeaf451f8 100644 --- a/erpnext/loan_management/doctype/loan_application/loan_application.json +++ b/erpnext/loan_management/doctype/loan_application/loan_application.json @@ -6,6 +6,7 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "applicant_details_section", "applicant_type", "applicant", "applicant_name", @@ -15,10 +16,10 @@ "status", "section_break_4", "loan_type", - "is_term_loan", "loan_amount", - "is_secured_loan", "rate_of_interest", + "is_term_loan", + "is_secured_loan", "column_break_7", "description", "loan_security_details_section", @@ -210,11 +211,25 @@ "fieldtype": "Check", "label": "Is Term Loan", "read_only": 1 + }, + { + "fieldname": "applicant_details_section", + "fieldtype": "Section Break", + "label": "Applicant Details" } ], "is_submittable": 1, - "links": [], - "modified": "2020-03-01 10:21:44.413353", + "links": [ + { + "link_doctype": "Loan", + "link_fieldname": "loan_application" + }, + { + "link_doctype": "Loan Security Pledge", + "link_fieldname": "loan_application" + } + ], + "modified": "2021-01-30 20:26:17.485028", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Application", diff --git a/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py b/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py deleted file mode 100644 index bf3f58b83ef..00000000000 --- a/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py +++ /dev/null @@ -1,12 +0,0 @@ -from __future__ import unicode_literals -from frappe import _ - -def get_data(): - return { - 'fieldname': 'loan_application', - 'transactions': [ - { - 'items': ['Loan', 'Loan Security Pledge'] - }, - ], - } \ No newline at end of file diff --git a/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.json b/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.json index cd5df4d3cd1..04af113e082 100644 --- a/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.json +++ b/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.json @@ -6,6 +6,7 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "applicant_and_loan_details_section", "against_loan", "posting_date", "applicant_type", @@ -126,12 +127,17 @@ { "fieldname": "column_break_8", "fieldtype": "Column Break" + }, + { + "fieldname": "applicant_and_loan_details_section", + "fieldtype": "Section Break", + "label": "Applicant and Loan Details" } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2020-11-06 10:04:30.882322", + "modified": "2021-01-30 22:01:30.255586", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Disbursement", diff --git a/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.json b/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.json index 185bf7a6663..66022b27800 100644 --- a/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.json +++ b/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.json @@ -6,6 +6,7 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "loan_details_section", "loan", "applicant_type", "applicant", @@ -18,12 +19,12 @@ "is_term_loan", "section_break_7", "pending_principal_amount", + "total_pending_interest_amount", "payable_principal_amount", - "paid_principal_amount", "column_break_14", "interest_amount", - "total_pending_interest_amount", "paid_interest_amount", + "paid_principal_amount", "penalty_amount", "section_break_15", "process_loan_interest_accrual", @@ -128,6 +129,7 @@ { "fieldname": "process_loan_interest_accrual", "fieldtype": "Link", + "hidden": 1, "label": "Process Loan Interest Accrual", "options": "Process Loan Interest Accrual" }, @@ -179,13 +181,18 @@ "fieldtype": "Currency", "label": "Total Pending Interest Amount", "options": "Company:company:default_currency" + }, + { + "fieldname": "loan_details_section", + "fieldtype": "Section Break", + "label": "Loan Details" } ], "in_create": 1, "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2021-01-10 00:15:21.544140", + "modified": "2021-01-30 22:27:52.672648", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Interest Accrual", diff --git a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.json b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.json index 2b5df4be243..7f513a6f5a7 100644 --- a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.json +++ b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.json @@ -6,6 +6,7 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "loan_details_section", "against_loan", "applicant_type", "applicant", @@ -226,12 +227,17 @@ "fieldtype": "Percent", "label": "Rate Of Interest", "read_only": 1 + }, + { + "fieldname": "loan_details_section", + "fieldtype": "Section Break", + "label": "Loan Details" } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2020-11-05 10:06:58.792841", + "modified": "2021-01-30 22:30:14.072816", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Repayment", diff --git a/erpnext/loan_management/doctype/loan_security/loan_security.json b/erpnext/loan_management/doctype/loan_security/loan_security.json index c698601ea46..4810efa5143 100644 --- a/erpnext/loan_management/doctype/loan_security/loan_security.json +++ b/erpnext/loan_management/doctype/loan_security/loan_security.json @@ -6,13 +6,14 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "loan_security_details_section", "loan_security_name", - "haircut", "loan_security_code", + "disabled", "column_break_3", "loan_security_type", - "unit_of_measure", - "disabled" + "haircut", + "unit_of_measure" ], "fields": [ { @@ -63,11 +64,21 @@ "options": "UOM", "read_only": 1, "reqd": 1 + }, + { + "fieldname": "loan_security_details_section", + "fieldtype": "Section Break", + "label": "Loan Security Details" } ], "index_web_pages_for_search": 1, - "links": [], - "modified": "2020-10-26 07:34:48.601766", + "links": [ + { + "link_doctype": "Loan Security Price", + "link_fieldname": "loan_security" + } + ], + "modified": "2021-01-30 21:10:01.787613", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Security", diff --git a/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py b/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py index 878b3fd051e..930958a625c 100644 --- a/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py +++ b/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py @@ -6,10 +6,7 @@ def get_data(): 'fieldname': 'loan_security', 'transactions': [ { - 'items': ['Loan Application', 'Loan Security Price'] - }, - { - 'items': ['Loan Security Pledge', 'Loan Security Unpledge'] + 'items': ['Loan Application', 'Loan Security Pledge', 'Loan Security Unpledge'] } ] } \ No newline at end of file diff --git a/erpnext/loan_management/doctype/loan_security_price/loan_security_price.json b/erpnext/loan_management/doctype/loan_security_price/loan_security_price.json index b6e87637567..bdd93826369 100644 --- a/erpnext/loan_management/doctype/loan_security_price/loan_security_price.json +++ b/erpnext/loan_management/doctype/loan_security_price/loan_security_price.json @@ -6,10 +6,11 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "loan_security_details", "loan_security", "loan_security_name", - "loan_security_type", "column_break_2", + "loan_security_type", "uom", "section_break_4", "loan_security_price", @@ -41,7 +42,8 @@ }, { "fieldname": "section_break_4", - "fieldtype": "Section Break" + "fieldtype": "Section Break", + "label": "Price" }, { "fieldname": "loan_security_price", @@ -53,7 +55,8 @@ }, { "fieldname": "section_break_6", - "fieldtype": "Section Break" + "fieldtype": "Section Break", + "label": "Validity" }, { "fieldname": "valid_from", @@ -87,11 +90,16 @@ "fieldtype": "Data", "label": "Loan Security Name", "read_only": 1 + }, + { + "fieldname": "loan_security_details", + "fieldtype": "Section Break", + "label": "Loan Security Details" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-01-17 07:41:49.598086", + "modified": "2021-01-30 21:15:19.214150", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Security Price", diff --git a/erpnext/loan_management/doctype/loan_security_shortfall/loan_security_shortfall.json b/erpnext/loan_management/doctype/loan_security_shortfall/loan_security_shortfall.json index 102bc0d71d3..98d1e02ec00 100644 --- a/erpnext/loan_management/doctype/loan_security_shortfall/loan_security_shortfall.json +++ b/erpnext/loan_management/doctype/loan_security_shortfall/loan_security_shortfall.json @@ -1,10 +1,12 @@ { + "actions": [], "autoname": "LM-LSS-.#####", "creation": "2019-09-06 11:33:34.709540", "doctype": "DocType", "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "loan_details_section", "loan", "status", "column_break_3", @@ -74,6 +76,7 @@ { "fieldname": "process_loan_security_shortfall", "fieldtype": "Link", + "hidden": 1, "label": "Process Loan Security Shortfall", "options": "Process Loan Security Shortfall", "read_only": 1 @@ -85,10 +88,16 @@ { "fieldname": "column_break_8", "fieldtype": "Column Break" + }, + { + "fieldname": "loan_details_section", + "fieldtype": "Section Break", + "label": "Loan Details" } ], "in_create": 1, - "modified": "2019-10-24 06:24:26.128997", + "links": [], + "modified": "2021-01-30 22:55:59.008362", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Security Shortfall", diff --git a/erpnext/loan_management/doctype/loan_security_type/loan_security_type.json b/erpnext/loan_management/doctype/loan_security_type/loan_security_type.json index 871e82563af..9457317fc00 100644 --- a/erpnext/loan_management/doctype/loan_security_type/loan_security_type.json +++ b/erpnext/loan_management/doctype/loan_security_type/loan_security_type.json @@ -6,12 +6,13 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "loan_security_type_details_section", "loan_security_type", "unit_of_measure", "haircut", + "disabled", "column_break_5", - "loan_to_value_ratio", - "disabled" + "loan_to_value_ratio" ], "fields": [ { @@ -51,10 +52,32 @@ "fieldname": "loan_to_value_ratio", "fieldtype": "Percent", "label": "Loan To Value Ratio" + }, + { + "fieldname": "loan_security_type_details_section", + "fieldtype": "Section Break", + "label": "Loan Security Type Details" } ], - "links": [], - "modified": "2020-05-16 09:38:45.988080", + "links": [ + { + "link_doctype": "Loan Security", + "link_fieldname": "loan_security_type" + }, + { + "link_doctype": "Loan Security Price", + "link_fieldname": "loan_security_type" + }, + { + "link_doctype": "Pledge", + "link_fieldname": "loan_security_type" + }, + { + "link_doctype": "Unpledge", + "link_fieldname": "loan_security_type" + } + ], + "modified": "2021-01-30 21:07:12.654583", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Security Type", diff --git a/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py b/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py index ac33589b549..4f2e77d51b4 100644 --- a/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py +++ b/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py @@ -5,9 +5,6 @@ def get_data(): return { 'fieldname': 'loan_security_type', 'transactions': [ - { - 'items': ['Loan Security', 'Loan Security Price'] - }, { 'items': ['Loan Security Pledge', 'Loan Security Unpledge'] } diff --git a/erpnext/loan_management/doctype/loan_type/loan_type.json b/erpnext/loan_management/doctype/loan_type/loan_type.json index 3ef53044c20..a09a07d4ad6 100644 --- a/erpnext/loan_management/doctype/loan_type/loan_type.json +++ b/erpnext/loan_management/doctype/loan_type/loan_type.json @@ -6,16 +6,17 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "loan_type_details_section", "loan_name", "maximum_loan_amount", "rate_of_interest", "penalty_interest_rate", - "grace_period_in_days", - "write_off_amount", - "column_break_2", - "company", "is_term_loan", "disabled", + "column_break_2", + "company", + "grace_period_in_days", + "write_off_amount", "description", "account_details_section", "mode_of_payment", @@ -149,12 +150,34 @@ "fieldtype": "Currency", "label": "Auto Write Off Amount ", "options": "Company:company:default_currency" + }, + { + "fieldname": "loan_type_details_section", + "fieldtype": "Section Break", + "label": "Loan Type Details" } ], "index_web_pages_for_search": 1, "is_submittable": 1, - "links": [], - "modified": "2021-01-17 06:51:26.082879", + "links": [ + { + "link_doctype": "Loan Application", + "link_fieldname": "loan_type" + }, + { + "link_doctype": "Loan", + "link_fieldname": "loan_type" + }, + { + "link_doctype": "Loan Repayment", + "link_fieldname": "loan_type" + }, + { + "link_doctype": "Process Loan Interest Accrual", + "link_fieldname": "loan_type" + } + ], + "modified": "2021-01-30 20:10:02.528522", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Type", diff --git a/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py b/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py deleted file mode 100644 index 58c668948c2..00000000000 --- a/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py +++ /dev/null @@ -1,15 +0,0 @@ -from __future__ import unicode_literals -from frappe import _ - -def get_data(): - return { - 'fieldname': 'loan_type', - 'transactions': [ - { - 'items': ['Loan Repayment', 'Loan'] - }, - { - 'items': ['Loan Application'] - } - ] - } \ No newline at end of file diff --git a/erpnext/loan_management/doctype/loan_write_off/loan_write_off.json b/erpnext/loan_management/doctype/loan_write_off/loan_write_off.json index 4617a62f5b6..95facaad092 100644 --- a/erpnext/loan_management/doctype/loan_write_off/loan_write_off.json +++ b/erpnext/loan_management/doctype/loan_write_off/loan_write_off.json @@ -6,6 +6,7 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "loan_details_section", "loan", "applicant_type", "applicant", @@ -111,12 +112,17 @@ "options": "Loan Write Off", "print_hide": 1, "read_only": 1 + }, + { + "fieldname": "loan_details_section", + "fieldtype": "Section Break", + "label": "Loan Details" } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2020-10-26 07:13:43.663924", + "modified": "2021-01-30 22:35:32.398542", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Write Off", diff --git a/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual.json b/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual.json index 828df2e35f7..6d95852ff36 100644 --- a/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual.json +++ b/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual.json @@ -6,6 +6,7 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "posting_details_section", "posting_date", "loan_type", "loan", @@ -56,12 +57,22 @@ "label": "Accrual Type", "options": "Regular\nRepayment\nDisbursement", "read_only": 1 + }, + { + "fieldname": "posting_details_section", + "fieldtype": "Section Break", + "label": "Posting Details" } ], "index_web_pages_for_search": 1, "is_submittable": 1, - "links": [], - "modified": "2020-11-06 13:28:51.478909", + "links": [ + { + "link_doctype": "Loan Interest Accrual", + "link_fieldname": "process_loan_interest_accrual" + } + ], + "modified": "2021-01-30 22:19:18.254755", "modified_by": "Administrator", "module": "Loan Management", "name": "Process Loan Interest Accrual", diff --git a/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py b/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py deleted file mode 100644 index 243a7a3ba66..00000000000 --- a/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py +++ /dev/null @@ -1,12 +0,0 @@ -from __future__ import unicode_literals -from frappe import _ - -def get_data(): - return { - 'fieldname': 'process_loan_interest_accrual', - 'transactions': [ - { - 'items': ['Loan Interest Accrual'] - } - ] - } \ No newline at end of file diff --git a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.js b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.js index 645e3ada9a8..f2f5939ead2 100644 --- a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.js +++ b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.js @@ -3,6 +3,8 @@ frappe.ui.form.on('Process Loan Security Shortfall', { onload: function(frm) { - frm.set_value('update_time', frappe.datetime.now_datetime()); + if (frm.is_new()) { + frm.set_value('update_time', frappe.datetime.now_datetime()); + } } }); diff --git a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.json b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.json index 3feb3055a6a..c4228a7a158 100644 --- a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.json +++ b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.json @@ -6,6 +6,7 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "posting_details", "update_time", "amended_from" ], @@ -26,11 +27,21 @@ "label": "Update Time", "read_only": 1, "reqd": 1 + }, + { + "fieldname": "posting_details", + "fieldtype": "Section Break", + "label": "Posting Details" } ], "is_submittable": 1, - "links": [], - "modified": "2021-01-17 03:59:14.494557", + "links": [ + { + "link_doctype": "Loan Security Shortfall", + "link_fieldname": "process_loan_security_shortfall" + } + ], + "modified": "2021-01-30 22:56:29.284915", "modified_by": "Administrator", "module": "Loan Management", "name": "Process Loan Security Shortfall", diff --git a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py deleted file mode 100644 index dc9bd81a1dd..00000000000 --- a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py +++ /dev/null @@ -1,12 +0,0 @@ -from __future__ import unicode_literals -from frappe import _ - -def get_data(): - return { - 'fieldname': 'process_loan_security_shortfall', - 'transactions': [ - { - 'items': ['Loan Security Shortfall'] - } - ] - } \ No newline at end of file