From feffca2b05c8c5183188d807c0efcff45cc84a04 Mon Sep 17 00:00:00 2001 From: tunde Date: Mon, 4 Sep 2017 13:34:31 +0100 Subject: [PATCH] patch to add payment_terms_field --- .../patches/v8_10/add_payment_terms_field_to_supplier.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 erpnext/patches/v8_10/add_payment_terms_field_to_supplier.py diff --git a/erpnext/patches/v8_10/add_payment_terms_field_to_supplier.py b/erpnext/patches/v8_10/add_payment_terms_field_to_supplier.py new file mode 100644 index 0000000000..c5a6fb1942 --- /dev/null +++ b/erpnext/patches/v8_10/add_payment_terms_field_to_supplier.py @@ -0,0 +1,9 @@ +from __future__ import unicode_literals +import frappe + + +def execute(): + if not frappe.db.has_column("Customer", "payment_terms"): + frappe.db.sql("ALTER TABLE `tabCustomer` ADD COLUMN `payment_terms` DATE DEFAULT NULL") + if not frappe.db.has_column("Supplier", "payment_terms"): + frappe.db.sql("ALTER TABLE `tabSupplier` ADD COLUMN `payment_terms` DATE DEFAULT NULL")