Merge pull request #48148 from ruthra-kumar/fix_dormant_test_in_payment_request
chore: activate dormant test case in payment request
This commit is contained in:
@@ -788,29 +788,28 @@ class TestPaymentRequest(IntegrationTestCase):
|
|||||||
pr = make_payment_request(dt="Sales Invoice", dn=si.name, mute_email=1)
|
pr = make_payment_request(dt="Sales Invoice", dn=si.name, mute_email=1)
|
||||||
self.assertEqual(pr.grand_total, si.outstanding_amount)
|
self.assertEqual(pr.grand_total, si.outstanding_amount)
|
||||||
|
|
||||||
|
def test_partial_paid_invoice_with_submitted_payment_entry(self):
|
||||||
|
pi = make_purchase_invoice(currency="INR", qty=1, rate=5000)
|
||||||
|
pi.save()
|
||||||
|
pi.submit()
|
||||||
|
|
||||||
def test_partial_paid_invoice_with_submitted_payment_entry(self):
|
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
|
||||||
pi = make_purchase_invoice(currency="INR", qty=1, rate=5000)
|
pe.reference_no = "PURINV0001"
|
||||||
pi.save()
|
pe.reference_date = frappe.utils.nowdate()
|
||||||
pi.submit()
|
pe.paid_amount = 2500
|
||||||
|
pe.references[0].allocated_amount = 2500
|
||||||
|
pe.save()
|
||||||
|
pe.submit()
|
||||||
|
pe.cancel()
|
||||||
|
|
||||||
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
|
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
|
||||||
pe.reference_no = "PURINV0001"
|
pe.reference_no = "PURINV0002"
|
||||||
pe.reference_date = frappe.utils.nowdate()
|
pe.reference_date = frappe.utils.nowdate()
|
||||||
pe.paid_amount = 2500
|
pe.paid_amount = 2500
|
||||||
pe.references[0].allocated_amount = 2500
|
pe.references[0].allocated_amount = 2500
|
||||||
pe.save()
|
pe.save()
|
||||||
pe.submit()
|
pe.submit()
|
||||||
pe.cancel()
|
|
||||||
|
|
||||||
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
|
pi.load_from_db()
|
||||||
pe.reference_no = "PURINV0002"
|
pr = make_payment_request(dt="Purchase Invoice", dn=pi.name, mute_email=1)
|
||||||
pe.reference_date = frappe.utils.nowdate()
|
self.assertEqual(pr.grand_total, pi.outstanding_amount)
|
||||||
pe.paid_amount = 2500
|
|
||||||
pe.references[0].allocated_amount = 2500
|
|
||||||
pe.save()
|
|
||||||
pe.submit()
|
|
||||||
|
|
||||||
pi.load_from_db()
|
|
||||||
pr = make_payment_request(dt="Purchase Invoice", dn=pi.name, mute_email=1)
|
|
||||||
self.assertEqual(pr.grand_total, pi.outstanding_amount)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user