modules_movement.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. /* Copyright (C) 2018-2020 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 3 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 <https://www.gnu.org/licenses/>.
  16. * or see https://www.gnu.org/
  17. */
  18. /**
  19. * \file htdocs/core/modules/movement/modules_movement.php
  20. * \ingroup stock
  21. * \brief File with parent class for generating PDF of a stock movements
  22. */
  23. require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
  24. /**
  25. * Parent class to manage warehouse mouvement document templates
  26. */
  27. abstract class ModelePDFMovement extends CommonDocGenerator
  28. {
  29. /**
  30. * @var string Error code (or message)
  31. */
  32. public $error = '';
  33. /**
  34. * @var int page_largeur
  35. */
  36. public $page_largeur;
  37. /**
  38. * @var int page_hauteur
  39. */
  40. public $page_hauteur;
  41. /**
  42. * @var array format
  43. */
  44. public $format;
  45. /**
  46. * @var int marge_gauche
  47. */
  48. public $marge_gauche;
  49. /**
  50. * @var int marge_droite
  51. */
  52. public $marge_droite;
  53. /**
  54. * @var int marge_haute
  55. */
  56. public $marge_haute;
  57. /**
  58. * @var int marge_basse
  59. */
  60. public $marge_basse;
  61. public $option_codestockservice;
  62. // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
  63. /**
  64. * Return list of active generation modules
  65. *
  66. * @param DoliDB $db Database handler
  67. * @param integer $maxfilenamelength Max length of value to show
  68. * @return array List of templates
  69. */
  70. public static function liste_modeles($db, $maxfilenamelength = 0)
  71. {
  72. // phpcs:enable
  73. global $conf;
  74. $type = 'movement';
  75. $list = array();
  76. include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  77. $list = getListOfModels($db, $type, $maxfilenamelength);
  78. return $list;
  79. }
  80. }