Skip to content

Commit

Permalink
refactor(test): ensure Exchange gain/loss journals aren't created
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Mar 18, 2024
1 parent 3d5dba6 commit e1c2d00
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,17 @@ def test_no_difference_amount_for_base_currency_accounts(self):
self.assertEqual(pr.allocation[0].allocated_amount, 85)
self.assertEqual(pr.allocation[0].difference_amount, 0)

pr.reconcile()
si.reload()
self.assertEqual(si.outstanding_amount, 0)
# No Exchange Gain/Loss journal should be generated
exc_gain_loss_journals = frappe.db.get_all(
"Journal Entry Account",
filters={"reference_type": si.doctype, "reference_name": si.name, "docstatus": 1},
fields=["parent"],
)
self.assertEqual(exc_gain_loss_journals, [])

def test_reconciliation_purchase_invoice_against_return(self):
self.supplier = "_Test Supplier USD"
pi = self.create_purchase_invoice(qty=5, rate=50, do_not_submit=True)
Expand Down

0 comments on commit e1c2d00

Please sign in to comment.