BillTotalDetail.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <?php
  2. namespace AppBundle\Entity\Billing;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Dunglas\ApiBundle\Annotation\Iri;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use AppBundle\Entity\Traits\TimestampableEntity;
  9. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  10. /**
  11. * Totaux des lignes BillLine d'une facture BillAccounting, avec calcul de TVA
  12. *
  13. * @Iri("http://schema.org/BillTotalDetail")
  14. */
  15. #[ORM\Entity]
  16. class BillTotalDetail
  17. {
  18. use TimestampableEntity;
  19. use CreatorUpdaterEntity;
  20. /**
  21. * @var int
  22. */
  23. #[ORM\Column(type: 'integer')]
  24. #[ORM\Id]
  25. #[ORM\GeneratedValue(strategy: 'AUTO')]
  26. #[Groups(['billtotaldetail', 'billaccounting_list', 'bill_list', 'billcredit_list', 'build_bills'])]
  27. private $id;
  28. /**
  29. * @var array
  30. */
  31. #[ORM\Column(type: 'json_array', nullable: true)]
  32. #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
  33. private $vat;
  34. /**
  35. * @var float
  36. */
  37. #[ORM\Column(type: 'float', nullable: true)]
  38. #[Assert\Type(type: 'float')]
  39. #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
  40. private $htNoReduc;
  41. /**
  42. * @var float
  43. */
  44. #[ORM\Column(type: 'float', nullable: true)]
  45. #[Assert\Type(type: 'float')]
  46. #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
  47. private $ht;
  48. /**
  49. * @var float
  50. */
  51. #[ORM\Column(type: 'float', nullable: true)]
  52. #[Assert\Type(type: 'float')]
  53. #[Groups(['billtotaldetail', 'billaccounting_list_totaldetail', 'bill_list_totaldetail', 'my_bills_show_bills', 'billcredit_list_totaldetail', 'build_bills_totaldetail'])]
  54. private $ttc;
  55. /**
  56. * @var float
  57. */
  58. #[ORM\Column(type: 'float', nullable: true)]
  59. #[Assert\Type(type: 'float')]
  60. #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
  61. private $totalReduction;
  62. /**
  63. * Constructor
  64. */
  65. public function __construct()
  66. {
  67. }
  68. /**
  69. * Sets id.
  70. *
  71. * @param int $id
  72. *
  73. * @return $this
  74. */
  75. public function setId($id)
  76. {
  77. $this->id = $id;
  78. return $this;
  79. }
  80. /**
  81. * Gets id.
  82. *
  83. * @return int
  84. */
  85. public function getId()
  86. {
  87. return $this->id;
  88. }
  89. /**
  90. * Set htNoReduc
  91. *
  92. * @param float $htNoReduc
  93. *
  94. * @return BillTotalDetail
  95. */
  96. public function setHtNoReduc($htNoReduc)
  97. {
  98. $this->htNoReduc = $htNoReduc;
  99. return $this;
  100. }
  101. /**
  102. * Get htNoReduc
  103. *
  104. * @return float
  105. */
  106. public function getHtNoReduc()
  107. {
  108. return $this->htNoReduc;
  109. }
  110. /**
  111. * Set ht
  112. *
  113. * @param float $ht
  114. *
  115. * @return BillTotalDetail
  116. */
  117. public function setHt($ht)
  118. {
  119. $this->ht = $ht;
  120. return $this;
  121. }
  122. /**
  123. * Get ht
  124. *
  125. * @return float
  126. */
  127. public function getHt()
  128. {
  129. return $this->ht;
  130. }
  131. /**
  132. * Set ttc
  133. *
  134. * @param float $ttc
  135. *
  136. * @return BillTotalDetail
  137. */
  138. public function setTtc($ttc)
  139. {
  140. $this->ttc = $ttc;
  141. return $this;
  142. }
  143. /**
  144. * Get ttc
  145. *
  146. * @return float
  147. */
  148. public function getTtc()
  149. {
  150. return $this->ttc;
  151. }
  152. /**
  153. * Set totalReduction
  154. *
  155. * @param float $totalReduction
  156. *
  157. * @return BillTotalDetail
  158. */
  159. public function setTotalReduction($totalReduction)
  160. {
  161. $this->totalReduction = $totalReduction;
  162. return $this;
  163. }
  164. /**
  165. * Get totalReduction
  166. *
  167. * @return float
  168. */
  169. public function getTotalReduction()
  170. {
  171. return $this->totalReduction;
  172. }
  173. /**
  174. * Set vat
  175. *
  176. * @param array $vat
  177. *
  178. * @return BillTotalDetail
  179. */
  180. public function setVat($vat)
  181. {
  182. $this->vat = $vat;
  183. return $this;
  184. }
  185. /**
  186. * Get vat
  187. *
  188. * @return array
  189. */
  190. public function getVat()
  191. {
  192. return $this->vat;
  193. }
  194. }