fix: Uncommentt test
This commit is contained in:
parent
b07f7d1b70
commit
6f84cee6fe
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user