brotherton-erpnext/erpnext/patches/v5_1/fix_credit_days_based_on.py
2015-07-09 18:42:15 +05:30

9 lines
276 B
Python

from __future__ import unicode_literals
import frappe
def execute():
for dt in ("Customer", "Customer Group", "Company"):
frappe.reload_doctype(dt)
frappe.db.sql("""update `tab{0}` set credit_days_based_on='Fixed Days'
where ifnull(credit_days, 0) > 0""".format(dt))