fix: removed account type filter on employee advance account

This commit is contained in:
Nabin Hait 2019-02-08 16:53:02 +05:30
parent 27af6b377f
commit e3b0f4f9f6
2 changed files with 2 additions and 3 deletions

View File

@ -171,7 +171,7 @@ class PaymentEntry(AccountsController):
if not frappe.db.exists(self.party_type, self.party):
frappe.throw(_("Invalid {0}: {1}").format(self.party_type, self.party))
if self.party_account:
if self.party_account and self.party_type in ("Customer", "Supplier"):
self.validate_account_type(self.party_account,
[erpnext.get_party_account_type(self.party_type)])
@ -689,7 +689,7 @@ def get_party_details(company, party_type, party, date, cost_center=None):
account_currency = get_account_currency(party_account)
account_balance = get_balance_on(party_account, date, cost_center=cost_center)
_party_name = "title" if party_type == "Student" else party_type.lower() + "_name"
_party_name = "title" if party_type in ("Student", "Shareholder") else party_type.lower() + "_name"
party_name = frappe.db.get_value(party_type, party, _party_name)
party_balance = get_balance_on(party_type=party_type, party=party, cost_center=cost_center)
if party_type in ["Customer", "Supplier"]:

View File

@ -19,7 +19,6 @@ frappe.ui.form.on('Employee Advance', {
filters: {
"root_type": "Asset",
"is_group": 0,
"account_type": "Payable",
"company": frm.doc.company
}
};