chnages with eldy's advices
This commit is contained in:
parent
843882c7c7
commit
482b4e808b
@ -468,17 +468,17 @@ if ($object->id > 0) {
|
||||
}
|
||||
if ($permissiontoadd && $conf->use_javascript_ajax) {
|
||||
print ' ';
|
||||
print '<button type="button" class="butAction" id="fillwithexpected">'.$langs->trans('AutofillWithExpected').'</button>';
|
||||
print '<script>';
|
||||
print 'function fillWithExpected(){
|
||||
$(".expectedqty").each(function(){
|
||||
var object = $(this)[0]
|
||||
var objecttofill = $("#"+object.id+"_input")[0]
|
||||
objecttofill.value = object.innerText
|
||||
})
|
||||
console.log("Values filled")
|
||||
}';
|
||||
print '$("#fillwithexpected").on("click",function fillWithExpected(){
|
||||
$(".expectedqty").each(function(){
|
||||
var object = $(this)[0];
|
||||
var objecttofill = $("#"+object.id+"_input")[0];
|
||||
objecttofill.value = object.innerText;
|
||||
})
|
||||
console.log("Values filled");
|
||||
});';
|
||||
print '</script>';
|
||||
print '<a class="butAction" onclick="fillWithExpected()">'.$langs->trans('AutofillWithExpected').'</a>';
|
||||
}
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
@ -623,7 +623,7 @@ if ($object->id > 0) {
|
||||
print '<td class="center">';
|
||||
if ($object->status == $object::STATUS_VALIDATED) {
|
||||
$qty_view = GETPOST("id_".$obj->rowid) ? GETPOST("id_".$obj->rowid) : $obj->qty_view;
|
||||
print '<input type="text" class="maxwidth75 right" id="id_'.$obj->rowid.'_input" value="'.$qty_view.'">';
|
||||
print '<input type="text" class="maxwidth75 right" name="id_'.$obj->rowid.'" id="id_'.$obj->rowid.'_input" value="'.$qty_view.'">';
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
print '<a class="reposition" href="'.DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id.'&lineid='.$obj->rowid.'&action=deleteline&token='.newToken().'">'.img_delete().'</a>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user