brotherton-erpnext/erpnext/patches/v14_0/update_invoicing_period_in_subscription.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
269 B
Python
Raw Normal View History

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