From 6f84cee6feb1f2160bd1b48a6e4f45f8ee9cf952 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 21 May 2021 11:15:18 +0530 Subject: [PATCH] fix: Uncommentt test --- .../purchase_invoice/test_purchase_invoice.py | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index aa56ddfdf3..e71a416f3d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -991,30 +991,30 @@ class TestPurchaseInvoice(unittest.TestCase): self.assertEqual(expected_gle[i][1], gle.debit) self.assertEqual(expected_gle[i][2], gle.credit) - # Create Purchase Invoice against Purchase Order - # purchase_invoice = get_mapped_purchase_invoice(po.name) - # purchase_invoice.allocate_advances_automatically = 1 - # purchase_invoice.save() - # purchase_invoice.submit() + Create Purchase Invoice against Purchase Order + purchase_invoice = get_mapped_purchase_invoice(po.name) + purchase_invoice.allocate_advances_automatically = 1 + purchase_invoice.save() + purchase_invoice.submit() - # # Check GLE for Purchase Invoice - # # Zero net effect on final TDS Payable on invoice - # expected_gle = [ - # ['_Test Account Excise Duty - _TC', 0, 6000], - # ['Cost of Goods Sold - _TC', 30000, 0], - # ['Creditors - _TC', 0, 24000], - # ['TDS Payable - _TC', 6000, 6000], - # ] + # Check GLE for Purchase Invoice + # Zero net effect on final TDS Payable on invoice + expected_gle = [ + ['_Test Account Excise Duty - _TC', 0, 6000], + ['Cost of Goods Sold - _TC', 30000, 0], + ['Creditors - _TC', 0, 24000], + ['TDS Payable - _TC', 6000, 6000], + ] - # gl_entries = frappe.db.sql("""select account, debit, credit - # from `tabGL Entry` - # where voucher_type='Purchase Invoice' and voucher_no=%s - # order by account asc""", (purchase_invoice.name), as_dict=1) + gl_entries = frappe.db.sql("""select account, debit, credit + from `tabGL Entry` + where voucher_type='Purchase Invoice' and voucher_no=%s + order by account asc""", (purchase_invoice.name), as_dict=1) - # for i, gle in enumerate(gl_entries): - # self.assertEqual(expected_gle[i][0], gle.account) - # self.assertEqual(expected_gle[i][1], gle.debit) - # self.assertEqual(expected_gle[i][2], gle.credit) + for i, gle in enumerate(gl_entries): + self.assertEqual(expected_gle[i][0], gle.account) + self.assertEqual(expected_gle[i][1], gle.debit) + self.assertEqual(expected_gle[i][2], gle.credit) def update_tax_witholding_category(company, account, date): from erpnext.accounts.utils import get_fiscal_year