mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 21:49:18 +00:00
[patch] Set 'Credit days based on' in existing customer, customer group and company
This commit is contained in:
@@ -171,3 +171,4 @@ execute:frappe.db.sql("""delete from `tabProject Task`""")
|
|||||||
erpnext.patches.v5_0.item_variants
|
erpnext.patches.v5_0.item_variants
|
||||||
erpnext.patches.v5_0.update_item_desc_in_invoice
|
erpnext.patches.v5_0.update_item_desc_in_invoice
|
||||||
erpnext.patches.v5_1.fix_against_account
|
erpnext.patches.v5_1.fix_against_account
|
||||||
|
erpnext.patches.v5_1.fix_credit_days_based_on
|
||||||
8
erpnext/patches/v5_1/fix_credit_days_based_on.py
Normal file
8
erpnext/patches/v5_1/fix_credit_days_based_on.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
for dt in ("Customer", "Customer Group", "Company"):
|
||||||
|
frappe.db.sql("""update `tab{0}` set credit_days_based_on='Fixed Days'
|
||||||
|
where ifnull(credit_days, 0) > 0""".format(dt))
|
||||||
Reference in New Issue
Block a user