mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 08:05:00 +00:00
fix: While creating Payment Request from other forms, open a new Payment Request form without saving (#30228)
This commit is contained in:
@@ -376,8 +376,8 @@ def make_payment_request(**args):
|
||||
if args.order_type == "Shopping Cart" or args.mute_email:
|
||||
pr.flags.mute_email = True
|
||||
|
||||
pr.insert(ignore_permissions=True)
|
||||
if args.submit_doc:
|
||||
pr.insert(ignore_permissions=True)
|
||||
pr.submit()
|
||||
|
||||
if args.order_type == "Shopping Cart":
|
||||
|
||||
@@ -128,6 +128,7 @@ class TestPaymentRequest(unittest.TestCase):
|
||||
pr1 = make_payment_request(dt="Sales Order", dn=so.name,
|
||||
recipient_id="nabin@erpnext.com", return_doc=1)
|
||||
pr1.grand_total = 200
|
||||
pr1.insert()
|
||||
pr1.submit()
|
||||
|
||||
# Make a 2nd Payment Request
|
||||
|
||||
@@ -456,6 +456,7 @@ class POSInvoice(SalesInvoice):
|
||||
pay_req = self.get_existing_payment_request(pay)
|
||||
if not pay_req:
|
||||
pay_req = self.get_new_payment_request(pay)
|
||||
pay_req.insert()
|
||||
pay_req.submit()
|
||||
else:
|
||||
pay_req.request_phone_payment()
|
||||
|
||||
Reference in New Issue
Block a user