fix: delete redundant test+fix condition test+display units type if products in warehouse of same nature
This commit is contained in:
parent
1f83e5ac54
commit
c9bdefbbe0
@ -628,16 +628,13 @@ else
|
|||||||
print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=correction&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
|
print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=correction&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
|
||||||
print $langs->trans("StockCorrection");
|
print $langs->trans("StockCorrection");
|
||||||
print "</a></td>";
|
print "</a></td>";
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->stock->creer) {
|
|
||||||
print '<td align="center"><a href="' . DOL_URL_ROOT . '/product/stock/product.php?dwid=' . $object->id . '&id=' . $objp->rowid . '&action=correction&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?id=' . $id) . '">';
|
print '<td align="center"><a href="' . DOL_URL_ROOT . '/product/stock/product.php?dwid=' . $object->id . '&id=' . $objp->rowid . '&action=correction&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?id=' . $id) . '">';
|
||||||
print $langs->trans("StockCorrection");
|
print $langs->trans("StockCorrection");
|
||||||
print "</a></td>";
|
print "</a></td>";
|
||||||
}
|
}
|
||||||
if(!empty($conf->global->PRODUCT_USE_UNITS)) {
|
if(!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||||
if ($i == 0) $units = $productstatic->fk_unit;
|
if ($i == 0) $units = $productstatic->fk_unit;
|
||||||
elseif($productstatic->fk_unit !== $units) $sameunits = false;
|
elseif($productstatic->fk_unit != $units) $sameunits = false;
|
||||||
}
|
}
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$i++;
|
$i++;
|
||||||
@ -649,7 +646,9 @@ else
|
|||||||
$valtoshow=price2num($totalunit, 'MS');
|
$valtoshow=price2num($totalunit, 'MS');
|
||||||
if(empty($conf->global->PRODUCT_USE_UNITS) || $sameunits) print empty($valtoshow)?'0':$valtoshow;
|
if(empty($conf->global->PRODUCT_USE_UNITS) || $sameunits) print empty($valtoshow)?'0':$valtoshow;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_total"> </td>';
|
print '<td class="liste_total">';
|
||||||
|
if(empty($conf->global->PRODUCT_USE_UNITS) && $sameunits) print $langs->trans($productstatic->getLabelOfUnit());
|
||||||
|
print '</td>';
|
||||||
print '<td class="liste_total right">'.price(price2num($totalvalue, 'MT')).'</td>';
|
print '<td class="liste_total right">'.price(price2num($totalvalue, 'MT')).'</td>';
|
||||||
if (empty($conf->global->PRODUIT_MULTIPRICES))
|
if (empty($conf->global->PRODUIT_MULTIPRICES))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user