diff --git a/erpnext/patches/delivery_billing_status_patch.py b/erpnext/patches/delivery_billing_status_patch.py index 1fcd8bfdda..7de04b7b92 100644 --- a/erpnext/patches/delivery_billing_status_patch.py +++ b/erpnext/patches/delivery_billing_status_patch.py @@ -49,7 +49,7 @@ def update_status(): sql("""update `tabDelivery Note` set billing_status = if(ifnull(per_billed,0) < 0.001, 'Not Billed', if(per_billed >= 99.99, 'Fully Billed', 'Partly Billed'))""") -def run_patch(): +def execute(): update_delivered_billed_qty() update_percent() update_status() diff --git a/erpnext/patches/price_list_patch.py b/erpnext/patches/price_list_patch.py index 2651425e94..0f485b335c 100644 --- a/erpnext/patches/price_list_patch.py +++ b/erpnext/patches/price_list_patch.py @@ -10,4 +10,4 @@ def execute(): for d in ['Receivable Voucher', 'Delivery Note', 'Sales Order', 'Quotation']: - sql("update `tab%s` set price_list_currency = currency, plc_conversion_rate = conversion_rate" % d) + webnotes.conn.sql("update `tab%s` set price_list_currency = currency, plc_conversion_rate = conversion_rate" % d) diff --git a/erpnext/patches/repost_stock.py b/erpnext/patches/repost_stock.py index 680e06f435..a19494cc5e 100644 --- a/erpnext/patches/repost_stock.py +++ b/erpnext/patches/repost_stock.py @@ -2,6 +2,7 @@ def execute(): import webnotes sql = webnotes.conn.sql from webnotes.model.code import get_obj + from webnotes.utils import flt # update incoming rate in serial nos sr = sql("""select name, item_code, purchase_document_no from `tabSerial No`