src/Entity/System/OrderTax.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Table(name="ps_order_tax")
  6. *
  7. * @ORM\Entity(repositoryClass="App\Repository\System\OrderTaxRepository")
  8. */
  9. class OrderTax
  10. {
  11. /**
  12. * @ORM\Id()
  13. *
  14. * @ORM\GeneratedValue()
  15. *
  16. * @ORM\Column(type="integer", name="id_order_tax")
  17. */
  18. private ?int $id = null;
  19. /**
  20. * @var Order
  21. *
  22. * @ORM\OneToOne(targetEntity="App\Entity\System\Order", inversedBy="orderTax")
  23. *
  24. * @ORM\JoinColumn(referencedColumnName="id_order", name="id_order", nullable=false)
  25. */
  26. private Order $order;
  27. /**
  28. * @ORM\Column(type="float", nullable=true, name="iva2")
  29. */
  30. private ?float $iva2 = 0.0;
  31. /**
  32. * @ORM\Column(type="float", scale=2, precision=10, name="iva4")
  33. */
  34. private ?float $iva4 = 0.0;
  35. /**
  36. * @ORM\Column(type="float", scale=2, precision=10, name="iva5")
  37. */
  38. private ?float $iva5 = 0.0;
  39. /**
  40. * @ORM\Column(type="float", nullable=true, name="iva7")
  41. */
  42. private ?float $iva7 = 0.0;
  43. /**
  44. * @ORM\Column(type="float", scale=2, precision=10, name="iva10")
  45. */
  46. private ?float $iva10 = 0.0;
  47. /**
  48. * @ORM\Column(type="float", scale=2, precision=10, name="iva21")
  49. */
  50. private ?float $iva21 = 0.0;
  51. /**
  52. * @ORM\Column(type="float", nullable=true, name="re2")
  53. */
  54. private ?float $re2 = 0.0;
  55. /**
  56. * @ORM\Column(type="float", scale=2, precision=10, name="re4")
  57. */
  58. private ?float $re4 = 0.0;
  59. /**
  60. * @ORM\Column(type="float", scale=2, precision=10, name="re5")
  61. */
  62. private ?float $re5 = 0.0;
  63. /**
  64. * @ORM\Column(type="float", nullable=true, name="re7")
  65. */
  66. private ?float $re7 = 0.0;
  67. /**
  68. * @ORM\Column(type="float", scale=2, precision=10, name="re10")
  69. */
  70. private ?float $re10 = 0.0;
  71. /**
  72. * @ORM\Column(type="float", scale=2, precision=10, name="re21")
  73. */
  74. private ?float $re21 = 0.0;
  75. public function getId(): ?int
  76. {
  77. return $this->id;
  78. }
  79. public function setOrder(Order $order): OrderTax
  80. {
  81. $this->order = $order;
  82. return $this;
  83. }
  84. /**
  85. * @return Order
  86. */
  87. public function getOrder(): Order
  88. {
  89. return $this->order;
  90. }
  91. public function getIva2(): ?float
  92. {
  93. return $this->iva2;
  94. }
  95. public function setIva2(?float $iva2): OrderTax
  96. {
  97. $this->iva2 = $iva2;
  98. return $this;
  99. }
  100. public function getIva4(): ?float
  101. {
  102. return $this->iva4;
  103. }
  104. public function setIva4(?float $iva4): OrderTax
  105. {
  106. $this->iva4 = $iva4;
  107. return $this;
  108. }
  109. public function getIva5(): ?float
  110. {
  111. return $this->iva5;
  112. }
  113. public function setIva5(?float $iva5): OrderTax
  114. {
  115. $this->iva5 = $iva5;
  116. return $this;
  117. }
  118. public function getIva7(): ?float
  119. {
  120. return $this->iva7;
  121. }
  122. public function setIva7(?float $iva7): OrderTax
  123. {
  124. $this->iva7 = $iva7;
  125. return $this;
  126. }
  127. public function getIva10(): ?float
  128. {
  129. return $this->iva10;
  130. }
  131. public function setIva10(?float $iva10): OrderTax
  132. {
  133. $this->iva10 = $iva10;
  134. return $this;
  135. }
  136. public function getIva21(): ?float
  137. {
  138. return $this->iva21;
  139. }
  140. public function setIva21(?float $iva21): OrderTax
  141. {
  142. $this->iva21 = $iva21;
  143. return $this;
  144. }
  145. public function getRe2(): ?float
  146. {
  147. return $this->re2;
  148. }
  149. public function setRe2(?float $re2): OrderTax
  150. {
  151. $this->re2 = $re2;
  152. return $this;
  153. }
  154. public function getRe4(): ?float
  155. {
  156. return $this->re4;
  157. }
  158. public function setRe4(?float $re4): OrderTax
  159. {
  160. $this->re4 = $re4;
  161. return $this;
  162. }
  163. public function getRe5(): ?float
  164. {
  165. return $this->re5;
  166. }
  167. public function setRe5(?float $re5): OrderTax
  168. {
  169. $this->re5 = $re5;
  170. return $this;
  171. }
  172. public function getRe7(): ?float
  173. {
  174. return $this->re7;
  175. }
  176. public function setRe7(?float $re7): OrderTax
  177. {
  178. $this->re7 = $re7;
  179. return $this;
  180. }
  181. public function getRe10(): ?float
  182. {
  183. return $this->re10;
  184. }
  185. public function setRe10(?float $re10): OrderTax
  186. {
  187. $this->re10 = $re10;
  188. return $this;
  189. }
  190. public function getRe21(): ?float
  191. {
  192. return $this->re21;
  193. }
  194. public function setRe21(?float $re21): OrderTax
  195. {
  196. $this->re21 = $re21;
  197. return $this;
  198. }
  199. public function getTotalTaxesAmount(): float
  200. {
  201. return $this->iva2 + $this->iva4 + $this->iva5 + $this->iva7 + $this->iva10 + $this->iva21;
  202. }
  203. public function getTotalEquivalenceSurchargeAmount(): float
  204. {
  205. return $this->re2 + $this->re4 + $this->re5 + $this->re7 + $this->re10 + $this->re21;
  206. }
  207. }