brotherton-erpnext/erpnext/patches/v14_0/update_invoicing_period_in_subscription.py
Deepesh Garg e19e04b050
feat: Add a process document for Subscription (#37126)
* feat: Add a process document for Subscription

* chore: Remove print statements

* feat: Input for generating invoice before currenc invoice date

* chore: patch for backward compatability

* refactor: Unit tests for subscription

* chore: set status on insert
2023-09-19 18:39:44 +05:30

9 lines
269 B
Python

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()