mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
refactor(test): use get_party_account for reference details section
(cherry picked from commit cb2529cec8)
This commit is contained in:
@@ -1070,6 +1070,8 @@ class TestPaymentEntry(FrappeTestCase):
|
|||||||
self.assertRaises(frappe.ValidationError, pe_draft.submit)
|
self.assertRaises(frappe.ValidationError, pe_draft.submit)
|
||||||
|
|
||||||
def test_details_update_on_reference_table(self):
|
def test_details_update_on_reference_table(self):
|
||||||
|
from erpnext.accounts.party import get_party_account
|
||||||
|
|
||||||
so = make_sales_order(
|
so = make_sales_order(
|
||||||
customer="_Test Customer USD", currency="USD", qty=1, rate=100, do_not_submit=True
|
customer="_Test Customer USD", currency="USD", qty=1, rate=100, do_not_submit=True
|
||||||
)
|
)
|
||||||
@@ -1084,7 +1086,7 @@ class TestPaymentEntry(FrappeTestCase):
|
|||||||
|
|
||||||
ref_details = get_reference_details(so.doctype, so.name, pe.paid_from_account_currency)
|
ref_details = get_reference_details(so.doctype, so.name, pe.paid_from_account_currency)
|
||||||
expected_response = {
|
expected_response = {
|
||||||
"account": pe.paid_from,
|
"account": get_party_account("Customer", so.customer, so.company),
|
||||||
"total_amount": 5000.0,
|
"total_amount": 5000.0,
|
||||||
"outstanding_amount": 5000.0,
|
"outstanding_amount": 5000.0,
|
||||||
"exchange_rate": 1.0,
|
"exchange_rate": 1.0,
|
||||||
|
|||||||
Reference in New Issue
Block a user