test(Payment Entry): account type is set (backport #47071) (#47073)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2025-04-14 19:26:11 +02:00
committed by GitHub
parent 8e02a9bc28
commit c77f7f4ff0

View File

@@ -49,6 +49,8 @@ class TestPaymentEntry(FrappeTestCase):
pe.insert()
pe.submit()
self.assertEqual(pe.paid_to_account_type, "Cash")
expected_gle = dict(
(d[0], d) for d in [["Debtors - _TC", 0, 1000, so.name], ["_Test Cash - _TC", 1000.0, 0, None]]
)
@@ -560,6 +562,8 @@ class TestPaymentEntry(FrappeTestCase):
pe.insert()
pe.submit()
self.assertEqual(pe.paid_from_account_type, "Bank")
outstanding_amount, status = frappe.db.get_value(
"Purchase Invoice", pi.name, ["outstanding_amount", "status"]
)