Skip to content

Commit

Permalink
test: test case for a purchase invoice to check status is paid after …
Browse files Browse the repository at this point in the history
…adding the advance payment
  • Loading branch information
bansodegaurav8848 committed Jan 10, 2025
1 parent 629c42f commit 67386e5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2977,6 +2977,22 @@ def test_invoice_status_on_payment_entry_submit_TC_B_035_and_TC_B_037(self):
pi_status_after_reconcile = frappe.db.get_value("Purchase Invoice", pi.name, "status")
self.assertEqual(pi_status_after_reconcile, "Unpaid")

new_pi = make_purchase_invoice(
qty=1,
item_code="_Test Item",
supplier = "_Test Supplier",
company = "_Test Company",
rate = 30,
do_not_save =True,
)
new_pi.save()
new_pi.set_advances()
new_pi.save()
new_pi.submit()

pi_status_after_advances = frappe.db.get_value("Purchase Invoice", new_pi.name, "status")
self.assertEqual(pi_status_after_advances, "Paid")

def test_partly_paid_of_pi_to_pr_to_pe_TC_B_081(self):
from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_entry
pi = make_purchase_invoice(
Expand Down

0 comments on commit 67386e5

Please sign in to comment.