[cleanup] comminified copy_account_in_all_row and removed conversion rate from pos setting
diff --git a/public/js/controllers/stock_controller.js b/public/js/controllers/stock_controller.js
index e4b0319..de18fe0 100644
--- a/public/js/controllers/stock_controller.js
+++ b/public/js/controllers/stock_controller.js
@@ -18,6 +18,7 @@
}
},
+
show_general_ledger: function() {
var me = this;
if(this.frm.doc.docstatus===1 && cint(wn.defaults.get_default("auto_accounting_for_stock"))) {
@@ -30,5 +31,16 @@
wn.set_route("general-ledger");
});
}
+ },
+
+ copy_account_in_all_row: function(doc, dt, dn, fieldname) {
+ var d = locals[dt][dn];
+ if(d[fieldname]){
+ var cl = getchildren(this.frm.cscript.tname, doc.name, this.frm.cscript.fname, doc.doctype);
+ for(var i = 0; i < cl.length; i++) {
+ if(!cl[i][fieldname]) cl[i][fieldname] = d[fieldname];
+ }
+ }
+ refresh_field(this.frm.cscript.fname);
}
});
\ No newline at end of file