brotherton-erpnext/erpnext/patches/v10_0/update_status_in_purchase_receipt.py

7 lines
210 B
Python
Raw Normal View History

import frappe
def execute():
frappe.reload_doc("stock", "doctype", "purchase_receipt")
frappe.db.sql('''
UPDATE `tabPurchase Receipt` SET status = "Completed" WHERE per_billed = 100 AND docstatus = 1
''')