[fix] process payroll
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index 8728ac9..bcdf9fc 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -168,7 +168,11 @@
field = frappe.scrub(parenttype)
condition = ""
if args.get(field):
- lft, rgt = frappe.db.get_value(parenttype, args[field], ["lft", "rgt"])
+ try:
+ lft, rgt = frappe.db.get_value(parenttype, args[field], ["lft", "rgt"])
+ except TypeError:
+ frappe.throw(_("Invalid {0}").format(args[field]))
+
parent_groups = frappe.db.sql_list("""select name from `tab%s`
where lft<=%s and rgt>=%s""" % (parenttype, '%s', '%s'), (lft, rgt))
diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.py b/erpnext/hr/doctype/process_payroll/process_payroll.py
index 4900bd0..3658e65 100644
--- a/erpnext/hr/doctype/process_payroll/process_payroll.py
+++ b/erpnext/hr/doctype/process_payroll/process_payroll.py
@@ -196,11 +196,11 @@
journal_entry.set("accounts", [
{
"account": salary_account,
- "debit": amount
+ "debit_in_account_currency": amount
},
{
"account": default_bank_account,
- "credit": amount
+ "credit_in_account_currency": amount
},
])