mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 19:49:18 +00:00
test: correctly trigger po payment request ["Outward"] (fails)
This commit is contained in:
@@ -1127,10 +1127,17 @@ class TestPurchaseOrder(FrappeTestCase):
|
|||||||
po = create_purchase_order()
|
po = create_purchase_order()
|
||||||
self.assertEqual(frappe.db.get_value(po.doctype, po.name, "advance_payment_status"), "Not Initiated")
|
self.assertEqual(frappe.db.get_value(po.doctype, po.name, "advance_payment_status"), "Not Initiated")
|
||||||
|
|
||||||
pr = make_payment_request(dt=po.doctype, dn=po.name, submit_doc=True, return_doc=True)
|
pr = make_payment_request(
|
||||||
|
dt=po.doctype, dn=po.name, submit_doc=True, return_doc=True, payment_request_type="Outward"
|
||||||
|
)
|
||||||
|
|
||||||
|
po.reload()
|
||||||
self.assertEqual(frappe.db.get_value(po.doctype, po.name, "advance_payment_status"), "Initiated")
|
self.assertEqual(frappe.db.get_value(po.doctype, po.name, "advance_payment_status"), "Initiated")
|
||||||
|
|
||||||
pe = get_payment_entry(po.doctype, po.name).save().submit()
|
pe = get_payment_entry(po.doctype, po.name).save().submit()
|
||||||
|
|
||||||
|
pr.reload()
|
||||||
|
self.assertEqual(pr.status, "Paid")
|
||||||
self.assertEqual(frappe.db.get_value(po.doctype, po.name, "advance_payment_status"), "Fully Paid")
|
self.assertEqual(frappe.db.get_value(po.doctype, po.name, "advance_payment_status"), "Fully Paid")
|
||||||
|
|
||||||
pe.reload()
|
pe.reload()
|
||||||
|
|||||||
Reference in New Issue
Block a user