Skip to content

Commit

Permalink
fix: payment entry function change
Browse files Browse the repository at this point in the history
  • Loading branch information
Barathpalanisamy committed Jan 28, 2025
1 parent 2a613df commit c0846ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion erpnext/selling/doctype/sales_order/test_sales_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit c0846ea

Please sign in to comment.