feat: filter bank from company account
This commit is contained in:
parent
e8bea2e936
commit
b8d0dec7f5
@ -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() {
|
frm.set_query("contact_person", function() {
|
||||||
if (frm.doc.party) {
|
if (frm.doc.party) {
|
||||||
return {
|
return {
|
||||||
|
@ -2,6 +2,15 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Payment Order', {
|
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) {
|
refresh: function(frm) {
|
||||||
if (frm.doc.docstatus == 0) {
|
if (frm.doc.docstatus == 0) {
|
||||||
frm.add_custom_button(__('Payment Request'), function() {
|
frm.add_custom_button(__('Payment Request'), function() {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
"column_break_2",
|
"column_break_2",
|
||||||
"posting_date",
|
"posting_date",
|
||||||
"bank",
|
"bank",
|
||||||
"bank_account",
|
"company_bank_account",
|
||||||
"section_break_5",
|
"section_break_5",
|
||||||
"references",
|
"references",
|
||||||
"amended_from"
|
"amended_from"
|
||||||
@ -80,21 +80,21 @@
|
|||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "bank_account",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"label": "Bank Account",
|
|
||||||
"options": "Bank Account"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname": "payment_order_type",
|
"fieldname": "payment_order_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "Payment Order Type",
|
"label": "Payment Order Type",
|
||||||
"options": "\nPayment Request\nPayment Entry"
|
"options": "\nPayment Request\nPayment Entry"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "company_bank_account",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Company Bank Account",
|
||||||
|
"options": "Bank Account"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2019-05-06 16:40:11.397341",
|
"modified": "2019-05-06 19:57:03.661653",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Order",
|
"name": "Payment Order",
|
||||||
|
Loading…
Reference in New Issue
Block a user