src/Entity/System/Order.php line 31

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Doctrine\ORM\Mapping\OneToOne;
  7. use Doctrine\ORM\Mapping\JoinColumn;
  8. /**
  9. * Order
  10. *
  11. * @ORM\Table(
  12. * name="ps_orders",
  13. * indexes={
  14. *
  15. * @ORM\Index(name="ref_order_supplier", columns={"ref_order_supplier"}),
  16. * @ORM\Index(name="id_carrier_master", columns={"id_carrier_master"}),
  17. * @ORM\Index(name="transaction_id", columns={"transaction_id"}),
  18. * @ORM\Index(name="id_carrier", columns={"id_carrier"}),
  19. * @ORM\Index(name="date_add", columns={"date_add"}),
  20. * @ORM\Index(name="is_tracking", columns={"is_tracking"}),
  21. * @ORM\Index(name="id_currency", columns={"id_currency"}),
  22. * @ORM\Index(name="id_customer__order_state__total_paid", columns={"id_customer", "id_order_state", "total_paid"})
  23. * }
  24. * )
  25. *
  26. * @ORM\Entity(repositoryClass="App\Repository\System\OrderRepository")
  27. */
  28. class Order
  29. {
  30. public const PRODUCTS_ORDER_TYPE = 1;
  31. public const PACK_ORDER_TYPE = 2;
  32. public const SERVICES_ORDER_TYPE = 3;
  33. public const PACK_AND_SERVICES_ORDER_TYPE = 5;
  34. public const MAX_DROPSHIPPING_ORDERS_PER_MONTH = 3;
  35. /**
  36. * @var int
  37. *
  38. * @ORM\Id()
  39. *
  40. * @ORM\GeneratedValue()
  41. *
  42. * @ORM\Column(type="integer", name="id_order")
  43. */
  44. private $id;
  45. /**
  46. * One Order has One Cart.
  47. *
  48. * @var Cart
  49. *
  50. * @OneToOne(targetEntity="App\Entity\System\Cart", mappedBy="order")
  51. *
  52. * @JoinColumn(name="id_cart", referencedColumnName="id_cart", nullable=false, unique=true)
  53. */
  54. private $cart;
  55. /**
  56. * @var string|null
  57. *
  58. * @ORM\Column(type="string", length=9, nullable=true)
  59. */
  60. private $reference;
  61. /**
  62. * @var int
  63. *
  64. * @ORM\Column(type="integer", length=10)
  65. */
  66. private $idCarrier;
  67. /**
  68. * @var Customer
  69. *
  70. * @ORM\ManyToOne(targetEntity="App\Entity\System\Customer", inversedBy="orders")
  71. *
  72. * @ORM\JoinColumn(nullable=false, name="id_customer", referencedColumnName="id_customer")
  73. */
  74. private $customer;
  75. /**
  76. * @var CodeDiscount|null
  77. *
  78. * @ORM\ManyToOne(targetEntity="App\Entity\System\CodeDiscount", inversedBy="orders")
  79. *
  80. * @ORM\JoinColumn(nullable=true, name="id_voucher")
  81. */
  82. private $idVoucher;
  83. /**
  84. * @var int
  85. *
  86. * @ORM\Column(type="integer", length=10)
  87. */
  88. private $idCurrency;
  89. /**
  90. * @var Address
  91. *
  92. * @ORM\ManyToOne(targetEntity="App\Entity\System\Address")
  93. *
  94. * @ORM\JoinColumn(name="id_address_delivery", referencedColumnName="id_address", nullable=false)
  95. */
  96. private $deliveryAddress;
  97. /**
  98. * @var OrderStatus
  99. *
  100. * @ORM\ManyToOne(targetEntity="App\Entity\System\OrderStatus")
  101. *
  102. * @ORM\JoinColumn(name="id_order_state", referencedColumnName="id", nullable=false)
  103. */
  104. private $orderStatus;
  105. /**
  106. * @deprecated
  107. *
  108. * @var Language|null
  109. *
  110. * @ORM\ManyToOne(targetEntity="App\Entity\System\Language")
  111. *
  112. * @ORM\JoinColumn(name="id_lang", referencedColumnName="id_lang", nullable=true)
  113. */
  114. private $language;
  115. /**
  116. * @deprecated use paymentMethod relationship instead
  117. *
  118. * @var string
  119. *
  120. * @ORM\Column(type="string", length=255)
  121. */
  122. private $payment;
  123. /**
  124. * @var float
  125. *
  126. * @ORM\Column(type="float", options={"default" : 1.000000})
  127. */
  128. private $conversionRate;
  129. /**
  130. * @var string|null
  131. *
  132. * @ORM\Column(type="string", length=255, nullable=true)
  133. */
  134. private $module;
  135. /**
  136. * @var bool
  137. *
  138. * @ORM\Column(type="boolean", options={"default" : 0})
  139. */
  140. private $dropshipping;
  141. /**
  142. * @var float
  143. *
  144. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  145. */
  146. private $totalDiscounts;
  147. /**
  148. * @var float
  149. *
  150. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  151. */
  152. private $totalDiscountsTaxIncl;
  153. /**
  154. * @var float
  155. *
  156. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  157. */
  158. private $totalDiscountsTaxExcl;
  159. /**
  160. * @var float
  161. *
  162. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  163. */
  164. private $totalPaid;
  165. /**
  166. * @var float
  167. *
  168. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  169. */
  170. private $totalPaidTaxIncl;
  171. /**
  172. * @var float
  173. *
  174. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  175. */
  176. private $totalPaidTaxExcl;
  177. /**
  178. * @var float
  179. *
  180. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  181. */
  182. private $totalPaidReal;
  183. /**
  184. * @var float
  185. *
  186. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  187. */
  188. private $totalProducts;
  189. /**
  190. * @var float
  191. *
  192. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  193. */
  194. private $totalProductsWt;
  195. /**
  196. * @var float
  197. *
  198. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  199. */
  200. private $totalShipping;
  201. /**
  202. * @var float
  203. *
  204. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  205. */
  206. private $totalShippingTaxIncl;
  207. /**
  208. * @var float
  209. *
  210. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  211. */
  212. private $totalShippingTaxExcl;
  213. /**
  214. * @var float
  215. *
  216. * @ORM\Column(type="float", precision=10, scale=3, options={"default" : 0.000})
  217. */
  218. private $carrierTaxRate;
  219. /**
  220. * @var float
  221. *
  222. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  223. */
  224. private $totalWrapping;
  225. /**
  226. * @var float
  227. *
  228. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  229. */
  230. private $totalWrappingTaxIncl;
  231. /**
  232. * @var float
  233. *
  234. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  235. */
  236. private $totalWrappingTaxExcl;
  237. /**
  238. * @var \DateTime|null
  239. *
  240. * @ORM\Column(type="datetime", nullable=true)
  241. */
  242. private $invoiceDate;
  243. /**
  244. * @var \DateTime|null
  245. *
  246. * @ORM\Column(type="datetime", nullable=true)
  247. */
  248. private $deliveryDate;
  249. /**
  250. * @var int
  251. *
  252. * @ORM\Column(type="integer", length=1, options={"default" : 0})
  253. */
  254. private $valid;
  255. /**
  256. * @var bool
  257. *
  258. * @ORM\Column(type="boolean", options={"default" : 0})
  259. */
  260. private $validateTransfer;
  261. /**
  262. * @var string|null
  263. *
  264. * @ORM\Column(type="string", length=128, nullable=true)
  265. */
  266. private $refOrderSupplier;
  267. /**
  268. * @var \DateTime
  269. *
  270. * @ORM\Column(type="datetime")
  271. */
  272. private $dateAdd;
  273. /**
  274. * @var \DateTime
  275. *
  276. * @ORM\Column(type="datetime")
  277. */
  278. private $dateUpd;
  279. /**
  280. * @var float
  281. *
  282. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  283. */
  284. private $purse;
  285. /**
  286. * @var float
  287. *
  288. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  289. */
  290. private $dropshippingQty;
  291. /**
  292. * @var float
  293. *
  294. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  295. */
  296. private $paymentMethodCost;
  297. /**
  298. * @var float
  299. *
  300. * @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
  301. */
  302. private $dropshippingCost;
  303. /**
  304. * @var bool
  305. *
  306. * @ORM\Column(type="boolean", options={"default" : 0})
  307. */
  308. private $re;
  309. /**
  310. * @var string|null
  311. *
  312. * @ORM\Column(type="string", length=254, nullable=true)
  313. */
  314. private $transactionId;
  315. /**
  316. * @var bool|null
  317. *
  318. * @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
  319. */
  320. private $refund;
  321. /**
  322. * @var bool
  323. *
  324. * @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
  325. */
  326. private $fullRefund;
  327. /**
  328. * @var string|null
  329. *
  330. * @ORM\Column(type="string", length=1, options={"default" : 1}, nullable=true)
  331. */
  332. private $intracomunitario;
  333. /**
  334. * @var bool|null
  335. *
  336. * @ORM\Column(type="boolean", nullable=true)
  337. */
  338. private $isTracking;
  339. /**
  340. * @var int|null
  341. *
  342. * @ORM\Column(type="integer", options={"default" : 0}, nullable=true)
  343. */
  344. private $stateDropshipping;
  345. /**
  346. * @var float|null
  347. *
  348. * @ORM\Column(type="float", options={"default" : 0}, nullable=true)
  349. */
  350. private $volWeight;
  351. /**
  352. * @var int|null
  353. *
  354. * @ORM\Column(type="integer", length=11, options={"default" : 0}, nullable=true)
  355. */
  356. private $idCarrierMaster;
  357. /**
  358. * @var bool|null
  359. *
  360. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
  361. */
  362. private $quantityStockSupplier;
  363. /**
  364. * @var bool|null
  365. *
  366. * @ORM\Column(name="quantity_stock_supplier_3_5", type="boolean", options={"default" : 0}, nullable=true)
  367. */
  368. private $quantityStockSupplier3To5;
  369. /**
  370. * @var bool|null
  371. *
  372. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
  373. */
  374. private $quantityFutureStock;
  375. /**
  376. * @var int|null
  377. *
  378. * @ORM\Column(type="integer", length=10, options={"default" : 0}, nullable=true)
  379. */
  380. private $idPack;
  381. /**
  382. * @var \DateTime|null
  383. *
  384. * @ORM\Column(type="datetime", nullable=true)
  385. */
  386. private $deliveredDate;
  387. /**
  388. * @var bool|null
  389. *
  390. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
  391. */
  392. private $api;
  393. /**
  394. * @var bool|null
  395. *
  396. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
  397. */
  398. private $isSystem;
  399. /**
  400. * @var string|null
  401. *
  402. * @ORM\Column(type="string", length=255, nullable=true)
  403. */
  404. private $sellingChannel;
  405. /**
  406. * @var \DateTime|null
  407. *
  408. * @ORM\Column(type="date", nullable=true)
  409. */
  410. private $dateAmazon;
  411. /**
  412. * @var string|null
  413. *
  414. * @ORM\Column(type="string", length=256, nullable=true)
  415. */
  416. private $additionalParameters;
  417. /**
  418. * @var \DateTime|null
  419. *
  420. * @ORM\Column(type="datetime", nullable=true)
  421. */
  422. private $estimatedShippingDate;
  423. /**
  424. * @var \DateTime|null
  425. *
  426. * @ORM\Column(type="datetime", nullable=true)
  427. */
  428. private $scheduledConfirmationDate;
  429. /**
  430. * @var string|null
  431. *
  432. * @ORM\Column(type="string", length=36, nullable=true)
  433. */
  434. private $a4bUuid;
  435. /**
  436. * @var bool
  437. *
  438. * @ORM\Column(type="boolean", nullable=false)
  439. */
  440. private $dispute;
  441. /**
  442. * @var Collection<int, OrderDetail>&iterable<OrderDetail>
  443. *
  444. * @ORM\OneToMany(targetEntity="App\Entity\System\OrderDetail", mappedBy="order", cascade={"all"}, orphanRemoval=true)
  445. */
  446. private $orderDetails;
  447. /**
  448. * @var Warehouse
  449. *
  450. * @ORM\ManyToOne(targetEntity="App\Entity\System\Warehouse")
  451. *
  452. * @ORM\JoinColumn(name="warehouse_id", referencedColumnName="id", nullable=false, options={"default" : 1}))
  453. */
  454. private $warehouse;
  455. /**
  456. * @var OrderNotification|null
  457. *
  458. * @ORM\OneToOne(targetEntity="OrderNotification", mappedBy="order")
  459. */
  460. private $notification;
  461. /**
  462. * @var Collection<int, Invoice>&iterable<Invoice>
  463. *
  464. * @ORM\ManyToMany(targetEntity="Invoice", mappedBy="orders")
  465. */
  466. private $invoice;
  467. /**
  468. * @var OrderCancellationRequest|null
  469. *
  470. * @ORM\OneToOne(targetEntity="OrderCancellationRequest", mappedBy="order")
  471. */
  472. private ?OrderCancellationRequest $cancellationRequest;
  473. /**
  474. * @deprecated use paymentMethod relationship instead
  475. *
  476. * @var string|null
  477. *
  478. * @ORM\Column(type="string", length=64, nullable=true)
  479. */
  480. private $paymentMethodType;
  481. /**
  482. * @var string|null
  483. *
  484. * @ORM\Column(type="string", nullable=true)
  485. */
  486. private $paypalPayerId;
  487. /**
  488. * @var string|null
  489. *
  490. * @ORM\Column(type="string", nullable=true)
  491. */
  492. private $paypalPayerEmail;
  493. /**
  494. * @var OrderTax|null
  495. *
  496. * @ORM\OneToOne(targetEntity="App\Entity\System\OrderTax", mappedBy="order")
  497. */
  498. private $orderTax;
  499. /**
  500. * @ORM\Column(type="boolean", options={"default" : 0})
  501. */
  502. private bool $fba = false;
  503. /**
  504. * @ORM\Column(type="datetime", nullable=true)
  505. */
  506. private ?\DateTime $maxExpeditionDatetime = null;
  507. /**
  508. * @ORM\Column(type="datetime", nullable=true)
  509. */
  510. private ?\DateTime $maxDeliveryDatetime = null;
  511. /**
  512. * @ORM\Column(type="float", nullable=true)
  513. */
  514. private ?float $logisticWeight;
  515. /**
  516. * @var PaymentMethod
  517. *
  518. * @ORM\ManyToOne(targetEntity="App\Entity\System\PaymentMethod")
  519. *
  520. * @ORM\JoinColumn(name="payment_method", referencedColumnName="id_payment_method", nullable=false)
  521. */
  522. private $paymentMethod;
  523. /**
  524. * @var Collection<int, Tracking>&iterable<Tracking>
  525. *
  526. * @ORM\OneToMany(targetEntity="App\Entity\System\Tracking", mappedBy="order", cascade={"persist"})
  527. */
  528. private $trackings;
  529. /**
  530. * Order constructor.
  531. */
  532. public function __construct()
  533. {
  534. $this->idCurrency = Cart::DEFAULT_CURRENCY_EUR;
  535. $this->conversionRate = 1.000000;
  536. $this->dropshipping = false;
  537. $this->totalDiscounts = 0.00;
  538. $this->totalDiscountsTaxIncl = 0.00;
  539. $this->totalDiscountsTaxExcl = 0.00;
  540. $this->totalPaid = 0.00;
  541. $this->totalPaidTaxIncl = 0.00;
  542. $this->totalPaidTaxExcl = 0.00;
  543. $this->totalPaidReal = 0.00;
  544. $this->totalProducts = 0.00;
  545. $this->totalProductsWt = 0.00;
  546. $this->totalShipping = 0.00;
  547. $this->totalShippingTaxIncl = 0.00;
  548. $this->totalShippingTaxExcl = 0.00;
  549. $this->carrierTaxRate = 0.000;
  550. $this->totalWrapping = 0.00;
  551. $this->totalWrappingTaxIncl = 0.00;
  552. $this->totalWrappingTaxExcl = 0.00;
  553. $this->valid = 0;
  554. $this->validateTransfer = false;
  555. $this->purse = 0.00;
  556. $this->dropshippingQty = 0.00;
  557. $this->paymentMethodCost = 0.00;
  558. $this->dropshippingCost = 0.00;
  559. $this->re = false;
  560. $this->refund = false;
  561. $this->fullRefund = false;
  562. $this->intracomunitario = '1';
  563. $this->stateDropshipping = 0;
  564. $this->volWeight = 0;
  565. $this->idCarrierMaster = 0;
  566. $this->quantityStockSupplier = false;
  567. $this->quantityStockSupplier3To5 = false;
  568. $this->quantityFutureStock = false;
  569. $this->idPack = Pack::PACK_WITHOUT_PACK;
  570. $this->api = false;
  571. $this->isSystem = false;
  572. $this->dispute = false;
  573. $this->orderDetails = new ArrayCollection();
  574. $this->invoice = new ArrayCollection();
  575. $this->trackings = new ArrayCollection();
  576. }
  577. public function getId(): int
  578. {
  579. return $this->id;
  580. }
  581. public function setId(int $id): Order
  582. {
  583. $this->id = $id;
  584. return $this;
  585. }
  586. public function getReference(): ?string
  587. {
  588. return $this->reference;
  589. }
  590. public function setReference(?string $reference): Order
  591. {
  592. $this->reference = $reference;
  593. return $this;
  594. }
  595. public function getIdCarrier(): int
  596. {
  597. return $this->idCarrier;
  598. }
  599. public function setIdCarrier(int $idCarrier): Order
  600. {
  601. $this->idCarrier = $idCarrier;
  602. return $this;
  603. }
  604. public function getIdVoucher(): ?CodeDiscount
  605. {
  606. if ($this->idVoucher && $this->idVoucher->getId() === 0) {
  607. return null;
  608. }
  609. return $this->idVoucher;
  610. }
  611. public function setIdVoucher(?CodeDiscount $idVoucher): Order
  612. {
  613. $this->idVoucher = $idVoucher;
  614. return $this;
  615. }
  616. public function getIdCurrency(): int
  617. {
  618. return $this->idCurrency;
  619. }
  620. public function setIdCurrency(int $idCurrency): Order
  621. {
  622. $this->idCurrency = $idCurrency;
  623. return $this;
  624. }
  625. public function getDeliveryAddress(): Address
  626. {
  627. return $this->deliveryAddress;
  628. }
  629. public function setDeliveryAddress(Address $deliveryAddress): Order
  630. {
  631. $this->deliveryAddress = $deliveryAddress;
  632. return $this;
  633. }
  634. /**
  635. * @deprecated
  636. */
  637. public function getLanguage(): ?Language
  638. {
  639. return $this->language;
  640. }
  641. /**
  642. * @deprecated
  643. */
  644. public function setLanguage(?Language $language): Order
  645. {
  646. $this->language = $language;
  647. return $this;
  648. }
  649. public function getPayment(): string
  650. {
  651. return $this->paymentMethod->getPayment();
  652. }
  653. public function getConversionRate(): float
  654. {
  655. return $this->conversionRate;
  656. }
  657. public function setConversionRate(float $conversionRate): Order
  658. {
  659. $this->conversionRate = $conversionRate;
  660. return $this;
  661. }
  662. public function getModule(): ?string
  663. {
  664. return $this->module;
  665. }
  666. public function setModule(?string $module): Order
  667. {
  668. $this->module = $module;
  669. return $this;
  670. }
  671. public function isDropshipping(): bool
  672. {
  673. return $this->dropshipping;
  674. }
  675. public function setDropshipping(bool $dropshipping): Order
  676. {
  677. $this->dropshipping = $dropshipping;
  678. return $this;
  679. }
  680. public function getTotalDiscounts(): float
  681. {
  682. return $this->totalDiscounts;
  683. }
  684. public function setTotalDiscounts(float $totalDiscounts): Order
  685. {
  686. $this->totalDiscounts = $totalDiscounts;
  687. return $this;
  688. }
  689. public function getTotalDiscountsTaxIncl(): float
  690. {
  691. return $this->totalDiscountsTaxIncl;
  692. }
  693. public function setTotalDiscountsTaxIncl(float $totalDiscountsTaxIncl): Order
  694. {
  695. $this->totalDiscountsTaxIncl = $totalDiscountsTaxIncl;
  696. return $this;
  697. }
  698. public function getTotalDiscountsTaxExcl(): float
  699. {
  700. return $this->totalDiscountsTaxExcl;
  701. }
  702. public function setTotalDiscountsTaxExcl(float $totalDiscountsTaxExcl): Order
  703. {
  704. $this->totalDiscountsTaxExcl = $totalDiscountsTaxExcl;
  705. return $this;
  706. }
  707. public function getTotalPaid(): float
  708. {
  709. return $this->totalPaid;
  710. }
  711. public function setTotalPaid(float $totalPaid): Order
  712. {
  713. $this->totalPaid = $totalPaid;
  714. return $this;
  715. }
  716. public function getTotalPaidTaxIncl(): float
  717. {
  718. return $this->totalPaidTaxIncl;
  719. }
  720. public function setTotalPaidTaxIncl(float $totalPaidTaxIncl): Order
  721. {
  722. $this->totalPaidTaxIncl = $totalPaidTaxIncl;
  723. return $this;
  724. }
  725. public function getTotalPaidTaxExcl(): float
  726. {
  727. return $this->totalPaidTaxExcl;
  728. }
  729. public function setTotalPaidTaxExcl(float $totalPaidTaxExcl): Order
  730. {
  731. $this->totalPaidTaxExcl = $totalPaidTaxExcl;
  732. return $this;
  733. }
  734. public function getTotalPaidReal(): float
  735. {
  736. return $this->totalPaidReal;
  737. }
  738. public function setTotalPaidReal(float $totalPaidReal): Order
  739. {
  740. $this->totalPaidReal = $totalPaidReal;
  741. return $this;
  742. }
  743. public function getTotalProducts(): float
  744. {
  745. return $this->totalProducts;
  746. }
  747. public function setTotalProducts(float $totalProducts): Order
  748. {
  749. $this->totalProducts = $totalProducts;
  750. return $this;
  751. }
  752. public function getTotalProductsWt(): float
  753. {
  754. return $this->totalProductsWt;
  755. }
  756. public function setTotalProductsWt(float $totalProductsWt): Order
  757. {
  758. $this->totalProductsWt = $totalProductsWt;
  759. return $this;
  760. }
  761. public function getTotalShipping(): float
  762. {
  763. return $this->totalShipping;
  764. }
  765. public function setTotalShipping(float $totalShipping): Order
  766. {
  767. $this->totalShipping = $totalShipping;
  768. return $this;
  769. }
  770. public function getTotalShippingTaxIncl(): float
  771. {
  772. return $this->totalShippingTaxIncl;
  773. }
  774. public function setTotalShippingTaxIncl(float $totalShippingTaxIncl): Order
  775. {
  776. $this->totalShippingTaxIncl = $totalShippingTaxIncl;
  777. return $this;
  778. }
  779. public function getTotalShippingTaxExcl(): float
  780. {
  781. return $this->totalShippingTaxExcl;
  782. }
  783. public function setTotalShippingTaxExcl(float $totalShippingTaxExcl): Order
  784. {
  785. $this->totalShippingTaxExcl = $totalShippingTaxExcl;
  786. return $this;
  787. }
  788. public function getCarrierTaxRate(): float
  789. {
  790. return $this->carrierTaxRate;
  791. }
  792. public function setCarrierTaxRate(float $carrierTaxRate): Order
  793. {
  794. $this->carrierTaxRate = $carrierTaxRate;
  795. return $this;
  796. }
  797. public function getTotalWrapping(): float
  798. {
  799. return $this->totalWrapping;
  800. }
  801. public function setTotalWrapping(float $totalWrapping): Order
  802. {
  803. $this->totalWrapping = $totalWrapping;
  804. return $this;
  805. }
  806. public function getTotalWrappingTaxIncl(): float
  807. {
  808. return $this->totalWrappingTaxIncl;
  809. }
  810. public function setTotalWrappingTaxIncl(float $totalWrappingTaxIncl): Order
  811. {
  812. $this->totalWrappingTaxIncl = $totalWrappingTaxIncl;
  813. return $this;
  814. }
  815. public function getTotalWrappingTaxExcl(): float
  816. {
  817. return $this->totalWrappingTaxExcl;
  818. }
  819. public function setTotalWrappingTaxExcl(float $totalWrappingTaxExcl): Order
  820. {
  821. $this->totalWrappingTaxExcl = $totalWrappingTaxExcl;
  822. return $this;
  823. }
  824. public function getInvoiceDate(): ?\DateTime
  825. {
  826. return $this->invoiceDate;
  827. }
  828. public function setInvoiceDate(?\DateTime $invoiceDate): Order
  829. {
  830. $this->invoiceDate = $invoiceDate;
  831. return $this;
  832. }
  833. public function getDeliveryDate(): ?\DateTime
  834. {
  835. return $this->deliveryDate;
  836. }
  837. public function setDeliveryDate(?\DateTime $deliveryDate): Order
  838. {
  839. $this->deliveryDate = $deliveryDate;
  840. return $this;
  841. }
  842. public function getValid(): int
  843. {
  844. return $this->valid;
  845. }
  846. public function setValid(int $valid): Order
  847. {
  848. $this->valid = $valid;
  849. return $this;
  850. }
  851. public function isValidateTransfer(): bool
  852. {
  853. return $this->validateTransfer;
  854. }
  855. public function setValidateTransfer(bool $validateTransfer): Order
  856. {
  857. $this->validateTransfer = $validateTransfer;
  858. return $this;
  859. }
  860. public function getRefOrderSupplier(): ?string
  861. {
  862. return $this->refOrderSupplier;
  863. }
  864. public function setRefOrderSupplier(?string $refOrderSupplier): Order
  865. {
  866. $this->refOrderSupplier = $refOrderSupplier;
  867. return $this;
  868. }
  869. public function getDateAdd(): \DateTime
  870. {
  871. return $this->dateAdd;
  872. }
  873. public function setDateAdd(\DateTime $dateAdd): Order
  874. {
  875. $this->dateAdd = $dateAdd;
  876. return $this;
  877. }
  878. public function getDateUpd(): \DateTime
  879. {
  880. return $this->dateUpd;
  881. }
  882. public function setDateUpd(\DateTime $dateUpd): Order
  883. {
  884. $this->dateUpd = $dateUpd;
  885. return $this;
  886. }
  887. public function getPurse(): float
  888. {
  889. return $this->purse;
  890. }
  891. public function setPurse(float $purse): Order
  892. {
  893. $this->purse = $purse;
  894. return $this;
  895. }
  896. public function getDropshippingQty(): float
  897. {
  898. return $this->dropshippingQty;
  899. }
  900. public function setDropshippingQty(float $dropshippingQty): Order
  901. {
  902. $this->dropshippingQty = $dropshippingQty;
  903. return $this;
  904. }
  905. public function getPaymentMethodCost(): float
  906. {
  907. return $this->paymentMethodCost;
  908. }
  909. public function setPaymentMethodCost(float $paymentMethodCost): Order
  910. {
  911. $this->paymentMethodCost = $paymentMethodCost;
  912. return $this;
  913. }
  914. public function getDropshippingCost(): float
  915. {
  916. return $this->dropshippingCost;
  917. }
  918. public function setDropshippingCost(float $dropshippingCost): Order
  919. {
  920. $this->dropshippingCost = $dropshippingCost;
  921. return $this;
  922. }
  923. public function isRe(): bool
  924. {
  925. return $this->re;
  926. }
  927. public function setRe(bool $re): Order
  928. {
  929. $this->re = $re;
  930. return $this;
  931. }
  932. public function getTransactionId(): ?string
  933. {
  934. return $this->transactionId;
  935. }
  936. public function setTransactionId(?string $transactionId): Order
  937. {
  938. $this->transactionId = $transactionId;
  939. return $this;
  940. }
  941. public function getRefund(): ?bool
  942. {
  943. return $this->refund;
  944. }
  945. public function setRefund(?bool $refund): Order
  946. {
  947. $this->refund = $refund;
  948. return $this;
  949. }
  950. public function getIntracomunitario(): ?string
  951. {
  952. return $this->intracomunitario;
  953. }
  954. public function setIntracomunitario(?string $intracomunitario): Order
  955. {
  956. $this->intracomunitario = $intracomunitario;
  957. return $this;
  958. }
  959. public function getIsTracking(): ?bool
  960. {
  961. return $this->isTracking;
  962. }
  963. public function setIsTracking(?bool $isTracking): Order
  964. {
  965. $this->isTracking = $isTracking;
  966. return $this;
  967. }
  968. public function getStateDropshipping(): ?int
  969. {
  970. return $this->stateDropshipping;
  971. }
  972. public function setStateDropshipping(?int $stateDropshipping): Order
  973. {
  974. $this->stateDropshipping = $stateDropshipping;
  975. return $this;
  976. }
  977. /**
  978. * @return float|null
  979. */
  980. public function getVolWeight(): ?float
  981. {
  982. return $this->volWeight;
  983. }
  984. public function setVolWeight(?float $volWeight): Order
  985. {
  986. $this->volWeight = $volWeight;
  987. return $this;
  988. }
  989. public function getIdCarrierMaster(): ?int
  990. {
  991. return $this->idCarrierMaster;
  992. }
  993. public function setIdCarrierMaster(?int $idCarrierMaster): Order
  994. {
  995. $this->idCarrierMaster = $idCarrierMaster;
  996. return $this;
  997. }
  998. public function getQuantityStockSupplier(): ?bool
  999. {
  1000. return $this->quantityStockSupplier;
  1001. }
  1002. public function setQuantityStockSupplier(?bool $quantityStockSupplier): Order
  1003. {
  1004. $this->quantityStockSupplier = $quantityStockSupplier;
  1005. return $this;
  1006. }
  1007. public function getQuantityFutureStock(): ?bool
  1008. {
  1009. return $this->quantityFutureStock;
  1010. }
  1011. public function setQuantityFutureStock(?bool $quantityFutureStock): Order
  1012. {
  1013. $this->quantityFutureStock = $quantityFutureStock;
  1014. return $this;
  1015. }
  1016. public function getIdPack(): ?int
  1017. {
  1018. return $this->idPack;
  1019. }
  1020. public function setIdPack(?int $idPack): Order
  1021. {
  1022. $this->idPack = $idPack;
  1023. return $this;
  1024. }
  1025. public function getDeliveredDate(): ?\DateTime
  1026. {
  1027. return $this->deliveredDate;
  1028. }
  1029. public function setDeliveredDate(?\DateTime $deliveredDate): Order
  1030. {
  1031. $this->deliveredDate = $deliveredDate;
  1032. return $this;
  1033. }
  1034. public function getApi(): ?bool
  1035. {
  1036. return $this->api;
  1037. }
  1038. public function setApi(?bool $api): Order
  1039. {
  1040. $this->api = $api;
  1041. return $this;
  1042. }
  1043. public function isSystem(): ?bool
  1044. {
  1045. return $this->isSystem;
  1046. }
  1047. public function setSystem(?bool $isSystem): Order
  1048. {
  1049. $this->isSystem = $isSystem;
  1050. return $this;
  1051. }
  1052. public function getSellingChannel(): ?string
  1053. {
  1054. return $this->sellingChannel;
  1055. }
  1056. public function setSellingChannel(?string $sellingChannel): Order
  1057. {
  1058. $this->sellingChannel = $sellingChannel;
  1059. return $this;
  1060. }
  1061. public function getDateAmazon(): ?\DateTime
  1062. {
  1063. return $this->dateAmazon;
  1064. }
  1065. public function setDateAmazon(?\DateTime $dateAmazon): Order
  1066. {
  1067. $this->dateAmazon = $dateAmazon;
  1068. return $this;
  1069. }
  1070. public function getAdditionalParameters(): ?string
  1071. {
  1072. return $this->additionalParameters;
  1073. }
  1074. public function setAdditionalParameters(?string $additionalParameters): Order
  1075. {
  1076. $this->additionalParameters = $additionalParameters;
  1077. return $this;
  1078. }
  1079. /**
  1080. * @return Collection<int, OrderDetail>&iterable<OrderDetail>
  1081. */
  1082. public function getOrderDetails()
  1083. {
  1084. return $this->orderDetails;
  1085. }
  1086. /**
  1087. * @param Collection<int, OrderDetail>&iterable<OrderDetail> $orderDetails
  1088. */
  1089. public function setOrderDetails($orderDetails): Order
  1090. {
  1091. $this->orderDetails = $orderDetails;
  1092. return $this;
  1093. }
  1094. public function addOrderDetail(OrderDetail $orderDetail): Order
  1095. {
  1096. if (!$this->orderDetails->contains($orderDetail)) {
  1097. $this->orderDetails[] = $orderDetail;
  1098. }
  1099. return $this;
  1100. }
  1101. public function getCustomer(): Customer
  1102. {
  1103. return $this->customer;
  1104. }
  1105. public function setCustomer(Customer $customer): self
  1106. {
  1107. $this->customer = $customer;
  1108. return $this;
  1109. }
  1110. public function getEstimatedShippingDate(): ?\DateTime
  1111. {
  1112. return $this->estimatedShippingDate;
  1113. }
  1114. public function setEstimatedShippingDate(?\DateTime $estimatedShippingDate): self
  1115. {
  1116. $this->estimatedShippingDate = $estimatedShippingDate;
  1117. return $this;
  1118. }
  1119. public function getA4bUuid(): ?string
  1120. {
  1121. return $this->a4bUuid;
  1122. }
  1123. public function setA4bUuid(?string $a4bUuid): self
  1124. {
  1125. $this->a4bUuid = $a4bUuid;
  1126. return $this;
  1127. }
  1128. public function getDispute(): bool
  1129. {
  1130. return $this->dispute;
  1131. }
  1132. public function setDispute(bool $dispute): self
  1133. {
  1134. $this->dispute = $dispute;
  1135. return $this;
  1136. }
  1137. public function getOrderStatusId(): int
  1138. {
  1139. return $this->orderStatus->getId();
  1140. }
  1141. public function getOrderStatus(): OrderStatus
  1142. {
  1143. return $this->orderStatus;
  1144. }
  1145. public function setOrderStatus(OrderStatus $orderStatus): self
  1146. {
  1147. $this->orderStatus = $orderStatus;
  1148. return $this;
  1149. }
  1150. public function getCart(): ?Cart
  1151. {
  1152. return $this->cart;
  1153. }
  1154. public function setCart(?Cart $cart): Order
  1155. {
  1156. $this->cart = $cart;
  1157. return $this;
  1158. }
  1159. public function getWarehouse(): Warehouse
  1160. {
  1161. return $this->warehouse;
  1162. }
  1163. public function setWarehouse(Warehouse $warehouse): self
  1164. {
  1165. $this->warehouse = $warehouse;
  1166. return $this;
  1167. }
  1168. /**
  1169. * @return Collection<int, Invoice>&iterable<Invoice>
  1170. */
  1171. public function getInvoice()
  1172. {
  1173. return $this->invoice;
  1174. }
  1175. /**
  1176. * @return bool|null
  1177. */
  1178. public function getQuantityStockSupplier3To5(): ?bool
  1179. {
  1180. return $this->quantityStockSupplier3To5;
  1181. }
  1182. /**
  1183. * @param bool|null $quantityStockSupplier3To5
  1184. */
  1185. public function setQuantityStockSupplier3To5(?bool $quantityStockSupplier3To5): void
  1186. {
  1187. $this->quantityStockSupplier3To5 = $quantityStockSupplier3To5;
  1188. }
  1189. public function getPaymentMethodType(): ?string
  1190. {
  1191. return $this->paymentMethod->getSlug();
  1192. }
  1193. public function getPaypalPayerId(): ?string
  1194. {
  1195. return $this->paypalPayerId;
  1196. }
  1197. public function setPaypalPayerId(?string $paypalPayerId): Order
  1198. {
  1199. $this->paypalPayerId = $paypalPayerId;
  1200. return $this;
  1201. }
  1202. public function getPaypalPayerEmail(): ?string
  1203. {
  1204. return $this->paypalPayerEmail;
  1205. }
  1206. public function setPaypalPayerEmail(?string $paypalPayerEmail): Order
  1207. {
  1208. $this->paypalPayerEmail = $paypalPayerEmail;
  1209. return $this;
  1210. }
  1211. public function getOrderTax(): ?OrderTax
  1212. {
  1213. return $this->orderTax;
  1214. }
  1215. public function setOrderTax(OrderTax $orderTax): Order
  1216. {
  1217. $this->orderTax = $orderTax;
  1218. return $this;
  1219. }
  1220. public function getDropshipping(): bool
  1221. {
  1222. return $this->dropshipping;
  1223. }
  1224. public function isFba(): bool
  1225. {
  1226. return $this->fba;
  1227. }
  1228. public function setFba(bool $fba): Order
  1229. {
  1230. $this->fba = $fba;
  1231. return $this;
  1232. }
  1233. public function getMaxExpeditionDatetime(): ?\DateTime
  1234. {
  1235. return $this->maxExpeditionDatetime;
  1236. }
  1237. public function setMaxExpeditionDatetime(\DateTime $maxExpeditionDatetime): Order
  1238. {
  1239. $this->maxExpeditionDatetime = $maxExpeditionDatetime;
  1240. return $this;
  1241. }
  1242. public function getMaxDeliveryDatetime(): ?\DateTime
  1243. {
  1244. return $this->maxDeliveryDatetime;
  1245. }
  1246. public function setMaxDeliveryDatetime(\DateTime $maxDeliveryDatetime): Order
  1247. {
  1248. $this->maxDeliveryDatetime = $maxDeliveryDatetime;
  1249. return $this;
  1250. }
  1251. public function getFullRefund(): bool
  1252. {
  1253. return $this->fullRefund;
  1254. }
  1255. public function setFullRefund(bool $fullRefund): Order
  1256. {
  1257. $this->fullRefund = $fullRefund;
  1258. return $this;
  1259. }
  1260. public function getLogisticWeight(): ?float
  1261. {
  1262. return $this->logisticWeight;
  1263. }
  1264. public function setLogisticWeight(?float $logisticWeight): void
  1265. {
  1266. $this->logisticWeight = $logisticWeight;
  1267. }
  1268. public function getScheduledConfirmationDate(): ?\DateTime
  1269. {
  1270. if (null === $this->scheduledConfirmationDate) {
  1271. return null;
  1272. }
  1273. if ((int)$this->scheduledConfirmationDate->format('Y') <= 0) {
  1274. // 0000-00-00 00:00:00 dates
  1275. return null;
  1276. }
  1277. return $this->scheduledConfirmationDate;
  1278. }
  1279. public function setScheduledConfirmationDate(?\DateTime $scheduledConfirmationDate): void
  1280. {
  1281. $this->scheduledConfirmationDate = $scheduledConfirmationDate;
  1282. }
  1283. public function getCancellationRequest(): ?OrderCancellationRequest
  1284. {
  1285. return $this->cancellationRequest;
  1286. }
  1287. public function setCancellationRequest(?OrderCancellationRequest $cancellationRequest): void
  1288. {
  1289. $this->cancellationRequest = $cancellationRequest;
  1290. }
  1291. public function getNotification(): ?OrderNotification
  1292. {
  1293. return $this->notification;
  1294. }
  1295. public function setNotification(?OrderNotification $notification): void
  1296. {
  1297. $this->notification = $notification;
  1298. }
  1299. public function getPaymentMethod(): PaymentMethod
  1300. {
  1301. return $this->paymentMethod;
  1302. }
  1303. public function setPaymentMethod(PaymentMethod $paymentMethod): void
  1304. {
  1305. $this->paymentMethod = $paymentMethod;
  1306. $this->payment = $paymentMethod->getPayment();
  1307. $this->paymentMethodType = $paymentMethod->getSlug();
  1308. }
  1309. /**
  1310. * @return Collection<int, Tracking>&iterable<Tracking>
  1311. */
  1312. public function getTrackings()
  1313. {
  1314. return $this->trackings;
  1315. }
  1316. /**
  1317. * @param Collection<int, Tracking>&iterable<Tracking> $trackings
  1318. */
  1319. public function setTrackings($trackings): void
  1320. {
  1321. $this->trackings = $trackings;
  1322. }
  1323. public function markAsRefunded(bool $isFullRefund): void
  1324. {
  1325. $this->refund = true;
  1326. $this->fullRefund = $isFullRefund;
  1327. $this->dateUpd = new \DateTime();
  1328. }
  1329. }