Merge pull request #6970 from komsel2228/develop
fix bugs uom and conversion factor on stock entry
This commit is contained in:
commit
8704dd3134
@ -431,9 +431,25 @@ frappe.ui.form.on('Stock Entry Detail', {
|
|||||||
uom: function(doc, cdt, cdn) {
|
uom: function(doc, cdt, cdn) {
|
||||||
var d = locals[cdt][cdn];
|
var d = locals[cdt][cdn];
|
||||||
if(d.uom && d.item_code){
|
if(d.uom && d.item_code){
|
||||||
var arg = {'item_code':d.item_code, 'uom':d.uom, 'qty':d.qty}
|
arg = {
|
||||||
return get_server_fields('get_uom_details', JSON.stringify(arg),
|
'item_code':d.item_code,
|
||||||
'items', doc, cdt, cdn, 1);
|
'uom':d.uom,
|
||||||
|
'qty':d.qty
|
||||||
|
};
|
||||||
|
return frappe.call({
|
||||||
|
doc: cur_frm.doc,
|
||||||
|
method: "get_uom_details",
|
||||||
|
args: arg,
|
||||||
|
callback: function(r) {
|
||||||
|
if(r.message) {
|
||||||
|
var d = locals[cdt][cdn];
|
||||||
|
$.each(r.message, function(k, v) {
|
||||||
|
d[k] = v;
|
||||||
|
});
|
||||||
|
refresh_field("items");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
item_code: function(doc, cdt, cdn) {
|
item_code: function(doc, cdt, cdn) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user