From c0846eac191fce4288683689034955832ae14ae7 Mon Sep 17 00:00:00 2001 From: Barathpalanisamy Date: Tue, 28 Jan 2025 19:31:08 +0530 Subject: [PATCH] fix: payment entry function change --- erpnext/selling/doctype/sales_order/test_sales_order.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index ff1dbae43ce9..7ec1a7487672 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -5431,6 +5431,7 @@ def test_so_with_item_tax_creating_double_entries_with_2payment_TC_S_098(self): def test_so_to_si_with_loyalty_point_creating_payment_TC_S_108(self): from erpnext.accounts.doctype.loyalty_program.loyalty_program import get_loyalty_program_details_with_points + from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry make_stock_entry(item_code="_Test Item", qty=10, rate=5000, target="_Test Warehouse - _TC") so = make_sales_order(qty=4,rate=5000) @@ -5467,7 +5468,10 @@ def test_so_to_si_with_loyalty_point_creating_payment_TC_S_108(self): si.submit() self.assertEqual(si.status, "Partly Paid") - pe=self.create_and_submit_payment_entry(dt="Sales Invoice", dn=si.name) + pe = get_payment_entry(dt="Sales Invoice",dn=si.name) + pe.save() + pe.submit() + self.assertEqual(pe.status, 'Submitted') si.reload() self.assertEqual(si.status, "Paid")