[fix] operations and bom
This commit is contained in:
parent
f3ae85cc9a
commit
de7b87ee3a
@ -35,7 +35,6 @@ cur_frm.cscript.hour_rate = function(doc, dt, dn) {
|
||||
}
|
||||
|
||||
cur_frm.cscript.time_in_mins = cur_frm.cscript.hour_rate;
|
||||
cur_frm.cscript.fixed_cycle_cost = cur_frm.cscript.hour_rate;
|
||||
|
||||
cur_frm.cscript.item_code = function(doc, cdt, cdn) {
|
||||
get_bom_material_detail(doc, cdt, cdn);
|
||||
|
@ -35,18 +35,20 @@ frappe.ui.form.on("Production Order", "additional_operating_cost", function(frm)
|
||||
|
||||
frappe.ui.form.on("Production Order Operation", "workstation", function(frm, cdt, cdn) {
|
||||
var d = locals[cdt][cdn];
|
||||
frappe.call({
|
||||
"method": "frappe.client.get",
|
||||
args: {
|
||||
doctype: "Workstation",
|
||||
name: d.workstation
|
||||
},
|
||||
callback: function (data) {
|
||||
frappe.model.set_value(d.doctype, d.name, "hour_rate", data.message.hour_rate);
|
||||
erpnext.production_order.calculate_cost(frm.doc);
|
||||
erpnext.production_order.calculate_total_cost(frm);
|
||||
}
|
||||
})
|
||||
if (d.workstation) {
|
||||
frappe.call({
|
||||
"method": "frappe.client.get",
|
||||
args: {
|
||||
doctype: "Workstation",
|
||||
name: d.workstation
|
||||
},
|
||||
callback: function (data) {
|
||||
frappe.model.set_value(d.doctype, d.name, "hour_rate", data.message.hour_rate);
|
||||
erpnext.production_order.calculate_cost(frm.doc);
|
||||
erpnext.production_order.calculate_total_cost(frm);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
frappe.ui.form.on("Production Order Operation", "time_in_mins", function(frm, cdt, cdn) {
|
||||
|
@ -33,7 +33,7 @@
|
||||
"print_hide": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
@ -293,7 +293,7 @@
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"modified": "2015-04-22 03:25:18.542350",
|
||||
"modified": "2015-05-21 13:46:27.730392",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Manufacturing",
|
||||
"name": "Production Order Operation",
|
||||
|
@ -156,3 +156,4 @@ erpnext.patches.v5_0.repost_requested_qty
|
||||
erpnext.patches.v5_0.fix_taxes_and_totals_in_party_currency
|
||||
erpnext.patches.v5_0.update_tax_amount_after_discount_in_purchase_cycle
|
||||
erpnext.patches.v5_0.rename_pos_setting
|
||||
execute:frappe.db.sql("update `tabBOM Operation` set description=opn_description where ifnull(description, '') = ''")
|
||||
|
@ -446,9 +446,9 @@ cur_frm.cscript.item_code = function(doc, cdt, cdn) {
|
||||
callback: function(r) {
|
||||
if(r.message) {
|
||||
$.each(r.message, function(k, v) {
|
||||
frappe.model.set_value(cdt, cdn, k, v);
|
||||
d[k] = v;
|
||||
});
|
||||
refresh_field('image_view', d.name, 'items');
|
||||
refresh_field('items');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user