mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-20 18:54:55 +00:00
fix: call 'process' directly instead of creating 'process_subscripti
reason: 'process' follows simple DB transaction model.
(cherry picked from commit b4d22c2936)
This commit is contained in:
@@ -737,10 +737,7 @@ class Subscription(Document):
|
|||||||
elif self.generate_invoice_at == "Days before the current subscription period":
|
elif self.generate_invoice_at == "Days before the current subscription period":
|
||||||
processing_date = add_days(self.current_invoice_start, -self.number_of_days)
|
processing_date = add_days(self.current_invoice_start, -self.number_of_days)
|
||||||
|
|
||||||
process_subscription = frappe.new_doc("Process Subscription")
|
self.process(posting_date=processing_date)
|
||||||
process_subscription.posting_date = processing_date
|
|
||||||
process_subscription.subscription = self.name
|
|
||||||
process_subscription.save().submit()
|
|
||||||
|
|
||||||
|
|
||||||
def is_prorate() -> int:
|
def is_prorate() -> int:
|
||||||
|
|||||||
Reference in New Issue
Block a user