commonorder.class.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <?php
  2. /* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
  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. */
  17. /**
  18. * \file htdocs/core/class/commonorder.class.php
  19. * \ingroup core
  20. * \brief File of the superclass of orders classes (customer and supplier)
  21. */
  22. require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
  23. require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
  24. require_once DOL_DOCUMENT_ROOT.'/core/class/commonincoterm.class.php';
  25. /**
  26. * Superclass for orders classes
  27. */
  28. abstract class CommonOrder extends CommonObject
  29. {
  30. use CommonIncoterm;
  31. /**
  32. * @var string code
  33. */
  34. public $code = "";
  35. }
  36. /**
  37. * Superclass for orders classes
  38. */
  39. abstract class CommonOrderLine extends CommonObjectLine
  40. {
  41. /**
  42. * Custom label of line. Not used by default.
  43. * @deprecated
  44. */
  45. public $label;
  46. /**
  47. * Product ref
  48. * @var string
  49. * @deprecated Use product_ref
  50. * @see $product_ref
  51. */
  52. public $ref;
  53. /**
  54. * Product label
  55. * @var string
  56. * @deprecated Use product_label
  57. * @see $product_label
  58. */
  59. public $libelle;
  60. /**
  61. * Product ref
  62. * @var string
  63. */
  64. public $product_ref;
  65. /**
  66. * Product label
  67. * @var string
  68. */
  69. public $product_label;
  70. /**
  71. * Boolean that indicates whether the product is available for sale '1' or not '0'
  72. * @var int
  73. */
  74. public $product_tosell=0;
  75. /**
  76. * Boolean that indicates whether the product is available for purchase '1' or not '0'
  77. * @var int
  78. */
  79. public $product_tobuy=0;
  80. /**
  81. * Product description
  82. * @var string
  83. */
  84. public $product_desc;
  85. /**
  86. * Product use lot
  87. * @var string
  88. */
  89. public $product_tobatch;
  90. /**
  91. * Product barcode
  92. * @var string
  93. */
  94. public $product_barcode;
  95. /**
  96. * Quantity
  97. * @var float
  98. */
  99. public $qty;
  100. /**
  101. * Unit price
  102. * @deprecated
  103. * @see $subprice
  104. */
  105. public $price;
  106. /**
  107. * Unit price before taxes
  108. * @var float
  109. */
  110. public $subprice;
  111. /**
  112. * Type of the product. 0 for product 1 for service
  113. * @var int
  114. */
  115. public $product_type = 0;
  116. /**
  117. * Description of the line
  118. * @var string
  119. */
  120. public $desc;
  121. /**
  122. * Id of corresponding product
  123. * @var int
  124. */
  125. public $fk_product;
  126. /**
  127. * Percent line discount
  128. * @var float
  129. */
  130. public $remise_percent;
  131. /**
  132. * VAT code
  133. * @var string
  134. */
  135. public $vat_src_code;
  136. /**
  137. * VAT %
  138. * @var float
  139. */
  140. public $tva_tx;
  141. /**
  142. * Local tax 1 %
  143. * @var float
  144. */
  145. public $localtax1_tx;
  146. /**
  147. * Local tax 2 %
  148. * @var float
  149. */
  150. public $localtax2_tx;
  151. public $localtax1_type;
  152. public $localtax2_type;
  153. /**
  154. * Liste d'options cumulables:
  155. * Bit 0: 0 si TVA normal - 1 si TVA NPR
  156. * Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except)
  157. * @var int
  158. */
  159. public $info_bits = 0;
  160. public $special_code = 0;
  161. public $fk_multicurrency;
  162. public $multicurrency_code;
  163. public $multicurrency_subprice;
  164. public $multicurrency_total_ht;
  165. public $multicurrency_total_tva;
  166. public $multicurrency_total_ttc;
  167. }