[cleanup] drop ship testing & cleanup
This commit is contained in:
@@ -76,12 +76,16 @@ class StatusUpdater(Document):
|
||||
self.update_qty()
|
||||
self.validate_qty()
|
||||
|
||||
def set_status(self, update=False):
|
||||
def set_status(self, update=False, status=None):
|
||||
if self.is_new():
|
||||
return
|
||||
|
||||
if self.doctype in status_map:
|
||||
_status = self.status
|
||||
|
||||
if status and update:
|
||||
self.db_set("status", status)
|
||||
|
||||
sl = status_map[self.doctype][:]
|
||||
sl.reverse()
|
||||
for s in sl:
|
||||
@@ -176,7 +180,7 @@ class StatusUpdater(Document):
|
||||
if change_modified:
|
||||
args['set_modified'] = ', modified = now(), modified_by = "{0}"'\
|
||||
.format(frappe.db.escape(frappe.session.user))
|
||||
|
||||
|
||||
self._update_children(args)
|
||||
|
||||
if "percent_join_field" in args:
|
||||
@@ -256,9 +260,9 @@ class StatusUpdater(Document):
|
||||
zero_amount_refdoc.append(item.get(ref_fieldname))
|
||||
|
||||
if zero_amount_refdoc:
|
||||
self.update_biling_status(zero_amount_refdoc, ref_dt, ref_fieldname)
|
||||
self.update_billing_status(zero_amount_refdoc, ref_dt, ref_fieldname)
|
||||
|
||||
def update_biling_status(self, zero_amount_refdoc, ref_dt, ref_fieldname):
|
||||
def update_billing_status(self, zero_amount_refdoc, ref_dt, ref_fieldname):
|
||||
for ref_dn in zero_amount_refdoc:
|
||||
ref_doc_qty = flt(frappe.db.sql("""select sum(ifnull(qty, 0)) from `tab%s Item`
|
||||
where parent=%s""" % (ref_dt, '%s'), (ref_dn))[0][0])
|
||||
|
||||
Reference in New Issue
Block a user