From 49cc57e76eb61bec1d05c2e6b4f7f15b12008204 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 5 Nov 2020 21:14:07 +0530 Subject: [PATCH] fix: Negative amount check for amounts --- erpnext/loan_management/doctype/loan/loan.json | 3 ++- .../doctype/loan_disbursement/loan_disbursement.json | 3 ++- .../doctype/loan_repayment/loan_repayment.json | 3 ++- erpnext/loan_management/doctype/pledge/pledge.json | 7 +++++-- .../doctype/proposed_pledge/proposed_pledge.json | 8 ++++++-- erpnext/loan_management/doctype/unpledge/unpledge.json | 4 +++- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/erpnext/loan_management/doctype/loan/loan.json b/erpnext/loan_management/doctype/loan/loan.json index 23996afd21..e8ecf015c3 100644 --- a/erpnext/loan_management/doctype/loan/loan.json +++ b/erpnext/loan_management/doctype/loan/loan.json @@ -136,6 +136,7 @@ "fieldname": "loan_amount", "fieldtype": "Currency", "label": "Loan Amount", + "non_negative": 1, "options": "Company:company:default_currency" }, { @@ -351,7 +352,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2020-10-27 23:37:02.785940", + "modified": "2020-11-05 10:04:00.762975", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan", diff --git a/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.json b/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.json index 89f671bcc0..cd5df4d3cd 100644 --- a/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.json +++ b/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.json @@ -41,6 +41,7 @@ "fieldname": "disbursed_amount", "fieldtype": "Currency", "label": "Disbursed Amount", + "non_negative": 1, "options": "Company:company:default_currency", "reqd": 1 }, @@ -130,7 +131,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2020-10-16 10:04:26.229216", + "modified": "2020-11-06 10:04:30.882322", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Disbursement", diff --git a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.json b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.json index 60b20369dc..2b5df4be24 100644 --- a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.json +++ b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.json @@ -108,6 +108,7 @@ "fieldname": "amount_paid", "fieldtype": "Currency", "label": "Amount Paid", + "non_negative": 1, "options": "Company:company:default_currency", "reqd": 1 }, @@ -230,7 +231,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2020-10-10 03:49:01.827593", + "modified": "2020-11-05 10:06:58.792841", "modified_by": "Administrator", "module": "Loan Management", "name": "Loan Repayment", diff --git a/erpnext/loan_management/doctype/pledge/pledge.json b/erpnext/loan_management/doctype/pledge/pledge.json index f22a21e3be..801e3a3117 100644 --- a/erpnext/loan_management/doctype/pledge/pledge.json +++ b/erpnext/loan_management/doctype/pledge/pledge.json @@ -1,4 +1,5 @@ { + "actions": [], "creation": "2019-09-09 17:06:16.756573", "doctype": "DocType", "editable_grid": 1, @@ -49,7 +50,8 @@ "fieldname": "qty", "fieldtype": "Float", "in_list_view": 1, - "label": "Quantity" + "label": "Quantity", + "non_negative": 1 }, { "fieldname": "loan_security_price", @@ -86,7 +88,8 @@ } ], "istable": 1, - "modified": "2019-12-03 10:59:58.001421", + "links": [], + "modified": "2020-11-05 10:07:15.424937", "modified_by": "Administrator", "module": "Loan Management", "name": "Pledge", diff --git a/erpnext/loan_management/doctype/proposed_pledge/proposed_pledge.json b/erpnext/loan_management/doctype/proposed_pledge/proposed_pledge.json index aee7c2ced5..3e7e778a25 100644 --- a/erpnext/loan_management/doctype/proposed_pledge/proposed_pledge.json +++ b/erpnext/loan_management/doctype/proposed_pledge/proposed_pledge.json @@ -1,4 +1,5 @@ { + "actions": [], "creation": "2019-08-29 22:29:37.628178", "doctype": "DocType", "editable_grid": 1, @@ -39,7 +40,8 @@ "fieldname": "qty", "fieldtype": "Float", "in_list_view": 1, - "label": "Quantity" + "label": "Quantity", + "non_negative": 1 }, { "fieldname": "loan_security", @@ -56,8 +58,10 @@ "read_only": 1 } ], + "index_web_pages_for_search": 1, "istable": 1, - "modified": "2019-12-02 10:23:11.498308", + "links": [], + "modified": "2020-11-05 10:07:37.542344", "modified_by": "Administrator", "module": "Loan Management", "name": "Proposed Pledge", diff --git a/erpnext/loan_management/doctype/unpledge/unpledge.json b/erpnext/loan_management/doctype/unpledge/unpledge.json index ee192d7377..00356685eb 100644 --- a/erpnext/loan_management/doctype/unpledge/unpledge.json +++ b/erpnext/loan_management/doctype/unpledge/unpledge.json @@ -52,6 +52,7 @@ "fieldtype": "Float", "in_list_view": 1, "label": "Quantity", + "non_negative": 1, "reqd": 1 }, { @@ -62,9 +63,10 @@ "read_only": 1 } ], + "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2020-05-06 10:50:18.448552", + "modified": "2020-11-05 10:07:28.106961", "modified_by": "Administrator", "module": "Loan Management", "name": "Unpledge",