src/Entity/System/AccountingMoneybox.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity(repositoryClass="App\Repository\System\AccountingMoneyboxRepository")
  6. *
  7. * @ORM\Table(name="contabilidad_monedero", indexes={
  8. *
  9. * @ORM\Index(name="id_order", columns={"id_order"}),
  10. * @ORM\Index(name="fecha", columns={"fecha"}),
  11. * @ORM\Index(name="contabilidad_monedero_a4b_uuid_index", columns={"a4b_uuid"}),
  12. * @ORM\Index(name="contabilidad_monedero_type_index", columns={"type"}),
  13. * @ORM\Index(name="id_customer", columns={"id_customer"}),
  14. * @ORM\Index(name="date_add", columns={"date_add"})
  15. * })
  16. */
  17. class AccountingMoneybox
  18. {
  19. public const STATUS_SUCCESS = 'OK';
  20. public const STATUS_PENDING = null;
  21. public const TYPE_ENTRY = 1;
  22. public const TYPE_WITHDRAWAL = 2;
  23. /**
  24. * @ORM\Id
  25. *
  26. * @ORM\GeneratedValue(strategy="AUTO")
  27. *
  28. * @ORM\Column(name="id_monedero", type="integer")
  29. */
  30. private int $id;
  31. /**
  32. * @var Order|null
  33. *
  34. * @ORM\ManyToOne(targetEntity="App\Entity\System\Order")
  35. *
  36. * @ORM\JoinColumn(name="id_order", referencedColumnName="id_order")
  37. */
  38. private ?Order $order = null;
  39. /**
  40. * @var Customer
  41. *
  42. * @ORM\ManyToOne(targetEntity="Customer")
  43. *
  44. * @ORM\JoinColumn(name="id_customer", referencedColumnName="id_customer", nullable=false)
  45. */
  46. private $customer;
  47. /**
  48. * @ORM\Column(name="fecha", type="datetime", nullable=true)
  49. */
  50. private ?\DateTime $date;
  51. /**
  52. * @ORM\Column(name="monederoantes", type="float", nullable=true)
  53. */
  54. private ?float $moneyboxBefore;
  55. /**
  56. * @ORM\Column(name="monederodespues", type="float", nullable=true)
  57. */
  58. private ?float $moneyboxAfter;
  59. /**
  60. * @ORM\Column(name="reembolsopedido", type="float", nullable=true)
  61. */
  62. private ?float $orderRefund;
  63. /**
  64. * @ORM\Column(name="reembolsotransporte", type="float", nullable=true)
  65. */
  66. private ?float $shippingRefund;
  67. /**
  68. * @ORM\Column(name="estado", length=3, type="string", nullable=true)
  69. */
  70. private ?string $status;
  71. /**
  72. * @ORM\Column(name="agencia", type="integer", nullable=true)
  73. */
  74. private ?int $agency;
  75. /**
  76. * @ORM\Column(name="concepto", length=50, type="string", nullable=true)
  77. */
  78. private ?string $concept;
  79. /**
  80. * @ORM\Column(name="descripcion_concepto", type="text", nullable=true)
  81. */
  82. private ?string $conceptDescription;
  83. /**
  84. * @ORM\Column(name="cambio", type="float", nullable=true)
  85. */
  86. private ?float $change;
  87. /**
  88. * @ORM\Column(type="integer", nullable=true)
  89. */
  90. private ?int $createUser;
  91. /**
  92. * @ORM\Column(type="datetime", options={"default":"CURRENT_TIMESTAMP"})
  93. */
  94. private ?\DateTime $dateAdd;
  95. /**
  96. * @ORM\Column(name="a4b_uuid", length=36, type="string", nullable=true)
  97. */
  98. private ?string $a4bUuid = null;
  99. /**
  100. * @ORM\Column(type="integer", nullable=true)
  101. */
  102. private ?int $type;
  103. public function getId(): int
  104. {
  105. return $this->id;
  106. }
  107. public function setId(int $id): AccountingMoneybox
  108. {
  109. $this->id = $id;
  110. return $this;
  111. }
  112. public function getOrder(): ?Order
  113. {
  114. if ($this->order && $this->order->getId() === 0) {
  115. return null;
  116. }
  117. return $this->order;
  118. }
  119. public function setOrder(Order $order): AccountingMoneybox
  120. {
  121. $this->order = $order;
  122. return $this;
  123. }
  124. public function getCustomer(): Customer
  125. {
  126. return $this->customer;
  127. }
  128. public function setCustomer(Customer $customer): AccountingMoneybox
  129. {
  130. $this->customer = $customer;
  131. return $this;
  132. }
  133. public function getDate(): ?\DateTime
  134. {
  135. return $this->date;
  136. }
  137. public function setDate(?\DateTime $date): AccountingMoneybox
  138. {
  139. $this->date = $date;
  140. return $this;
  141. }
  142. public function getMoneyboxBefore(): ?float
  143. {
  144. return $this->moneyboxBefore;
  145. }
  146. public function setMoneyboxBefore(?float $moneyboxBefore): AccountingMoneybox
  147. {
  148. $this->moneyboxBefore = $moneyboxBefore;
  149. return $this;
  150. }
  151. public function getMoneyboxAfter(): ?float
  152. {
  153. return $this->moneyboxAfter;
  154. }
  155. public function setMoneyboxAfter(?float $moneyboxAfter): AccountingMoneybox
  156. {
  157. $this->moneyboxAfter = $moneyboxAfter;
  158. return $this;
  159. }
  160. public function getOrderRefund(): ?float
  161. {
  162. return $this->orderRefund;
  163. }
  164. public function setOrderRefund(?float $orderRefund): AccountingMoneybox
  165. {
  166. $this->orderRefund = $orderRefund;
  167. return $this;
  168. }
  169. public function getShippingRefund(): ?float
  170. {
  171. return $this->shippingRefund;
  172. }
  173. public function setShippingRefund(?float $shippingRefund): AccountingMoneybox
  174. {
  175. $this->shippingRefund = $shippingRefund;
  176. return $this;
  177. }
  178. public function getStatus(): ?string
  179. {
  180. return $this->status;
  181. }
  182. public function setStatus(?string $status): AccountingMoneybox
  183. {
  184. $this->status = $status;
  185. return $this;
  186. }
  187. public function getAgency(): ?int
  188. {
  189. return $this->agency;
  190. }
  191. public function setAgency(?int $agency): AccountingMoneybox
  192. {
  193. $this->agency = $agency;
  194. return $this;
  195. }
  196. public function getConcept(): ?string
  197. {
  198. return $this->concept;
  199. }
  200. public function setConcept(?string $concept): AccountingMoneybox
  201. {
  202. $this->concept = $concept;
  203. return $this;
  204. }
  205. public function getConceptDescription(): ?string
  206. {
  207. return $this->conceptDescription;
  208. }
  209. public function setConceptDescription(?string $conceptDescription): AccountingMoneybox
  210. {
  211. $this->conceptDescription = $conceptDescription;
  212. return $this;
  213. }
  214. public function getChange(): ?float
  215. {
  216. return $this->change;
  217. }
  218. public function setChange(?float $change): AccountingMoneybox
  219. {
  220. $this->change = $change;
  221. return $this;
  222. }
  223. public function getCreateUser(): ?int
  224. {
  225. return $this->createUser;
  226. }
  227. public function setCreateUser(?int $createUser): AccountingMoneybox
  228. {
  229. $this->createUser = $createUser;
  230. return $this;
  231. }
  232. public function getDateAdd(): ?\DateTime
  233. {
  234. return $this->dateAdd;
  235. }
  236. public function setDateAdd(?\DateTime $dateAdd): AccountingMoneybox
  237. {
  238. $this->dateAdd = $dateAdd;
  239. return $this;
  240. }
  241. public function getA4bUuid(): ?string
  242. {
  243. return $this->a4bUuid;
  244. }
  245. public function setA4bUuid(?string $a4bUuid): AccountingMoneybox
  246. {
  247. $this->a4bUuid = $a4bUuid;
  248. return $this;
  249. }
  250. public function getType(): ?int
  251. {
  252. return $this->type;
  253. }
  254. public function setType(?int $type): AccountingMoneybox
  255. {
  256. $this->type = $type;
  257. return $this;
  258. }
  259. }