[get_query] to server side

This commit is contained in:
Saurabh
2013-07-09 10:08:18 +05:30
61 changed files with 478 additions and 1531 deletions

View File

@@ -28,8 +28,8 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
if(doc.docstatus===0 && !doc.__islocal) {
cur_frm.set_intro("Submit this Production Order for further processing.");
} else if(doc.docstatus===1) {
var percent = flt(doc.produced_qty) / doc.qty * 100;
cur_frm.dashboard.add_progress(cint(percent) + "% " + wn._("Complete"));
var percent = flt(doc.produced_qty) / flt(doc.qty) * 100;
cur_frm.dashboard.add_progress(cint(percent) + "% " + wn._("Complete"), percent);
if(doc.status === "Stopped") {
cur_frm.dashboard.set_headline_alert(wn._("Stopped"), "alert-danger", "icon-stop");

View File

@@ -76,9 +76,9 @@ class DocType:
(self.doc.sales_order, self.doc.production_item))[0][0]
# total qty in SO
so_qty = flt(so_item_qty) + flt(dnpi_qty)
if ordered_qty_against_so > so_qty:
msgprint("""Total production order qty for item: %s against sales order: %s \
webnotes.msgprint("""Total production order qty for item: %s against sales order: %s \
will be %s, which is greater than sales order qty (%s).
Please reduce qty or remove the item.""" %
(self.doc.production_item, self.doc.sales_order,