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

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

18 lines
415 B
Python
Raw Normal View History

import frappe
def execute():
subscription_invoices = frappe.get_all(
"Subscription Invoice", fields=["document_type", "invoice", "parent"]
)
for subscription_invoice in subscription_invoices:
frappe.db.set_value(
subscription_invoice.document_type,
subscription_invoice.invoice,
2023-08-09 15:32:26 +05:30
"subscription",
subscription_invoice.parent,
)
frappe.delete_doc_if_exists("DocType", "Subscription Invoice")