fix: Description for various fields
This commit is contained in:
parent
58f02e7c10
commit
513099d624
@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Loan",
|
"label": "Loan",
|
||||||
"links": "[\n {\n \"description\": \"Loan Type for interest and penalty rates\",\n \"label\": \"Loan Type\",\n \"name\": \"Loan Type\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Loan Applications from customers and employees.\",\n \"label\": \"Loan Application\",\n \"name\": \"Loan Application\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Loans provided to customers and employees.\",\n \"label\": \"Loan\",\n \"name\": \"Loan\",\n \"type\": \"doctype\"\n }\n]"
|
"links": "[\n {\n \"description\": \"Loan Type for interest and penalty rates\",\n \"label\": \"Loan Type\",\n \"name\": \"Loan Type\",\n \"type\": \"doctype\"\n },\n {\n \"description\": \"Loan Applications from customers and employees.\",\n \"label\": \"Loan Application\",\n \"name\": \"Loan Application\",\n \"type\": \"doctype\"\n },\n { \"dependencies\": [\n \"Loan Type\"\n ],\n \"description\": \"Loans provided to customers and employees.\",\n \"label\": \"Loan\",\n \"name\": \"Loan\",\n \"type\": \"doctype\"\n }\n]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -37,7 +37,7 @@
|
|||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"label": "Loan Management",
|
"label": "Loan Management",
|
||||||
"modified": "2020-04-02 11:28:51.380509",
|
"modified": "2020-05-16 08:01:27.784621",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Loan Management",
|
"module": "Loan Management",
|
||||||
"name": "Loan Management",
|
"name": "Loan Management",
|
||||||
|
|||||||
@ -112,16 +112,19 @@ frappe.ui.form.on('Loan Application', {
|
|||||||
frappe.ui.form.on("Proposed Pledge", {
|
frappe.ui.form.on("Proposed Pledge", {
|
||||||
loan_security: function(frm, cdt, cdn) {
|
loan_security: function(frm, cdt, cdn) {
|
||||||
let row = locals[cdt][cdn];
|
let row = locals[cdt][cdn];
|
||||||
frappe.call({
|
|
||||||
method: "erpnext.loan_management.doctype.loan_security_price.loan_security_price.get_loan_security_price",
|
if (row.loan_security) {
|
||||||
args: {
|
frappe.call({
|
||||||
loan_security: row.loan_security
|
method: "erpnext.loan_management.doctype.loan_security_price.loan_security_price.get_loan_security_price",
|
||||||
},
|
args: {
|
||||||
callback: function(r) {
|
loan_security: row.loan_security
|
||||||
frappe.model.set_value(cdt, cdn, 'loan_security_price', r.message);
|
},
|
||||||
frm.events.calculate_amounts(frm, cdt, cdn);
|
callback: function(r) {
|
||||||
}
|
frappe.model.set_value(cdt, cdn, 'loan_security_price', r.message);
|
||||||
})
|
frm.events.calculate_amounts(frm, cdt, cdn);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
amount: function(frm, cdt, cdn) {
|
amount: function(frm, cdt, cdn) {
|
||||||
|
|||||||
@ -19,8 +19,8 @@ class LoanInterestAccrual(AccountsController):
|
|||||||
if not self.posting_date:
|
if not self.posting_date:
|
||||||
self.posting_date = nowdate()
|
self.posting_date = nowdate()
|
||||||
|
|
||||||
if not self.interest_amount:
|
if not self.interest_amount and not self.payable_principal_amount:
|
||||||
frappe.throw(_("Interest Amount is mandatory"))
|
frappe.throw(_("Interest Amount or Principal Amount is mandatory"))
|
||||||
|
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
@ -38,37 +38,38 @@ class LoanInterestAccrual(AccountsController):
|
|||||||
def make_gl_entries(self, cancel=0, adv_adj=0):
|
def make_gl_entries(self, cancel=0, adv_adj=0):
|
||||||
gle_map = []
|
gle_map = []
|
||||||
|
|
||||||
gle_map.append(
|
if self.interest_amount:
|
||||||
self.get_gl_dict({
|
gle_map.append(
|
||||||
"account": self.loan_account,
|
self.get_gl_dict({
|
||||||
"party_type": self.applicant_type,
|
"account": self.loan_account,
|
||||||
"party": self.applicant,
|
"party_type": self.applicant_type,
|
||||||
"against": self.interest_income_account,
|
"party": self.applicant,
|
||||||
"debit": self.interest_amount,
|
"against": self.interest_income_account,
|
||||||
"debit_in_account_currency": self.interest_amount,
|
"debit": self.interest_amount,
|
||||||
"against_voucher_type": "Loan",
|
"debit_in_account_currency": self.interest_amount,
|
||||||
"against_voucher": self.loan,
|
"against_voucher_type": "Loan",
|
||||||
"remarks": _("Against Loan:") + self.loan,
|
"against_voucher": self.loan,
|
||||||
"cost_center": erpnext.get_default_cost_center(self.company),
|
"remarks": _("Against Loan:") + self.loan,
|
||||||
"posting_date": self.posting_date
|
"cost_center": erpnext.get_default_cost_center(self.company),
|
||||||
})
|
"posting_date": self.posting_date
|
||||||
)
|
})
|
||||||
|
)
|
||||||
|
|
||||||
gle_map.append(
|
gle_map.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
"account": self.interest_income_account,
|
"account": self.interest_income_account,
|
||||||
"party_type": self.applicant_type,
|
"party_type": self.applicant_type,
|
||||||
"party": self.applicant,
|
"party": self.applicant,
|
||||||
"against": self.loan_account,
|
"against": self.loan_account,
|
||||||
"credit": self.interest_amount,
|
"credit": self.interest_amount,
|
||||||
"credit_in_account_currency": self.interest_amount,
|
"credit_in_account_currency": self.interest_amount,
|
||||||
"against_voucher_type": "Loan",
|
"against_voucher_type": "Loan",
|
||||||
"against_voucher": self.loan,
|
"against_voucher": self.loan,
|
||||||
"remarks": _("Against Loan:") + self.loan,
|
"remarks": _("Against Loan:") + self.loan,
|
||||||
"cost_center": erpnext.get_default_cost_center(self.company),
|
"cost_center": erpnext.get_default_cost_center(self.company),
|
||||||
"posting_date": self.posting_date
|
"posting_date": self.posting_date
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
if gle_map:
|
if gle_map:
|
||||||
make_gl_entries(gle_map, cancel=cancel, adv_adj=adv_adj)
|
make_gl_entries(gle_map, cancel=cancel, adv_adj=adv_adj)
|
||||||
|
|||||||
@ -173,7 +173,7 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "references_section",
|
"fieldname": "references_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "References"
|
"label": "Payment References"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "reference_number",
|
"fieldname": "reference_number",
|
||||||
@ -221,7 +221,7 @@
|
|||||||
],
|
],
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-04-16 18:14:45.166754",
|
"modified": "2020-05-16 09:40:15.581165",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Loan Management",
|
"module": "Loan Management",
|
||||||
"name": "Loan Repayment",
|
"name": "Loan Repayment",
|
||||||
|
|||||||
@ -22,16 +22,19 @@ frappe.ui.form.on('Loan Security Pledge', {
|
|||||||
frappe.ui.form.on("Pledge", {
|
frappe.ui.form.on("Pledge", {
|
||||||
loan_security: function(frm, cdt, cdn) {
|
loan_security: function(frm, cdt, cdn) {
|
||||||
let row = locals[cdt][cdn];
|
let row = locals[cdt][cdn];
|
||||||
frappe.call({
|
|
||||||
method: "erpnext.loan_management.doctype.loan_security_price.loan_security_price.get_loan_security_price",
|
if (row.loan_security) {
|
||||||
args: {
|
frappe.call({
|
||||||
loan_security: row.loan_security
|
method: "erpnext.loan_management.doctype.loan_security_price.loan_security_price.get_loan_security_price",
|
||||||
},
|
args: {
|
||||||
callback: function(r) {
|
loan_security: row.loan_security
|
||||||
frappe.model.set_value(cdt, cdn, 'loan_security_price', r.message);
|
},
|
||||||
frm.events.calculate_amounts(frm, cdt, cdn);
|
callback: function(r) {
|
||||||
}
|
frappe.model.set_value(cdt, cdn, 'loan_security_price', r.message);
|
||||||
});
|
frm.events.calculate_amounts(frm, cdt, cdn);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
qty: function(frm, cdt, cdn) {
|
qty: function(frm, cdt, cdn) {
|
||||||
|
|||||||
@ -29,6 +29,7 @@
|
|||||||
"unique": 1
|
"unique": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"description": "Haircut percentage is the percentage difference between market value of the Loan Security and the value ascribed to that Loan Security when used as collateral for that loan.",
|
||||||
"fieldname": "haircut",
|
"fieldname": "haircut",
|
||||||
"fieldtype": "Percent",
|
"fieldtype": "Percent",
|
||||||
"label": "Haircut %"
|
"label": "Haircut %"
|
||||||
@ -46,13 +47,14 @@
|
|||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"description": "Loan To Value Ratio expresses the ratio of the loan amount to the value of the security pledged. A loan security shortfall will be triggered if this falls below the specified value for any loan ",
|
||||||
"fieldname": "loan_to_value_ratio",
|
"fieldname": "loan_to_value_ratio",
|
||||||
"fieldtype": "Percent",
|
"fieldtype": "Percent",
|
||||||
"label": "Loan To Value Ratio"
|
"label": "Loan To Value Ratio"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-04-28 14:06:49.046177",
|
"modified": "2020-05-16 09:38:45.988080",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Loan Management",
|
"module": "Loan Management",
|
||||||
"name": "Loan Security Type",
|
"name": "Loan Security Type",
|
||||||
|
|||||||
@ -75,6 +75,7 @@
|
|||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"description": "This account is used for booking loan repayments from the borrower and also disbursing loans to the borrower",
|
||||||
"fieldname": "payment_account",
|
"fieldname": "payment_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Payment Account",
|
"label": "Payment Account",
|
||||||
@ -82,6 +83,7 @@
|
|||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"description": "This account is capital account which is used to allocate capital for loan disbursal account ",
|
||||||
"fieldname": "loan_account",
|
"fieldname": "loan_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Loan Account",
|
"label": "Loan Account",
|
||||||
@ -93,6 +95,7 @@
|
|||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"description": "This account will be used for booking loan interest accruals",
|
||||||
"fieldname": "interest_income_account",
|
"fieldname": "interest_income_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Interest Income Account",
|
"label": "Interest Income Account",
|
||||||
@ -100,6 +103,7 @@
|
|||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"description": "This account will be used for booking penalties levied due to delayed repayments",
|
||||||
"fieldname": "penalty_income_account",
|
"fieldname": "penalty_income_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Penalty Income Account",
|
"label": "Penalty Income Account",
|
||||||
@ -108,6 +112,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
|
"description": "If this is not checked the loan by default will be considered as a Demand Loan",
|
||||||
"fieldname": "is_term_loan",
|
"fieldname": "is_term_loan",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Is Term Loan"
|
"label": "Is Term Loan"
|
||||||
@ -143,7 +148,7 @@
|
|||||||
],
|
],
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-04-15 00:24:43.259963",
|
"modified": "2020-05-16 09:08:09.029921",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Loan Management",
|
"module": "Loan Management",
|
||||||
"name": "Loan Type",
|
"name": "Loan Type",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user