Skip to content

Commit

Permalink
feat: Turn Loan Type from a submittable into an editable document.
Browse files Browse the repository at this point in the history
  • Loading branch information
bosue committed Sep 14, 2023
1 parent 4b64541 commit 5d10776
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
3 changes: 1 addition & 2 deletions lending/loan_management/doctype/loan/loan.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ frappe.ui.form.on('Loan', {
frm.set_query("loan_type", function () {
return {
"filters": {
"docstatus": 1,
"company": frm.doc.company
}
};
Expand Down Expand Up @@ -278,4 +277,4 @@ frappe.ui.form.on('Loan', {
frm.toggle_enable("monthly_repayment_amount", frm.doc.repayment_method == "Repay Fixed Amount per Period")
frm.toggle_enable("repayment_periods", frm.doc.repayment_method == "Repay Over Number of Periods")
}
});
});
10 changes: 3 additions & 7 deletions lending/loan_management/doctype/loan_type/loan_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"disabled",
"loan_name",
"maximum_loan_amount",
"rate_of_interest",
Expand All @@ -15,7 +16,6 @@
"column_break_2",
"company",
"is_term_loan",
"disabled",
"repayment_schedule_type",
"repayment_date_on",
"days_past_due_threshold_for_npa",
Expand Down Expand Up @@ -298,18 +298,15 @@
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2023-09-14 22:29:09.576248",
"modified": "2023-09-14 22:56:17.109374",
"modified_by": "Administrator",
"module": "Loan Management",
"name": "Loan Type",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
Expand All @@ -319,7 +316,6 @@
"report": 1,
"role": "Loan Manager",
"share": 1,
"submit": 1,
"write": 1
},
{
Expand All @@ -330,4 +326,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt

frappe.ui.form.on('Process Loan Interest Accrual', {
refresh: function(frm) {
frm.set_query("loan_type", function() {
return {
filters: {
"docstatus": 1
}
};
});
}
});

0 comments on commit 5d10776

Please sign in to comment.