feat: filter bank from company account

This commit is contained in:
Mangesh-Khairnar 2019-05-07 11:29:20 +05:30
parent e8bea2e936
commit b8d0dec7f5
3 changed files with 24 additions and 8 deletions

View File

@ -30,6 +30,13 @@ frappe.ui.form.on('Payment Entry', {
}
}
});
frm.set_query("bank_account", function() {
return {
filters: {
"is_company_account":0
}
}
});
frm.set_query("contact_person", function() {
if (frm.doc.party) {
return {

View File

@ -2,6 +2,15 @@
// For license information, please see license.txt
frappe.ui.form.on('Payment Order', {
setup: function(frm) {
frm.set_query("company_bank_account", function() {
return {
filters: {
"is_company_account":1
}
}
});
},
refresh: function(frm) {
if (frm.doc.docstatus == 0) {
frm.add_custom_button(__('Payment Request'), function() {

View File

@ -12,7 +12,7 @@
"column_break_2",
"posting_date",
"bank",
"bank_account",
"company_bank_account",
"section_break_5",
"references",
"amended_from"
@ -80,21 +80,21 @@
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "bank_account",
"fieldtype": "Link",
"label": "Bank Account",
"options": "Bank Account"
},
{
"fieldname": "payment_order_type",
"fieldtype": "Select",
"label": "Payment Order Type",
"options": "\nPayment Request\nPayment Entry"
},
{
"fieldname": "company_bank_account",
"fieldtype": "Link",
"label": "Company Bank Account",
"options": "Bank Account"
}
],
"is_submittable": 1,
"modified": "2019-05-06 16:40:11.397341",
"modified": "2019-05-06 19:57:03.661653",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Order",