forked from frappe/lending
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add multiple payment methods while lending
Fixes frappe#166 Add support for multiple payment methods in loan applications and loans. * Add a new doctype `Payment Method Limit` to define the cash limit. * Update `loan_application.js` to include a payment section with multiple modes of payment. * Add validation to check if the cash limit is obeyed. * Show an error screen if the cash limit is exceeded and auto-update the entered lending value for cash to 20,000. * Update `loan_application.py` to handle the logic for multiple payment methods. * Add logic to distribute the remaining amount to other payment methods like bank transfer or UPI. * Update `loan.js` to support multiple payment methods. * Add a payment section with multiple modes of payment. * Add validation to check if the cash limit is obeyed. * Show an error screen if the cash limit is exceeded and auto-update the entered lending value for cash to 20,000. * Update `loan.py` to handle the logic for multiple payment methods. * Add logic to distribute the remaining amount to other payment methods like bank transfer or UPI.
- Loading branch information
Showing
5 changed files
with
223 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
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
56 changes: 56 additions & 0 deletions
56
lending/loan_management/doctype/payment_method_limit/payment_method_limit.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,56 @@ | ||
{ | ||
"actions": [], | ||
"allow_import": 1, | ||
"autoname": "field:payment_method", | ||
"creation": "2023-11-29 10:00:00.000000", | ||
"doctype": "DocType", | ||
"document_type": "Document", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"payment_method", | ||
"limit" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "payment_method", | ||
"fieldtype": "Data", | ||
"label": "Payment Method", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "limit", | ||
"fieldtype": "Currency", | ||
"label": "Limit", | ||
"reqd": 1, | ||
"default": 20000 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"is_submittable": 1, | ||
"links": [], | ||
"modified": "2023-11-29 10:00:00.000000", | ||
"modified_by": "Administrator", | ||
"module": "Loan Management", | ||
"name": "Payment Method Limit", | ||
"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": [], | ||
"track_changes": 1 | ||
} |