fix bugs in patches
This commit is contained in:
parent
4e4a40e46b
commit
60aecd87b1
@ -4,4 +4,4 @@ import frappe
|
||||
|
||||
def execute():
|
||||
if not frappe.db.has_column("GL Entry", "due_date"):
|
||||
frappe.db.sql("ALTER TABLE `tabGL Entry` ADD COLUMN `due_date` DATE DEFAULT NULL")
|
||||
frappe.db.sql("ALTER TABLE `tabGL Entry` ADD COLUMN `due_date` DATE NULL")
|
||||
|
@ -4,6 +4,6 @@ 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")
|
||||
frappe.db.sql("ALTER TABLE `tabCustomer` ADD COLUMN `payment_terms` VARCHAR(140) NULL")
|
||||
if not frappe.db.has_column("Supplier", "payment_terms"):
|
||||
frappe.db.sql("ALTER TABLE `tabSupplier` ADD COLUMN `payment_terms` DATE DEFAULT NULL")
|
||||
frappe.db.sql("ALTER TABLE `tabSupplier` ADD COLUMN `payment_terms` VARCHAR(140) NULL")
|
||||
|
@ -55,7 +55,7 @@ def execute():
|
||||
value_query_str = " ".join(payment_terms)
|
||||
cond_query_str = " ELSE `payment_terms` END WHERE "
|
||||
|
||||
if customers:
|
||||
if suppliers:
|
||||
frappe.db.sql(
|
||||
begin_query_str + value_query_str + cond_query_str + '`supplier_name` IN %s',
|
||||
(suppliers,)
|
||||
|
Loading…
x
Reference in New Issue
Block a user