Debug v18
This commit is contained in:
parent
2a9e670425
commit
eccbe94131
@ -663,7 +663,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
if ($num) {
|
if ($num) {
|
||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$objd = $db->fetch_object($resql);
|
$objd = $db->fetch_object($resql);
|
||||||
$products_dispatched[$objd->rowid] = price2num($objd->qty, 5);
|
$products_dispatched[$objd->rowid] = price2num($objd->qty, 'MS');
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -780,6 +780,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
|
|
||||||
$conf->cache['product'] = array();
|
$conf->cache['product'] = array();
|
||||||
|
|
||||||
|
// Loop on each source order line (may be more or less than current number of lines in llx_commande_fournisseurdet)
|
||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
@ -873,7 +874,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print '</td>'; // Qty to dispatch
|
print '</td>'; // Qty to dispatch
|
||||||
print '<td>';
|
print '<td>';
|
||||||
//print img_picto($langs->trans('AddDispatchBatchLine'), 'split.png', 'onClick="addDispatchLine(' . $i . ',\'' . $type . '\')"');
|
//print img_picto($langs->trans('AddDispatchBatchLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine(' . $i . ',\'' . $type . '\')"');
|
||||||
print '</td>'; // Dispatch column
|
print '</td>'; // Dispatch column
|
||||||
print '<td></td>'; // Warehouse column
|
print '<td></td>'; // Warehouse column
|
||||||
|
|
||||||
@ -936,7 +937,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print '</td>'; // Qty to dispatch
|
print '</td>'; // Qty to dispatch
|
||||||
print '<td>';
|
print '<td>';
|
||||||
//print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'onClick="addDispatchLine(' . $i . ',\'' . $type . '\')"');
|
//print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine(' . $i . ',\'' . $type . '\')"');
|
||||||
print '</td>'; // Dispatch column
|
print '</td>'; // Dispatch column
|
||||||
print '<td></td>'; // Warehouse column
|
print '<td></td>'; // Warehouse column
|
||||||
|
|
||||||
|
|||||||
@ -62,20 +62,26 @@ if (empty($dolibarr_nocache)) {
|
|||||||
* Adds new table row for dispatching to multiple stock locations or multiple lot/serial
|
* Adds new table row for dispatching to multiple stock locations or multiple lot/serial
|
||||||
*
|
*
|
||||||
* @param index int index of product line. 0 = first product line
|
* @param index int index of product line. 0 = first product line
|
||||||
* @param type string type of dispatch (batch = batch dispatch, dispatch = non batch dispatch)
|
* @param type string type of dispatch ('batch' = batch dispatch, 'dispatch' = non batch dispatch)
|
||||||
* @param mode string 'qtymissing' will create new line with qty missing, 'lessone' will keep 1 in old line and the rest in new one
|
* @param mode string 'qtymissing' will create new line with qty missing, 'lessone' will keep 1 in old line and the rest in new one
|
||||||
*/
|
*/
|
||||||
function addDispatchLine(index, type, mode) {
|
function addDispatchLine(index, type, mode) {
|
||||||
mode = mode || 'qtymissing'
|
mode = mode || 'qtymissing'
|
||||||
|
|
||||||
|
console.log("fourn/js/lib_dispatch.js.php addDispatchLine Split line type="+type+" index="+index+" mode="+mode);
|
||||||
|
|
||||||
var $row0 = $("tr[name='"+type+'_0_'+index+"']");
|
var $row0 = $("tr[name='"+type+'_0_'+index+"']");
|
||||||
var $dpopt = $row0.find('.hasDatepicker').first().datepicker('option', 'all'); // get current datepicker options to apply the same to the cloned datepickers
|
var $dpopt = $row0.find('.hasDatepicker').first().datepicker('option', 'all'); // get current datepicker options to apply the same to the cloned datepickers
|
||||||
var $row = $row0.clone(true); // clone first batch line to jQuery object
|
var $row = $row0.clone(true); // clone first batch line to jQuery object
|
||||||
var nbrTrs = $("tr[name^='"+type+"_'][name$='_"+index+"']").length; // position of line for batch
|
var nbrTrs = $("tr[name^='"+type+"_'][name$='_"+index+"']").length; // count nb of tr line with attribute name that starts with 'batch_' or 'dispatch_', and end with _index
|
||||||
var qtyOrdered = parseFloat($("#qty_ordered_0_"+index).val()); // Qty ordered is same for all rows
|
var qtyOrdered = parseFloat($("#qty_ordered_0_"+index).val()); // Qty ordered is same for all rows
|
||||||
var qty = parseFloat($("#qty_"+(nbrTrs - 1)+"_"+index).val());
|
|
||||||
|
|
||||||
console.log("fourn/js/lib_dispatch.js.php Split line type="+type+" index="+index+" mode="+mode+" qtyOrdered="+qtyOrdered+" qty="+qty);
|
var qty = parseFloat($("#qty_"+(nbrTrs - 1)+"_"+index).val());
|
||||||
|
if (isNaN(qty)) {
|
||||||
|
qty = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("fourn/js/lib_dispatch.js.php addDispatchLine Split line nbrTrs="+nbrTrs+" qtyOrdered="+qtyOrdered+" qty="+qty);
|
||||||
|
|
||||||
var qtyDispatched;
|
var qtyDispatched;
|
||||||
|
|
||||||
@ -90,7 +96,7 @@ function addDispatchLine(index, type, mode) {
|
|||||||
mode = 'lessone';
|
mode = 'lessone';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("qtyDispatched=" + qtyDispatched + " qtyOrdered=" + qtyOrdered);
|
console.log("qtyDispatched=" + qtyDispatched + " qtyOrdered=" + qtyOrdered+ " qty=" + qty);
|
||||||
|
|
||||||
if (qty <= 1) {
|
if (qty <= 1) {
|
||||||
window.alert("Remain quantity to dispatch is too low to be split");
|
window.alert("Remain quantity to dispatch is too low to be split");
|
||||||
@ -187,7 +193,6 @@ function addDispatchLine(index, type, mode) {
|
|||||||
*
|
*
|
||||||
* element requires arbitrary data qty (value before change), type (type of dispatch) and index (index of product line)
|
* element requires arbitrary data qty (value before change), type (type of dispatch) and index (index of product line)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onChangeDispatchLineQty(element) {
|
function onChangeDispatchLineQty(element) {
|
||||||
var type = $(element).data('type'),
|
var type = $(element).data('type'),
|
||||||
qty = parseFloat($(element).data('expected')),
|
qty = parseFloat($(element).data('expected')),
|
||||||
@ -208,7 +213,8 @@ function onChangeDispatchLineQty(element) {
|
|||||||
if ((qtyChanged) <= (qtyOrdered - (qtyDispatched + qtyDispatching))) {
|
if ((qtyChanged) <= (qtyOrdered - (qtyDispatched + qtyDispatching))) {
|
||||||
$("#qty_dispatched_0_" + index).val(qtyDispatched + qtyChanged);
|
$("#qty_dispatched_0_" + index).val(qtyDispatched + qtyChanged);
|
||||||
} else {
|
} else {
|
||||||
$(element).val($(element).data('expected'));
|
/*console.log("eee");
|
||||||
|
$(element).val($(element).data('expected'));*/
|
||||||
}
|
}
|
||||||
$(element).data('expected', $(element).val());
|
$(element).data('expected', $(element).val());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,6 @@ ReceptionExist=A reception exists
|
|||||||
ReceptionBackToDraftInDolibarr=Reception %s back to draft
|
ReceptionBackToDraftInDolibarr=Reception %s back to draft
|
||||||
ReceptionClassifyClosedInDolibarr=Reception %s classified Closed
|
ReceptionClassifyClosedInDolibarr=Reception %s classified Closed
|
||||||
ReceptionUnClassifyCloseddInDolibarr=Reception %s re-open
|
ReceptionUnClassifyCloseddInDolibarr=Reception %s re-open
|
||||||
ResetQtyToDispatch=Reset all quantities to dispatch
|
RestoreWithCurrentQtySaved=Fill quantities with lastest saved values
|
||||||
ReceptionUpdated=Reception sucessfully updated
|
ReceptionUpdated=Reception sucessfully updated
|
||||||
DispatchCard=Dispatch card
|
DispatchCard=Reception distribution
|
||||||
@ -415,7 +415,6 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -735,7 +735,9 @@ if (empty($reshook)) {
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('', $langs->trans('Reception'), 'Reception');
|
$title = $object->ref.' - '.$langs->trans('Reception');
|
||||||
|
|
||||||
|
llxHeader('', $title, 'Reception');
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
|
|||||||
@ -297,7 +297,7 @@ $formproduct = new FormProduct($db);
|
|||||||
$warehouse_static = new Entrepot($db);
|
$warehouse_static = new Entrepot($db);
|
||||||
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
||||||
|
|
||||||
$title = $object->ref." - ".$langs->trans('OrderDispatch');
|
$title = $object->ref." - ".$langs->trans('DispatchCard');
|
||||||
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
|
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
|
||||||
$morejs = array('/fourn/js/lib_dispatch.js.php');
|
$morejs = array('/fourn/js/lib_dispatch.js.php');
|
||||||
|
|
||||||
@ -427,8 +427,9 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br><center>';
|
print '<br><center>';
|
||||||
print '<a href="#" id="resetalltoexpected" class="marginrightonly paddingright marginleftonly paddingleft">'.img_picto("", 'eraser', 'class="pictofixedwidth"').$langs->trans("ResetQtyToDispatch").'</a></td>';
|
print '<a href="#" id="resetalltoexpected" class="marginrightonly paddingright marginleftonly paddingleft">'.img_picto("", 'autofill', 'class="pictofixedwidth"').$langs->trans("RestoreWithCurrentQtySaved").'</a></td>';
|
||||||
print '<a href="#" id="autoreset" class="marginrightonly paddingright marginleftonly paddingleft">'.img_picto("", 'eraser', 'class="pictofixedwidth"').$langs->trans("Reset").'</a></td>';
|
// Link to clear qty
|
||||||
|
print '<a href="#" id="autoreset" class="marginrightonly paddingright marginleftonly paddingleft">'.img_picto("", 'eraser', 'class="pictofixedwidth"').$langs->trans("ClearQtys").'</a></td>';
|
||||||
print '<center>';
|
print '<center>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -453,7 +454,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
|
|
||||||
// Set $products_dispatched with qty dispatched for each product id
|
// Get list of lines from the original Order into $products_dispatched with qty dispatched for each product id
|
||||||
$products_dispatched = array();
|
$products_dispatched = array();
|
||||||
$sql = "SELECT l.rowid, cfd.fk_product, sum(cfd.qty) as qty";
|
$sql = "SELECT l.rowid, cfd.fk_product, sum(cfd.qty) as qty";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as cfd";
|
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as cfd";
|
||||||
@ -469,17 +470,17 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
if ($num) {
|
if ($num) {
|
||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$objd = $db->fetch_object($resql);
|
$objd = $db->fetch_object($resql);
|
||||||
$products_dispatched[$objd->rowid] = price2num($objd->qty, 5);
|
$products_dispatched[$objd->rowid] = price2num($objd->qty, 'MS');
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//$sql = "SELECT l.rowid, l.fk_product, l.subprice, l.remise_percent, l.ref AS sref, SUM(l.qty) as qty,";
|
//$sql = "SELECT l.rowid, l.fk_product, l.subprice, l.remise_percent, l.ref AS sref, SUM(l.qty) as qty,";
|
||||||
$sql = "SELECT l.rowid, l.fk_product, l.subprice, l.remise_percent, l.ref AS sref, l.qty as qty,";
|
$sql = "SELECT l.rowid, l.fk_product, l.subprice, l.remise_percent, l.ref AS sref, l.qty as qty,";
|
||||||
$sql .= " p.ref, p.label, p.tobatch, p.fk_default_warehouse";
|
$sql .= " p.ref, p.label, p.tobatch, p.fk_default_warehouse";
|
||||||
|
|
||||||
// Enable hooks to alter the SQL query (SELECT)
|
// Enable hooks to alter the SQL query (SELECT)
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks(
|
$reshook = $hookmanager->executeHooks(
|
||||||
@ -492,14 +493,12 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
}
|
}
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
|
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product=p.rowid";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product=p.rowid";
|
||||||
$sql .= " WHERE l.fk_commande = ".((int) $objectsrc->id);
|
$sql .= " WHERE l.fk_commande = ".((int) $objectsrc->id);
|
||||||
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
||||||
$sql .= " AND l.product_type = 0";
|
$sql .= " AND l.product_type = 0";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable hooks to alter the SQL query (WHERE)
|
// Enable hooks to alter the SQL query (WHERE)
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks(
|
$reshook = $hookmanager->executeHooks(
|
||||||
@ -520,7 +519,6 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$numline = 1;
|
|
||||||
|
|
||||||
if ($num) {
|
if ($num) {
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -543,6 +541,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '<td class="right">'.$langs->trans("QtyOrdered").'</td>';
|
print '<td class="right">'.$langs->trans("QtyOrdered").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("QtyDispatchedShort").'</td>';
|
print '<td class="right">'.$langs->trans("QtyDispatchedShort").'</td>';
|
||||||
print ' <td class="right">'.$langs->trans("QtyToDispatchShort");
|
print ' <td class="right">'.$langs->trans("QtyToDispatchShort");
|
||||||
|
//print '<br><a href="#" id="autoreset">'.img_picto($langs->trans("Reset"), 'eraser', 'class="pictofixedwidth opacitymedium"').$langs->trans("Reset").'</a></td>';
|
||||||
print '<td width="32"></td>';
|
print '<td width="32"></td>';
|
||||||
|
|
||||||
if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) {
|
if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) {
|
||||||
@ -586,6 +585,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
|
|
||||||
$conf->cache['product'] = array();
|
$conf->cache['product'] = array();
|
||||||
|
|
||||||
|
// Loop on each source order line (may be more or less than current number of lines in llx_commande_fournisseurdet)
|
||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
@ -611,7 +611,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '<!-- Line to dispatch '.$suffix.' -->'."\n";
|
print '<!-- Line to dispatch '.$suffix.' -->'."\n";
|
||||||
// hidden fields for js function
|
// hidden fields for js function
|
||||||
print '<input id="qty_ordered'.$suffix.'" type="hidden" value="'.$objp->qty.'">';
|
print '<input id="qty_ordered'.$suffix.'" type="hidden" value="'.$objp->qty.'">';
|
||||||
print '<input id="qty_dispatched'.$suffix.'" type="hidden" data-dispatched="'.(float) $alreadydispatched.'" value="'.(float) $alreadydispatched.'">';
|
print '<input id="qty_dispatched'.$suffix.'" type="hidden" data-dispatched="'.((float) $alreadydispatched).'" value="'.(float) $alreadydispatched.'">';
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
if (empty($conf->cache['product'][$objp->fk_product])) {
|
if (empty($conf->cache['product'][$objp->fk_product])) {
|
||||||
@ -644,7 +644,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print $linktoprod;
|
print $linktoprod;
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '<td class="dispatch_batch_number">';
|
print '<td class="dispatch_batch_number">';
|
||||||
print $langs->trans("ProductDoesNotUseBatchSerial");
|
print '<span class="opacitymedium small">'.$langs->trans("ProductDoesNotUseBatchSerial").'</small>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||||
print '<td class="dispatch_dlc"></td>';
|
print '<td class="dispatch_dlc"></td>';
|
||||||
@ -682,7 +682,11 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
|
|
||||||
$sql = "SELECT cfd.rowid, cfd.qty, cfd.fk_entrepot, cfd.batch, cfd.eatby, cfd.sellby, cfd.fk_product";
|
$sql = "SELECT cfd.rowid, cfd.qty, cfd.fk_entrepot, cfd.batch, cfd.eatby, cfd.sellby, cfd.fk_product";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as cfd";
|
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as cfd";
|
||||||
$sql .= " WHERE cfd.fk_commandefourndet = ".(int) $objp->rowid;
|
$sql .= " WHERE cfd.fk_reception = ".((int) $object->id);
|
||||||
|
$sql .= " AND cfd.fk_commande = ".((int) $objectsrc->id);
|
||||||
|
$sql .= " AND cfd.fk_commandefourndet = ".(int) $objp->rowid;
|
||||||
|
|
||||||
|
//print $sql;
|
||||||
$resultsql = $db->query($sql);
|
$resultsql = $db->query($sql);
|
||||||
$j = 0;
|
$j = 0;
|
||||||
if ($resultsql) {
|
if ($resultsql) {
|
||||||
@ -691,6 +695,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
while ($j < $numd) {
|
while ($j < $numd) {
|
||||||
$suffix = "_".$j."_".$i;
|
$suffix = "_".$j."_".$i;
|
||||||
$objd = $db->fetch_object($resultsql);
|
$objd = $db->fetch_object($resultsql);
|
||||||
|
|
||||||
if (isModEnabled('productbatch') && !empty($objd->batch)) {
|
if (isModEnabled('productbatch') && !empty($objd->batch)) {
|
||||||
$type = 'batch';
|
$type = 'batch';
|
||||||
|
|
||||||
@ -862,6 +867,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
$suffix = "_".$j."_".$i;
|
$suffix = "_".$j."_".$i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($j == 0) {
|
if ($j == 0) {
|
||||||
if (isModEnabled('productbatch') && !empty($objp->batch)) {
|
if (isModEnabled('productbatch') && !empty($objp->batch)) {
|
||||||
$type = 'batch';
|
$type = 'batch';
|
||||||
@ -1107,17 +1113,21 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
idtab = id.split("_");
|
idtab = id.split("_");
|
||||||
if ($(this).data("remove") == "clear"){
|
if ($(this).data("remove") == "clear"){
|
||||||
console.log("We clear the object to expected value")
|
console.log("We clear the object to expected value")
|
||||||
|
$("#qty_"+idtab[1]+"_"+idtab[2]).val("");
|
||||||
|
/*
|
||||||
qtyexpected = $("#qty_"+idtab[1]+"_"+idtab[2]).data("expected")
|
qtyexpected = $("#qty_"+idtab[1]+"_"+idtab[2]).data("expected")
|
||||||
console.log(qtyexpected);
|
console.log(qtyexpected);
|
||||||
$("#qty_"+idtab[1]+"_"+idtab[2]).val(qtyexpected);
|
$("#qty_"+idtab[1]+"_"+idtab[2]).val(qtyexpected);
|
||||||
qtydispatched = $("#qty_dispatched_0_"+idtab[2]).data("dispatched")
|
qtydispatched = $("#qty_dispatched_0_"+idtab[2]).data("dispatched")
|
||||||
$("#qty_dispatched_0_"+idtab[2]).val(qtydispatched);
|
$("#qty_dispatched_0_"+idtab[2]).val(qtydispatched);
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
console.log("We remove the object")
|
console.log("We remove the object")
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
$("tr[name^=\'"+idtab[0]+"_\'][name$=\'_"+idtab[2]+"\']:last .splitbutton").show();
|
$("tr[name^=\'"+idtab[0]+"_\'][name$=\'_"+idtab[2]+"\']:last .splitbutton").show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#resetalltoexpected").click(function(){
|
$("#resetalltoexpected").click(function(){
|
||||||
@ -1125,6 +1135,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
console.log("We reset to expected "+$(this).attr("id")+" qty to dispatch");
|
console.log("We reset to expected "+$(this).attr("id")+" qty to dispatch");
|
||||||
$(this).val($(this).data("expected"));
|
$(this).val($(this).data("expected"));
|
||||||
});
|
});
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".resetline").click(function(){
|
$(".resetline").click(function(){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user