Clean code
This commit is contained in:
parent
003c463ee4
commit
efb88292dd
@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($id) && !empty($object->id)) $id = $object->id;
|
if(empty($id) && !empty($object->id)) $id = $object->id;
|
||||||
|
|
||||||
$modulepart='product';
|
$modulepart='product';
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer)
|
|||||||
if($maj_ok) {
|
if($maj_ok) {
|
||||||
|
|
||||||
$pse = new ProductStockEntrepot($db);
|
$pse = new ProductStockEntrepot($db);
|
||||||
if($pse->fetch('', $id, GETPOST('fk_entrepot')) > 0) {
|
if($pse->fetch(0, $id, GETPOST('fk_entrepot')) > 0) {
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
$pse->seuil_stock_alerte = $seuil_stock_alerte;
|
$pse->seuil_stock_alerte = $seuil_stock_alerte;
|
||||||
@ -159,7 +159,7 @@ if($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->c
|
|||||||
{
|
{
|
||||||
|
|
||||||
$pse = new ProductStockEntrepot($db);
|
$pse = new ProductStockEntrepot($db);
|
||||||
$pse->fetch(GETPOST('fk_productstockwarehouse'));
|
$pse->fetch(GETPOST('fk_productstockwarehouse','int'));
|
||||||
if($pse->delete($user) > 0) setEventMessage($langs->trans('ProductStockWarehouseDeleted'));
|
if($pse->delete($user) > 0) setEventMessage($langs->trans('ProductStockWarehouseDeleted'));
|
||||||
|
|
||||||
$action = '';
|
$action = '';
|
||||||
@ -989,8 +989,8 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE))
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
if (!empty($user->rights->produit->creer)){
|
if (!empty($user->rights->produit->creer)){
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user