mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 06:29:20 +00:00
chore: validation on multi-currency tran on company curtency account
(cherry picked from commit 8f9ef4ef5b)
This commit is contained in:
@@ -1136,10 +1136,11 @@ class TestPaymentEntry(FrappeTestCase):
|
|||||||
|
|
||||||
si3.reload()
|
si3.reload()
|
||||||
pe = get_payment_entry(si3.doctype, si3.name).save()
|
pe = get_payment_entry(si3.doctype, si3.name).save()
|
||||||
# Allocated amount should be according to the payment schedule
|
# Allocated amount should be equal to payment term outstanding
|
||||||
for idx, schedule in enumerate(si3.payment_schedule):
|
self.assertEqual(len(pe.references), 2)
|
||||||
|
for idx, ref in enumerate(pe.references):
|
||||||
with self.subTest(idx=idx):
|
with self.subTest(idx=idx):
|
||||||
self.assertEqual(flt(schedule.base_payment_amount), flt(pe.references[idx].allocated_amount))
|
self.assertEqual(ref.payment_term_outstanding, ref.allocated_amount)
|
||||||
pe.save()
|
pe.save()
|
||||||
|
|
||||||
# Overallocation validation should trigger
|
# Overallocation validation should trigger
|
||||||
|
|||||||
Reference in New Issue
Block a user