fix: Make Sales Invoice paid when it create from shopping cart (#20879)
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
This commit is contained in:
parent
f8e8333d77
commit
8ef0609fc7
@ -90,6 +90,7 @@ class PaymentRequest(Document):
|
||||
if (hasattr(ref_doc, "order_type") and getattr(ref_doc, "order_type") == "Shopping Cart"):
|
||||
from erpnext.selling.doctype.sales_order.sales_order import make_sales_invoice
|
||||
si = make_sales_invoice(self.reference_name, ignore_permissions=True)
|
||||
si.allocate_advances_automatically = True
|
||||
si = si.insert(ignore_permissions=True)
|
||||
si.submit()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user