fix: Loan Security name fetch

This commit is contained in:
Deepesh Garg 2021-01-17 18:38:21 +05:30
parent dd25ecb70d
commit 2cb12e6f70
5 changed files with 39 additions and 6 deletions

View File

@ -321,7 +321,7 @@ class TestLoan(unittest.TestCase):
self.assertEquals(sum(pledged_qty.values()), 0) self.assertEquals(sum(pledged_qty.values()), 0)
amounts = amounts = calculate_amounts(loan.name, add_days(last_date, 5)) amounts = amounts = calculate_amounts(loan.name, add_days(last_date, 5))
self.assertTrue(amounts['pending_principal_amount'] < 0) self.assertEqual(amounts['pending_principal_amount'], 0)
self.assertEquals(amounts['payable_principal_amount'], 0.0) self.assertEquals(amounts['payable_principal_amount'], 0.0)
self.assertEqual(amounts['interest_amount'], 0) self.assertEqual(amounts['interest_amount'], 0)
@ -473,7 +473,7 @@ class TestLoan(unittest.TestCase):
self.assertEquals(loan.status, "Loan Closure Requested") self.assertEquals(loan.status, "Loan Closure Requested")
amounts = calculate_amounts(loan.name, add_days(last_date, 5)) amounts = calculate_amounts(loan.name, add_days(last_date, 5))
self.assertTrue(amounts['pending_principal_amount'] < 0.0) self.assertEqual(amounts['pending_principal_amount'], 0.0)
def test_partial_unaccrued_interest_payment(self): def test_partial_unaccrued_interest_payment(self):
pledge = [{ pledge = [{

View File

@ -7,6 +7,7 @@
"engine": "InnoDB", "engine": "InnoDB",
"field_order": [ "field_order": [
"loan_security", "loan_security",
"loan_security_name",
"loan_security_type", "loan_security_type",
"column_break_2", "column_break_2",
"uom", "uom",
@ -79,10 +80,18 @@
"label": "Loan Security Type", "label": "Loan Security Type",
"options": "Loan Security Type", "options": "Loan Security Type",
"read_only": 1 "read_only": 1
},
{
"fetch_from": "loan_security.loan_security_name",
"fieldname": "loan_security_name",
"fieldtype": "Data",
"label": "Loan Security Name",
"read_only": 1
} }
], ],
"index_web_pages_for_search": 1,
"links": [], "links": [],
"modified": "2020-06-11 03:41:33.900340", "modified": "2021-01-17 07:41:49.598086",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Loan Management", "module": "Loan Management",
"name": "Loan Security Price", "name": "Loan Security Price",

View File

@ -6,6 +6,7 @@
"engine": "InnoDB", "engine": "InnoDB",
"field_order": [ "field_order": [
"loan_security", "loan_security",
"loan_security_name",
"loan_security_type", "loan_security_type",
"loan_security_code", "loan_security_code",
"uom", "uom",
@ -85,11 +86,18 @@
"label": "Post Haircut Amount", "label": "Post Haircut Amount",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"read_only": 1 "read_only": 1
},
{
"fetch_from": "loan_security.loan_security_name",
"fieldname": "loan_security_name",
"fieldtype": "Data",
"label": "Loan Security Name",
"read_only": 1
} }
], ],
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2020-11-05 10:07:15.424937", "modified": "2021-01-17 07:41:12.452514",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Loan Management", "module": "Loan Management",
"name": "Pledge", "name": "Pledge",

View File

@ -6,6 +6,7 @@
"engine": "InnoDB", "engine": "InnoDB",
"field_order": [ "field_order": [
"loan_security", "loan_security",
"loan_security_name",
"qty", "qty",
"loan_security_price", "loan_security_price",
"amount", "amount",
@ -56,12 +57,19 @@
"label": "Post Haircut Amount", "label": "Post Haircut Amount",
"options": "Company:company:default_currency", "options": "Company:company:default_currency",
"read_only": 1 "read_only": 1
},
{
"fetch_from": "loan_security.loan_security_name",
"fieldname": "loan_security_name",
"fieldtype": "Data",
"label": "Loan Security Name",
"read_only": 1
} }
], ],
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2020-11-05 10:07:37.542344", "modified": "2021-01-17 07:29:01.671722",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Loan Management", "module": "Loan Management",
"name": "Proposed Pledge", "name": "Proposed Pledge",

View File

@ -6,6 +6,7 @@
"engine": "InnoDB", "engine": "InnoDB",
"field_order": [ "field_order": [
"loan_security", "loan_security",
"loan_security_name",
"loan_security_type", "loan_security_type",
"loan_security_code", "loan_security_code",
"haircut", "haircut",
@ -61,12 +62,19 @@
"fieldtype": "Percent", "fieldtype": "Percent",
"label": "Haircut", "label": "Haircut",
"read_only": 1 "read_only": 1
},
{
"fetch_from": "loan_security.loan_security_name",
"fieldname": "loan_security_name",
"fieldtype": "Data",
"label": "Loan Security Name",
"read_only": 1
} }
], ],
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2020-11-05 10:07:28.106961", "modified": "2021-01-17 07:36:20.212342",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Loan Management", "module": "Loan Management",
"name": "Unpledge", "name": "Unpledge",