feat: add account field in payment order

This commit is contained in:
Mangesh-Khairnar 2019-05-14 18:31:14 +05:30
parent 557419a745
commit c68ee1fcc6
2 changed files with 14 additions and 1 deletions

View File

@ -41,6 +41,8 @@ frappe.ui.form.on('Payment Order', {
},
remove_button: function(frm) {
// remove custom button of order type that is not imported
let label = ["Payment Request", "Payment Entry"]
if (frm.doc.references.length > 0 && frm.doc.payment_order_type) {
@ -65,6 +67,8 @@ frappe.ui.form.on('Payment Order', {
get_query_filters: {
bank: frm.doc.bank,
docstatus: 1,
bank_account: frm.doc.company_bank_account,
paid_from: frm.doc.account,
status: ["=", "Initiated"],
}
});

View File

@ -13,6 +13,7 @@
"posting_date",
"company_bank",
"company_bank_account",
"account",
"section_break_5",
"references",
"amended_from"
@ -90,16 +91,24 @@
"reqd": 1
},
{
"depends_on": "company_bank_account",
"fetch_from": "company_bank_account.bank",
"fieldname": "company_bank",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Bank",
"options": "Bank"
},
{
"depends_on": "company_bank_account",
"fetch_from": "company_bank_account.account",
"fieldname": "account",
"fieldtype": "Data",
"label": "Account"
}
],
"is_submittable": 1,
"modified": "2019-05-09 13:57:12.974008",
"modified": "2019-05-14 17:12:24.912666",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Order",