-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d851d9
commit f1a6842
Showing
9 changed files
with
163 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
8 changes: 8 additions & 0 deletions
8
lending/loan_management/doctype/loan_adjustment/loan_adjustment.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors | ||
// For license information, please see license.txt | ||
|
||
// frappe.ui.form.on("Loan Adjustment", { | ||
// refresh(frm) { | ||
|
||
// }, | ||
// }); |
80 changes: 80 additions & 0 deletions
80
lending/loan_management/doctype/loan_adjustment/loan_adjustment.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"creation": "2023-11-29 12:22:43.406932", | ||
"doctype": "DocType", | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"section_break_md4g", | ||
"amended_from", | ||
"posting_date", | ||
"loan", | ||
"is_foreclosure", | ||
"adjustments" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "section_break_md4g", | ||
"fieldtype": "Section Break" | ||
}, | ||
{ | ||
"fieldname": "amended_from", | ||
"fieldtype": "Link", | ||
"label": "Amended From", | ||
"no_copy": 1, | ||
"options": "Loan Adjustment", | ||
"print_hide": 1, | ||
"read_only": 1, | ||
"search_index": 1 | ||
}, | ||
{ | ||
"fieldname": "loan", | ||
"fieldtype": "Link", | ||
"label": "Loan", | ||
"options": "Loan" | ||
}, | ||
{ | ||
"default": "0", | ||
"fieldname": "is_foreclosure", | ||
"fieldtype": "Check", | ||
"label": "Is Foreclosure" | ||
}, | ||
{ | ||
"fieldname": "adjustments", | ||
"fieldtype": "Table", | ||
"label": "Adjustments", | ||
"options": "Loan Adjustment Detail" | ||
}, | ||
{ | ||
"fieldname": "posting_date", | ||
"fieldtype": "Date", | ||
"label": "Posting Date" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"is_submittable": 1, | ||
"links": [], | ||
"modified": "2023-11-29 13:08:15.075604", | ||
"modified_by": "Administrator", | ||
"module": "Loan Management", | ||
"name": "Loan Adjustment", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "System Manager", | ||
"share": 1, | ||
"submit": 1, | ||
"write": 1 | ||
} | ||
], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
15 changes: 15 additions & 0 deletions
15
lending/loan_management/doctype/loan_adjustment/loan_adjustment.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
from lending.loan_management.doctype.loan_restructure.loan_restructure import create_loan_repayment | ||
|
||
|
||
class LoanAdjustment(Document): | ||
def on_submit(self): | ||
for repayment in self.get("adjustments"): | ||
create_loan_repayment( | ||
self.loan, self.posting_date, repayment.loan_repayment_type, repayment.amount | ||
) |
9 changes: 9 additions & 0 deletions
9
lending/loan_management/doctype/loan_adjustment/test_loan_adjustment.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
from frappe.tests.utils import FrappeTestCase | ||
|
||
|
||
class TestLoanAdjustment(FrappeTestCase): | ||
pass |
Empty file.
39 changes: 39 additions & 0 deletions
39
lending/loan_management/doctype/loan_adjustment_detail/loan_adjustment_detail.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"creation": "2023-11-29 12:12:02.046525", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"loan_repayment_type", | ||
"amount" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "loan_repayment_type", | ||
"fieldtype": "Select", | ||
"in_list_view": 1, | ||
"label": "Loan Repayment Type", | ||
"options": "Normal Repayment\nInterest Waiver\nPenalty Waiver\nCharges Waiver\nPrincipal Capitalization\nInterest Capitalization\nCharges Capitalization\nPenalty Capitalization\nPrincipal Adjustment\nInterest Adjustment\nInterest Carry Forward" | ||
}, | ||
{ | ||
"fieldname": "amount", | ||
"fieldtype": "Currency", | ||
"in_list_view": 1, | ||
"label": "Amount" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2023-11-29 12:30:02.401145", | ||
"modified_by": "Administrator", | ||
"module": "Loan Management", | ||
"name": "Loan Adjustment Detail", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
9 changes: 9 additions & 0 deletions
9
lending/loan_management/doctype/loan_adjustment_detail/loan_adjustment_detail.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class LoanAdjustmentDetail(Document): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters