Skip to content

Commit

Permalink
test: fix failing test case in AR report
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Dec 30, 2022
1 parent 64ca317 commit e97667b
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,9 @@ def test_exchange_revaluation_for_party(self):
err = err.save().submit()

# Submit JV for ERR
jv = frappe.get_doc(err.make_jv_entry())
jv = jv.save()
for x in jv.accounts:
x.cost_center = get_default_cost_center(jv.company)
jv.submit()
err_journals = err.make_jv_entries()
je = frappe.get_doc("Journal Entry", err_journals.get("revaluation_jv"))
je = je.submit()

filters = {
"company": company,
Expand All @@ -201,7 +199,7 @@ def test_exchange_revaluation_for_party(self):
report = execute(filters)

expected_data_for_err = [0, -5, 0, 5]
row = [x for x in report[1] if x.voucher_type == jv.doctype and x.voucher_no == jv.name][0]
row = [x for x in report[1] if x.voucher_type == je.doctype and x.voucher_no == je.name][0]
self.assertEqual(
expected_data_for_err,
[
Expand Down

0 comments on commit e97667b

Please sign in to comment.