This commit is contained in:
Laurent Destailleur 2022-01-26 13:51:56 +01:00
parent 38408f916b
commit cd1f5fead1

View File

@ -70,14 +70,14 @@ function addDispatchLine(index, type, mode)
mode = mode || 'qtymissing' mode = mode || 'qtymissing'
console.log("fourn/js/lib_dispatch.js.php Split line type="+type+" index="+index+" mode="+mode); console.log("fourn/js/lib_dispatch.js.php Split line type="+type+" index="+index+" mode="+mode);
if(mode == 'qtymissingconsume') { if(mode == 'qtymissingconsume') {
var inputId = 'qtytoconsume'; var inputId = 'qtytoconsume';
var warehouseId = 'idwarehouse'; var warehouseId = 'idwarehouse';
} }
else { else {
var inputId = 'qtytoproduce'; var inputId = 'qtytoproduce';
var warehouseId = 'idwarehousetoproduce'; var warehouseId = 'idwarehousetoproduce';
} }
var nbrTrs = $("tr[name^='"+type+"_"+index+"']").length; // position of line for batch var nbrTrs = $("tr[name^='"+type+"_"+index+"']").length; // position of line for batch
var $row = $("tr[name='"+type+'_'+index+"_1']").clone(true); // clone last batch line to jQuery object var $row = $("tr[name='"+type+'_'+index+"_1']").clone(true); // clone last batch line to jQuery object
var qtyOrdered = parseFloat($("#qty_ordered_"+index).val()); // Qty ordered is same for all rows var qtyOrdered = parseFloat($("#qty_ordered_"+index).val()); // Qty ordered is same for all rows