From d261d40c7ea708de6db19ec84c3760ff0e68c922 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 8 Aug 2016 14:44:42 +0530 Subject: [PATCH] Fixed test cases for period closing voucher --- .../period_closing_voucher/test_period_closing_voucher.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py index 6f5a663e49..d68e29157b 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py @@ -55,9 +55,8 @@ class TestPeriodClosingVoucher(unittest.TestCase): if random_expense_account: # Check posted value for teh above random_expense_account gle_for_random_expense_account = frappe.db.sql(""" - select debit - credit as amount, - debit_in_account_currency - credit_in_account_currency - as amount_in_account_currency + select sum(debit - credit) as amount, + sum(debit_in_account_currency - credit_in_account_currency) as amount_in_account_currency from `tabGL Entry` where voucher_type='Period Closing Voucher' and voucher_no=%s and account =%s""", (pcv.name, random_expense_account[0].account), as_dict=True)