2
0
forked from Wavyzz/dolibarr

Debug v17

This commit is contained in:
Laurent Destailleur
2023-05-22 16:48:06 +02:00
parent 9972277679
commit 58238166d8
4 changed files with 43 additions and 29 deletions

View File

@@ -113,8 +113,8 @@ if (!isModEnabled('stock')) {
accessforbidden();
}
$usercancreate = $user->rights->reception->creer;
$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php
$usercancreate = $user->hasRight('reception', 'creer');
$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php
/*
@@ -426,6 +426,7 @@ if ($id > 0 || !empty($ref)) {
print '</td>';
print '</tr>';
print '</table>';
print '<br><center>';
print '<a href="#" id="resetalltoexpected" class="marginrightonly paddingright marginleftonly paddingleft">'.img_picto("", 'autofill', 'class="pictofixedwidth"').$langs->trans("RestoreWithCurrentQtySaved").'</a></td>';
// Link to clear qty
@@ -445,12 +446,10 @@ if ($id > 0 || !empty($ref)) {
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="updatelines">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
@@ -727,7 +726,7 @@ if ($id > 0 || !empty($ref)) {
print '<input id="idline'.$suffix.'" name="idline'.$suffix.'" type="hidden" value="'.$objd->rowid.'">';
print '<input name="product_batch'.$suffix.'" type="hidden" value="'.$objd->fk_product.'">';
print '<!-- This is a up (may include discount or not depending on STOCK_EXCLUDE_DISCOUNT_FOR_PMP. will be used for PMP calculation) -->';
print '<!-- This is a U.P. (may include discount or not depending on STOCK_EXCLUDE_DISCOUNT_FOR_PMP. will be used for PMP calculation) -->';
if (!empty($conf->global->SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT)) { // Not tested !
print $langs->trans("BuyingPrice").': <input class="maxwidth75" name="pu'.$suffix.'" type="text" value="'.price2num($up_ht_disc, 'MU').'">';
} else {
@@ -971,7 +970,7 @@ if ($id > 0 || !empty($ref)) {
// Qty to dispatch
print '<td class="right">';
print '<a href="#" id="reset'.$suffix.'" class="resetline">'.img_picto($langs->trans("Reset"), 'eraser', 'class="pictofixedwidth opacitymedium"').'</a>';
print '<input id="qty'.$suffix.'" onchange="onChangeDispatchLineQty($(this))" name="qty'.$suffix.'" data-index="'.$i.'" data-type="text" class="width50 right qtydispatchinput" value="'.(GETPOSTISSET('qty'.$suffix) ? GETPOST('qty'.$suffix, 'int') : (empty($conf->global->SUPPLIER_ORDER_DISPATCH_FORCE_QTY_INPUT_TO_ZERO) ? $remaintodispatch : 0)).'">';
print '<input id="qty'.$suffix.'" onchange="onChangeDispatchLineQty($(this))" name="qty'.$suffix.'" data-index="'.$i.'" data-type="text" class="width50 right qtydispatchinput" value="'.(GETPOSTISSET('qty'.$suffix) ? GETPOST('qty'.$suffix, 'int') : (empty($conf->global->SUPPLIER_ORDER_DISPATCH_FORCE_QTY_INPUT_TO_ZERO) ? $remaintodispatch : 0)).'" data-expected="'.$remaintodispatch.'">';
print '</td>';
print '<td>';
if (isModEnabled('productbatch') && $objp->tobatch > 0) {