Fixed small code issues (codecy)

This commit is contained in:
Ben Cornwell-Mott 2017-06-16 13:47:40 -07:00
parent 6561b8ade9
commit 2c77165fc6

View File

@ -5,7 +5,7 @@ frappe.provide("erpnext.bom");
frappe.ui.form.on("BOM", { frappe.ui.form.on("BOM", {
setup: function(frm) { setup: function(frm) {
frm.add_fetch('buying_price_list', 'currency', 'currency') frm.add_fetch('buying_price_list', 'currency', 'currency');
frm.fields_dict["items"].grid.get_field("bom_no").get_query = function(doc, cdt, cdn){ frm.fields_dict["items"].grid.get_field("bom_no").get_query = function(doc, cdt, cdn){
return { return {
filters: {'currency': frm.doc.currency} filters: {'currency': frm.doc.currency}
@ -307,10 +307,9 @@ frappe.ui.form.on("BOM Operation", "workstation", function(frm, cdt, cdn) {
frappe.ui.form.on("BOM Item", "qty", function(frm, cdt, cdn) { frappe.ui.form.on("BOM Item", "qty", function(frm, cdt, cdn) {
var d = locals[cdt][cdn]; var d = locals[cdt][cdn];
d.stock_qty = d.qty * d.conversion_factor;
d.stock_qty = d.qty * d.conversion_factor
refresh_field("items"); refresh_field("items");
}); });
frappe.ui.form.on("BOM Operation", "operations_remove", function(frm) { frappe.ui.form.on("BOM Operation", "operations_remove", function(frm) {