PageRenderTime 44ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/core/lib/stock.lib.php

https://github.com/asterix14/dolibarr
PHP | 80 lines | 22 code | 11 blank | 47 comment | 0 complexity | 87f7fe9e0838863bfa8471a73477b256 MD5 | raw file
Possible License(s): LGPL-2.0
  1. <?php
  2. /* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. * or see http://www.gnu.org/
  17. */
  18. /**
  19. * \file htdocs/core/lib/stock.lib.php
  20. * \brief Library file with function for stock module
  21. */
  22. /**
  23. * Enter description here...
  24. *
  25. * @param $object
  26. * @return array
  27. */
  28. function stock_prepare_head($object)
  29. {
  30. global $langs, $conf;
  31. $h = 0;
  32. $head = array();
  33. $head[$h][0] = DOL_URL_ROOT.'/product/stock/fiche.php?id='.$object->id;
  34. $head[$h][1] = $langs->trans("WarehouseCard");
  35. $head[$h][2] = 'card';
  36. $h++;
  37. $head[$h][0] = DOL_URL_ROOT.'/product/stock/mouvement.php?id='.$object->id;
  38. $head[$h][1] = $langs->trans("StockMovements");
  39. $head[$h][2] = 'movements';
  40. $h++;
  41. /*
  42. $head[$h][0] = DOL_URL_ROOT.'/product/stock/fiche-valo.php?id='.$object->id;
  43. $head[$h][1] = $langs->trans("EnhancedValue");
  44. $head[$h][2] = 'value';
  45. $h++;
  46. */
  47. /* Disabled because will never be implemented. Table always empty.
  48. if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER)
  49. {
  50. // Should not be enabled by defaut because does not work yet correctly because
  51. // personnal stocks are not tagged into table llx_entrepot
  52. $head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$object->id;
  53. $head[$h][1] = $langs->trans("Users");
  54. $head[$h][2] = 'user';
  55. $h++;
  56. }
  57. */
  58. // Show more tabs from modules
  59. // Entries must be declared in modules descriptor with line
  60. // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
  61. // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
  62. complete_head_from_modules($conf,$langs,$object,$head,$h,'stock');
  63. $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$object->id;
  64. $head[$h][1] = $langs->trans("Info");
  65. $head[$h][2] = 'info';
  66. $h++;
  67. return $head;
  68. }
  69. ?>