brotherton-erpnext/erpnext/patches/v14_0/update_invoicing_period_in_subscription.py
Deepesh Garg 7640feaaa7 fix: Subscription update patch
(cherry picked from commit 277dade9f9a0a439d435dd6a53474aae67cd8f24)
2024-01-04 05:54:51 +00:00

9 lines
268 B
Python

import frappe
def execute():
subscription = frappe.qb.DocType("Subscription")
frappe.qb.update(subscription).set(
subscription.generate_invoice_at, "Beginning of the current subscription period"
).where(subscription.generate_invoice_at_period_start == 1).run()