Merge branch 'rohitwaghchaure-sales_order_status_issue' into hotfix
This commit is contained in:
commit
ee25cf7ead
@ -301,12 +301,7 @@ class StatusUpdater(Document):
|
||||
ref_doc = frappe.get_doc(ref_dt, ref_dn)
|
||||
|
||||
ref_doc.db_set("per_billed", per_billed)
|
||||
|
||||
if frappe.get_meta(ref_dt).get_field("billing_status"):
|
||||
if per_billed < 0.001: billing_status = "Not Billed"
|
||||
elif per_billed >= 99.99: billing_status = "Fully Billed"
|
||||
else: billing_status = "Partly Billed"
|
||||
ref_doc.db_set('billing_status', billing_status)
|
||||
ref_doc.set_status(update=True)
|
||||
|
||||
def get_tolerance_for(item_code, item_tolerance={}, global_tolerance=None):
|
||||
"""
|
||||
|
@ -319,3 +319,4 @@ execute:frappe.db.sql("update `tabTimesheet` ts, `tabEmployee` emp set ts.employ
|
||||
execute:frappe.db.sql("delete from `tabTimesheet Detail` where NOT EXISTS (select name from `tabTimesheet` where name = `tabTimesheet Detail`.parent)")
|
||||
erpnext.patches.v7_0.update_mode_of_payment_type
|
||||
finally:erpnext.patches.v7_0.update_timesheet_communications
|
||||
erpnext.patches.v7_0.update_status_of_zero_amount_sales_order
|
||||
|
@ -0,0 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
for data in frappe.get_all('Sales Order', fields = ["name"], filters = [["docstatus", "=", "1"], ["grand_total", "=", "0"]]):
|
||||
sales_order = frappe.get_doc('Sales Order', data.name)
|
||||
sales_order.set_status(update=True, update_modified = False)
|
Loading…
Reference in New Issue
Block a user