diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 140fc3480ea..95b1ffc2e0f 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -103,6 +103,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3103__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/valo.php', 'EnhancedValue', 1, 'stocks', '$user->rights->stock->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3104__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/mouvement.php', 'Movements', 1, 'stocks', '$user->rights->stock->mouvement->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3106__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/massstockmove.php', 'StockTransfer', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); -- Product - Categories insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 3200__+MAX_llx_menu__, 'products', 'cat', 3__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=0', 'Categories', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 98021186e34..5f62b06c868 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -565,7 +565,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu /* - * Menu TIERS + * Menu THIRDPARTIES */ if ($mainmenu == 'companies') { @@ -598,7 +598,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu //$newmenu->add("/contact/list.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire); } - // Clients + // Customers/Prospects if (! empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { $langs->load("commercial"); @@ -608,7 +608,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu //$newmenu->add("/contact/list.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire); } - // Fournisseurs + // Suppliers if (! empty($conf->societe->enabled) && ! empty($conf->fournisseur->enabled)) { $langs->load("suppliers"); @@ -1008,6 +1008,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/valo.php", $langs->trans("EnhancedValue"), 1, $user->rights->stock->lire); if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); + if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); } // Expeditions diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index 4e9abfcbaeb..6159a4362e9 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -18,8 +18,8 @@ /** * \file htdocs/product/stock/massstockmove.php * \ingroup stock - * \brief This page allows to select several products, then incoming warehouse and - * outgoing warehouse and create all stock movements for this. + * \brief This page allows to select several products, then incoming warehouse and + * outgoing warehouse and create all stock movements for this. */ require '../../main.inc.php'; @@ -74,7 +74,7 @@ if (! empty($_SESSION['massstockmove'])) $listofdata=dol_json_decode($_SESSION[' if ($action == 'addline') { - if (! ($id_product > 0)) + if (! ($id_product > 0)) { $error++; setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Product")),'errors'); @@ -94,20 +94,20 @@ if ($action == 'addline') $error++; setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("WarehouseTarget")),'errors'); } - if ($id_sw > 0 && $id_tw == $id_sw) + if ($id_sw > 0 && $id_tw == $id_sw) { $error++; $langs->load("errors"); setEventMessage($langs->trans("ErrorWarehouseMustDiffers"),'errors'); } - + if (! $error) { if (count(array_keys($listofdata)) > 0) $id=max(array_keys($listofdata)) + 1; else $id=1; $listofdata[$id]=array('id'=>$id, 'id_product'=>$id_product, 'qty'=>$qty, 'id_sw'=>$id_sw, 'id_tw'=>$id_tw); $_SESSION['massstockmove']=dol_json_encode($listofdata); - + unset($id_product); //unset($id_sw); //unset($id_tw); @@ -125,27 +125,27 @@ if ($action == 'delline' && $idline != '') if ($action == 'createmovements') { $error=0; - + if (! GETPOST("label")) { $error++; setEventMessage($langs->trans("ErrorFieldRequired"),$langs->transnoentitiesnoconv("LabelMovement")); } - + $db->begin(); - + if (! $error) { $product = new Product($db); foreach($listofdata as $key => $val) // Loop on each movement to do - { + { $id=$val['id']; $id_product=$val['id_product']; $id_sw=$val['id_sw']; $id_tw=$val['id_tw']; $qty=price2num($val['qty']); - + if (! $error && $id_sw <> $id_tw && is_numeric($qty) && $id_product) { $result=$product->fetch($id_product); @@ -171,9 +171,9 @@ if ($action == 'createmovements') if ($result1 < 0) { $error++; - setEventMessage($product->errors,'errors'); + setEventMessage($product->errors,'errors'); } - + // Add stock $result2=$product->correct_stock( $user, @@ -186,21 +186,21 @@ if ($action == 'createmovements') if ($result2 < 0) { $error++; - setEventMessage($product->errors,'errors'); + setEventMessage($product->errors,'errors'); } } else { dol_print_error('',"Bad value saved into sessions"); - $error++; + $error++; } } } - + if (! $error) { unset($_SESSION['massstockmove']); - + $db->commit(); setEventMessage($langs->trans("StockMovementRecorded"),'mesgs'); header("Location: ".DOL_URL_ROOT.'/product/stock/index.php'); // Redirect to avoid pb when using back @@ -238,7 +238,7 @@ $titletoaddnoent=$langs->transnoentitiesnoconv("Select"); $buttonrecord=$langs->trans("RecordMovement"); $buttonrecordnoent=$langs->trans("RecordMovement"); print $langs->trans("SelectProductInAndOutWareHouse",$titletoaddnoent,$buttonrecordnoent).'
'; -print '
'."\n"; +print '
'."\n"; $var=true; @@ -286,11 +286,11 @@ print ''; foreach($listofdata as $key => $val) { $var=!$var; - + $productstatic->fetch($val['id_product']); $warehousestatics->fetch($val['id_sw']); $warehousestatict->fetch($val['id_tw']); - + print ''; print ''.$productstatic->getNomUrl(1).''; print ''; @@ -307,7 +307,7 @@ foreach($listofdata as $key => $val) print ''; print ''.$val['qty'].''; print ''.img_delete($langs->trans("Remove")).''; - + print ''; } @@ -324,7 +324,7 @@ print ''; print ''; // Button to record mass movement -$labelmovement=GETPOST("label")?GETPOST('label'):$langs->trans("MassStockMovement").' '.dol_print_date($now,'%Y-%m-%d %H:%M'); +$labelmovement=GETPOST("label")?GETPOST('label'):$langs->trans("StockTransfer").' '.dol_print_date($now,'%Y-%m-%d %H:%M'); print ''; print ''; @@ -333,7 +333,7 @@ print '
'; print ''; print ''; print ''; -print '
'; +print ''; print '
'; diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index ace77f1a0ef..a5754cf10b4 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -540,7 +540,7 @@ while ($i < min($num, $limit)) } $i++; } -print ''. +print ''; $value=$langs->trans("CreateOrders");