src/Entity/System/Order.php line 30

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