feat: add account field in payment order
diff --git a/erpnext/accounts/doctype/payment_order/payment_order.js b/erpnext/accounts/doctype/payment_order/payment_order.js
index 91d7f1f..fd122a3 100644
--- a/erpnext/accounts/doctype/payment_order/payment_order.js
+++ b/erpnext/accounts/doctype/payment_order/payment_order.js
@@ -41,6 +41,8 @@
 	},
 
 	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 @@
 			get_query_filters: {
 				bank: frm.doc.bank,
 				docstatus: 1,
+				bank_account: frm.doc.company_bank_account,
+				paid_from: frm.doc.account,
 				status: ["=", "Initiated"],
 			}
 		});
diff --git a/erpnext/accounts/doctype/payment_order/payment_order.json b/erpnext/accounts/doctype/payment_order/payment_order.json
index c0dd4bc..2e12ad3 100644
--- a/erpnext/accounts/doctype/payment_order/payment_order.json
+++ b/erpnext/accounts/doctype/payment_order/payment_order.json
@@ -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",