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 int|null
  358. *
  359. * @ORM\Column(type="integer", length=10, options={"default" : 0}, nullable=true)
  360. */
  361. private $idPack;
  362. /**
  363. * @var \DateTime|null
  364. *
  365. * @ORM\Column(type="datetime", nullable=true)
  366. */
  367. private $deliveredDate;
  368. /**
  369. * @var bool|null
  370. *
  371. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
  372. */
  373. private $api;
  374. /**
  375. * @var bool|null
  376. *
  377. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
  378. */
  379. private $isSystem;
  380. /**
  381. * @var string|null
  382. *
  383. * @ORM\Column(type="string", length=255, nullable=true)
  384. */
  385. private $sellingChannel;
  386. /**
  387. * @var \DateTime|null
  388. *
  389. * @ORM\Column(type="date", nullable=true)
  390. */
  391. private $dateAmazon;
  392. /**
  393. * @var string|null
  394. *
  395. * @ORM\Column(type="string", length=256, nullable=true)
  396. */
  397. private $additionalParameters;
  398. /**
  399. * @var \DateTime|null
  400. *
  401. * @ORM\Column(type="datetime", nullable=true)
  402. */
  403. private $estimatedShippingDate;
  404. /**
  405. * @var \DateTime|null
  406. *
  407. * @ORM\Column(type="datetime", nullable=true)
  408. */
  409. private $scheduledConfirmationDate;
  410. /**
  411. * @var string|null
  412. *
  413. * @ORM\Column(type="string", length=36, nullable=true)
  414. */
  415. private $a4bUuid;
  416. /**
  417. * @var bool
  418. *
  419. * @ORM\Column(type="boolean", nullable=false)
  420. */
  421. private $dispute;
  422. /**
  423. * @var Collection<int, OrderDetail>&iterable<OrderDetail>
  424. *
  425. * @ORM\OneToMany(targetEntity="App\Entity\System\OrderDetail", mappedBy="order", cascade={"all"}, orphanRemoval=true)
  426. */
  427. private $orderDetails;
  428. /**
  429. * @var Warehouse
  430. *
  431. * @ORM\ManyToOne(targetEntity="App\Entity\System\Warehouse")
  432. *
  433. * @ORM\JoinColumn(name="warehouse_id", referencedColumnName="id", nullable=false, options={"default" : 1}))
  434. */
  435. private $warehouse;
  436. /**
  437. * @var OrderNotification|null
  438. *
  439. * @ORM\OneToOne(targetEntity="OrderNotification", mappedBy="order")
  440. */
  441. private $notification;
  442. /**
  443. * @var Collection<int, Invoice>&iterable<Invoice>
  444. *
  445. * @ORM\ManyToMany(targetEntity="Invoice", mappedBy="orders")
  446. */
  447. private $invoice;
  448. /**
  449. * @var OrderCancellationRequest|null
  450. *
  451. * @ORM\OneToOne(targetEntity="OrderCancellationRequest", mappedBy="order")
  452. */
  453. private ?OrderCancellationRequest $cancellationRequest;
  454. /**
  455. * @var string|null
  456. *
  457. * @ORM\Column(type="string", nullable=true)
  458. */
  459. private $paypalPayerId;
  460. /**
  461. * @var string|null
  462. *
  463. * @ORM\Column(type="string", nullable=true)
  464. */
  465. private $paypalPayerEmail;
  466. /**
  467. * @var OrderTax|null
  468. *
  469. * @ORM\OneToOne(targetEntity="App\Entity\System\OrderTax", mappedBy="order")
  470. */
  471. private $orderTax;
  472. /**
  473. * @ORM\Column(type="boolean", options={"default" : 0})
  474. */
  475. private bool $fba = false;
  476. /**
  477. * @ORM\Column(type="datetime", nullable=true)
  478. */
  479. private ?\DateTime $maxExpeditionDatetime = null;
  480. /**
  481. * @ORM\Column(type="datetime", nullable=true)
  482. */
  483. private ?\DateTime $maxDeliveryDatetime = null;
  484. /**
  485. * @ORM\Column(type="float", nullable=true)
  486. */
  487. private ?float $logisticWeight;
  488. /**
  489. * @var PaymentMethod
  490. *
  491. * @ORM\ManyToOne(targetEntity="App\Entity\System\PaymentMethod")
  492. *
  493. * @ORM\JoinColumn(name="payment_method", referencedColumnName="id_payment_method", nullable=false)
  494. */
  495. private $paymentMethod;
  496. /**
  497. * @var Collection<int, Tracking>&iterable<Tracking>
  498. *
  499. * @ORM\OneToMany(targetEntity="App\Entity\System\Tracking", mappedBy="order", cascade={"persist"})
  500. */
  501. private $trackings;
  502. /**
  503. * @ORM\Column(type="float", nullable=true)
  504. */
  505. private ?float $extraDiscountPercentage = null;
  506. /**
  507. * @ORM\Column(type="string", length=64, nullable=true)
  508. */
  509. private ?string $shipFromAddressCompanyName;
  510. /**
  511. * Order constructor.
  512. */
  513. public function __construct()
  514. {
  515. $this->idCurrency = Cart::DEFAULT_CURRENCY_EUR;
  516. $this->conversionRate = 1.000000;
  517. $this->dropshipping = false;
  518. $this->totalDiscounts = 0.00;
  519. $this->totalDiscountsTaxIncl = 0.00;
  520. $this->totalDiscountsTaxExcl = 0.00;
  521. $this->totalPaid = 0.00;
  522. $this->totalPaidTaxIncl = 0.00;
  523. $this->totalPaidTaxExcl = 0.00;
  524. $this->totalPaidReal = 0.00;
  525. $this->totalProducts = 0.00;
  526. $this->totalProductsWt = 0.00;
  527. $this->totalShipping = 0.00;
  528. $this->totalShippingTaxIncl = 0.00;
  529. $this->totalShippingTaxExcl = 0.00;
  530. $this->carrierTaxRate = 0.000;
  531. $this->totalWrapping = 0.00;
  532. $this->totalWrappingTaxIncl = 0.00;
  533. $this->totalWrappingTaxExcl = 0.00;
  534. $this->valid = 0;
  535. $this->validateTransfer = false;
  536. $this->purse = 0.00;
  537. $this->dropshippingQty = 0.00;
  538. $this->paymentMethodCost = 0.00;
  539. $this->dropshippingCost = 0.00;
  540. $this->re = false;
  541. $this->refund = false;
  542. $this->fullRefund = false;
  543. $this->intracomunitario = '1';
  544. $this->stateDropshipping = 0;
  545. $this->volWeight = 0;
  546. $this->idCarrierMaster = 0;
  547. $this->idPack = Pack::PACK_WITHOUT_PACK;
  548. $this->api = false;
  549. $this->isSystem = false;
  550. $this->dispute = false;
  551. $this->orderDetails = new ArrayCollection();
  552. $this->invoice = new ArrayCollection();
  553. $this->trackings = new ArrayCollection();
  554. $this->shipFromAddressCompanyName = null;
  555. }
  556. public function getId(): int
  557. {
  558. return $this->id;
  559. }
  560. public function setId(int $id): Order
  561. {
  562. $this->id = $id;
  563. return $this;
  564. }
  565. public function getReference(): ?string
  566. {
  567. return $this->reference;
  568. }
  569. public function setReference(?string $reference): Order
  570. {
  571. $this->reference = $reference;
  572. return $this;
  573. }
  574. public function getIdCarrier(): int
  575. {
  576. return $this->idCarrier;
  577. }
  578. public function setIdCarrier(int $idCarrier): Order
  579. {
  580. $this->idCarrier = $idCarrier;
  581. return $this;
  582. }
  583. public function getCodeDiscount(): ?CodeDiscount
  584. {
  585. return $this->codeDiscount;
  586. }
  587. public function setCodeDiscount(?CodeDiscount $codeDiscount): Order
  588. {
  589. $this->codeDiscount = $codeDiscount;
  590. return $this;
  591. }
  592. public function getCustomerOrderFraudRule(): ?CustomerOrderFraudRule
  593. {
  594. return $this->customerOrderFraudRule;
  595. }
  596. public function setCustomerOrderFraudRule(?CustomerOrderFraudRule $customerOrderFraudRule): Order
  597. {
  598. $this->customerOrderFraudRule = $customerOrderFraudRule;
  599. return $this;
  600. }
  601. public function getIdCurrency(): int
  602. {
  603. return $this->idCurrency;
  604. }
  605. public function setIdCurrency(int $idCurrency): Order
  606. {
  607. $this->idCurrency = $idCurrency;
  608. return $this;
  609. }
  610. public function getDeliveryAddress(): Address
  611. {
  612. return $this->deliveryAddress;
  613. }
  614. public function setDeliveryAddress(Address $deliveryAddress): Order
  615. {
  616. $this->deliveryAddress = $deliveryAddress;
  617. return $this;
  618. }
  619. /**
  620. * @deprecated
  621. */
  622. public function getLanguage(): ?Language
  623. {
  624. return $this->language;
  625. }
  626. /**
  627. * @deprecated
  628. */
  629. public function setLanguage(?Language $language): Order
  630. {
  631. $this->language = $language;
  632. return $this;
  633. }
  634. public function getPayment(): string
  635. {
  636. return $this->paymentMethod->getPayment();
  637. }
  638. public function getConversionRate(): float
  639. {
  640. return $this->conversionRate;
  641. }
  642. public function setConversionRate(float $conversionRate): Order
  643. {
  644. $this->conversionRate = $conversionRate;
  645. return $this;
  646. }
  647. public function getModule(): ?string
  648. {
  649. return $this->module;
  650. }
  651. public function setModule(?string $module): Order
  652. {
  653. $this->module = $module;
  654. return $this;
  655. }
  656. public function isDropshipping(): bool
  657. {
  658. return $this->dropshipping;
  659. }
  660. public function setDropshipping(bool $dropshipping): Order
  661. {
  662. $this->dropshipping = $dropshipping;
  663. return $this;
  664. }
  665. public function getTotalDiscounts(): float
  666. {
  667. return $this->totalDiscounts;
  668. }
  669. public function setTotalDiscounts(float $totalDiscounts): Order
  670. {
  671. $this->totalDiscounts = $totalDiscounts;
  672. return $this;
  673. }
  674. public function getTotalDiscountsTaxIncl(): float
  675. {
  676. return $this->totalDiscountsTaxIncl;
  677. }
  678. public function setTotalDiscountsTaxIncl(float $totalDiscountsTaxIncl): Order
  679. {
  680. $this->totalDiscountsTaxIncl = $totalDiscountsTaxIncl;
  681. return $this;
  682. }
  683. public function getTotalDiscountsTaxExcl(): float
  684. {
  685. return $this->totalDiscountsTaxExcl;
  686. }
  687. public function setTotalDiscountsTaxExcl(float $totalDiscountsTaxExcl): Order
  688. {
  689. $this->totalDiscountsTaxExcl = $totalDiscountsTaxExcl;
  690. return $this;
  691. }
  692. public function getTotalPaid(): float
  693. {
  694. return $this->totalPaid;
  695. }
  696. public function setTotalPaid(float $totalPaid): Order
  697. {
  698. $this->totalPaid = $totalPaid;
  699. return $this;
  700. }
  701. public function getTotalPaidTaxIncl(): float
  702. {
  703. return $this->totalPaidTaxIncl;
  704. }
  705. public function setTotalPaidTaxIncl(float $totalPaidTaxIncl): Order
  706. {
  707. $this->totalPaidTaxIncl = $totalPaidTaxIncl;
  708. return $this;
  709. }
  710. public function getTotalPaidTaxExcl(): float
  711. {
  712. return $this->totalPaidTaxExcl;
  713. }
  714. public function setTotalPaidTaxExcl(float $totalPaidTaxExcl): Order
  715. {
  716. $this->totalPaidTaxExcl = $totalPaidTaxExcl;
  717. return $this;
  718. }
  719. public function getTotalPaidReal(): float
  720. {
  721. return $this->totalPaidReal;
  722. }
  723. public function setTotalPaidReal(float $totalPaidReal): Order
  724. {
  725. $this->totalPaidReal = $totalPaidReal;
  726. return $this;
  727. }
  728. public function getTotalProducts(): float
  729. {
  730. return $this->totalProducts;
  731. }
  732. public function setTotalProducts(float $totalProducts): Order
  733. {
  734. $this->totalProducts = $totalProducts;
  735. return $this;
  736. }
  737. public function getTotalProductsWt(): float
  738. {
  739. return $this->totalProductsWt;
  740. }
  741. public function setTotalProductsWt(float $totalProductsWt): Order
  742. {
  743. $this->totalProductsWt = $totalProductsWt;
  744. return $this;
  745. }
  746. public function getTotalShipping(): float
  747. {
  748. return $this->totalShipping;
  749. }
  750. public function setTotalShipping(float $totalShipping): Order
  751. {
  752. $this->totalShipping = $totalShipping;
  753. return $this;
  754. }
  755. public function getTotalShippingTaxIncl(): float
  756. {
  757. return $this->totalShippingTaxIncl;
  758. }
  759. public function setTotalShippingTaxIncl(float $totalShippingTaxIncl): Order
  760. {
  761. $this->totalShippingTaxIncl = $totalShippingTaxIncl;
  762. return $this;
  763. }
  764. public function getTotalShippingTaxExcl(): float
  765. {
  766. return $this->totalShippingTaxExcl;
  767. }
  768. public function setTotalShippingTaxExcl(float $totalShippingTaxExcl): Order
  769. {
  770. $this->totalShippingTaxExcl = $totalShippingTaxExcl;
  771. return $this;
  772. }
  773. public function getCarrierTaxRate(): float
  774. {
  775. return $this->carrierTaxRate;
  776. }
  777. public function setCarrierTaxRate(float $carrierTaxRate): Order
  778. {
  779. $this->carrierTaxRate = $carrierTaxRate;
  780. return $this;
  781. }
  782. public function getTotalWrapping(): float
  783. {
  784. return $this->totalWrapping;
  785. }
  786. public function setTotalWrapping(float $totalWrapping): Order
  787. {
  788. $this->totalWrapping = $totalWrapping;
  789. return $this;
  790. }
  791. public function getTotalWrappingTaxIncl(): float
  792. {
  793. return $this->totalWrappingTaxIncl;
  794. }
  795. public function setTotalWrappingTaxIncl(float $totalWrappingTaxIncl): Order
  796. {
  797. $this->totalWrappingTaxIncl = $totalWrappingTaxIncl;
  798. return $this;
  799. }
  800. public function getTotalWrappingTaxExcl(): float
  801. {
  802. return $this->totalWrappingTaxExcl;
  803. }
  804. public function setTotalWrappingTaxExcl(float $totalWrappingTaxExcl): Order
  805. {
  806. $this->totalWrappingTaxExcl = $totalWrappingTaxExcl;
  807. return $this;
  808. }
  809. public function getInvoiceDate(): ?\DateTime
  810. {
  811. return $this->invoiceDate;
  812. }
  813. public function setInvoiceDate(?\DateTime $invoiceDate): Order
  814. {
  815. $this->invoiceDate = $invoiceDate;
  816. return $this;
  817. }
  818. public function getDeliveryDate(): ?\DateTime
  819. {
  820. return $this->deliveryDate;
  821. }
  822. public function setDeliveryDate(?\DateTime $deliveryDate): Order
  823. {
  824. $this->deliveryDate = $deliveryDate;
  825. return $this;
  826. }
  827. public function getValid(): int
  828. {
  829. return $this->valid;
  830. }
  831. public function setValid(int $valid): Order
  832. {
  833. $this->valid = $valid;
  834. return $this;
  835. }
  836. public function isValidateTransfer(): bool
  837. {
  838. return $this->validateTransfer;
  839. }
  840. public function setValidateTransfer(bool $validateTransfer): Order
  841. {
  842. $this->validateTransfer = $validateTransfer;
  843. return $this;
  844. }
  845. public function getRefOrderSupplier(): ?string
  846. {
  847. return $this->refOrderSupplier;
  848. }
  849. public function setRefOrderSupplier(?string $refOrderSupplier): Order
  850. {
  851. $this->refOrderSupplier = $refOrderSupplier;
  852. return $this;
  853. }
  854. public function getDateAdd(): \DateTime
  855. {
  856. return $this->dateAdd;
  857. }
  858. public function setDateAdd(\DateTime $dateAdd): Order
  859. {
  860. $this->dateAdd = $dateAdd;
  861. return $this;
  862. }
  863. public function getDateUpd(): \DateTime
  864. {
  865. return $this->dateUpd;
  866. }
  867. public function setDateUpd(\DateTime $dateUpd): Order
  868. {
  869. $this->dateUpd = $dateUpd;
  870. return $this;
  871. }
  872. public function getPurse(): float
  873. {
  874. return $this->purse;
  875. }
  876. public function setPurse(float $purse): Order
  877. {
  878. $this->purse = $purse;
  879. return $this;
  880. }
  881. public function getDropshippingQty(): float
  882. {
  883. return $this->dropshippingQty;
  884. }
  885. public function setDropshippingQty(float $dropshippingQty): Order
  886. {
  887. $this->dropshippingQty = $dropshippingQty;
  888. return $this;
  889. }
  890. public function getPaymentMethodCost(): float
  891. {
  892. return $this->paymentMethodCost;
  893. }
  894. public function setPaymentMethodCost(float $paymentMethodCost): Order
  895. {
  896. $this->paymentMethodCost = $paymentMethodCost;
  897. return $this;
  898. }
  899. public function getDropshippingCost(): float
  900. {
  901. return $this->dropshippingCost;
  902. }
  903. public function setDropshippingCost(float $dropshippingCost): Order
  904. {
  905. $this->dropshippingCost = $dropshippingCost;
  906. return $this;
  907. }
  908. public function isRe(): bool
  909. {
  910. return $this->re;
  911. }
  912. public function setRe(bool $re): Order
  913. {
  914. $this->re = $re;
  915. return $this;
  916. }
  917. public function getTransactionId(): ?string
  918. {
  919. return $this->transactionId;
  920. }
  921. public function setTransactionId(?string $transactionId): Order
  922. {
  923. $this->transactionId = $transactionId;
  924. return $this;
  925. }
  926. public function getRefund(): ?bool
  927. {
  928. return $this->refund;
  929. }
  930. public function setRefund(?bool $refund): Order
  931. {
  932. $this->refund = $refund;
  933. return $this;
  934. }
  935. public function getIntracomunitario(): ?string
  936. {
  937. return $this->intracomunitario;
  938. }
  939. public function setIntracomunitario(?string $intracomunitario): Order
  940. {
  941. $this->intracomunitario = $intracomunitario;
  942. return $this;
  943. }
  944. public function getIsTracking(): ?bool
  945. {
  946. return $this->isTracking;
  947. }
  948. public function setIsTracking(?bool $isTracking): Order
  949. {
  950. $this->isTracking = $isTracking;
  951. return $this;
  952. }
  953. public function getStateDropshipping(): ?int
  954. {
  955. return $this->stateDropshipping;
  956. }
  957. public function setStateDropshipping(?int $stateDropshipping): Order
  958. {
  959. $this->stateDropshipping = $stateDropshipping;
  960. return $this;
  961. }
  962. /**
  963. * @return float|null
  964. */
  965. public function getVolWeight(): ?float
  966. {
  967. return $this->volWeight;
  968. }
  969. public function setVolWeight(?float $volWeight): Order
  970. {
  971. $this->volWeight = $volWeight;
  972. return $this;
  973. }
  974. public function getIdCarrierMaster(): ?int
  975. {
  976. return $this->idCarrierMaster;
  977. }
  978. public function setIdCarrierMaster(?int $idCarrierMaster): Order
  979. {
  980. $this->idCarrierMaster = $idCarrierMaster;
  981. return $this;
  982. }
  983. public function getIdPack(): ?int
  984. {
  985. return $this->idPack;
  986. }
  987. public function setIdPack(?int $idPack): Order
  988. {
  989. $this->idPack = $idPack;
  990. return $this;
  991. }
  992. public function getDeliveredDate(): ?\DateTime
  993. {
  994. return $this->deliveredDate;
  995. }
  996. public function setDeliveredDate(?\DateTime $deliveredDate): Order
  997. {
  998. $this->deliveredDate = $deliveredDate;
  999. return $this;
  1000. }
  1001. public function getApi(): ?bool
  1002. {
  1003. return $this->api;
  1004. }
  1005. public function setApi(?bool $api): Order
  1006. {
  1007. $this->api = $api;
  1008. return $this;
  1009. }
  1010. public function isSystem(): ?bool
  1011. {
  1012. return $this->isSystem;
  1013. }
  1014. public function setSystem(?bool $isSystem): Order
  1015. {
  1016. $this->isSystem = $isSystem;
  1017. return $this;
  1018. }
  1019. public function getSellingChannel(): ?string
  1020. {
  1021. return $this->sellingChannel;
  1022. }
  1023. public function setSellingChannel(?string $sellingChannel): Order
  1024. {
  1025. $this->sellingChannel = $sellingChannel;
  1026. return $this;
  1027. }
  1028. public function getDateAmazon(): ?\DateTime
  1029. {
  1030. return $this->dateAmazon;
  1031. }
  1032. public function setDateAmazon(?\DateTime $dateAmazon): Order
  1033. {
  1034. $this->dateAmazon = $dateAmazon;
  1035. return $this;
  1036. }
  1037. public function getAdditionalParameters(): ?string
  1038. {
  1039. return $this->additionalParameters;
  1040. }
  1041. public function setAdditionalParameters(?string $additionalParameters): Order
  1042. {
  1043. $this->additionalParameters = $additionalParameters;
  1044. return $this;
  1045. }
  1046. /**
  1047. * @return Collection<int, OrderDetail>&iterable<OrderDetail>
  1048. */
  1049. public function getOrderDetails()
  1050. {
  1051. return $this->orderDetails;
  1052. }
  1053. /**
  1054. * @param Collection<int, OrderDetail>&iterable<OrderDetail> $orderDetails
  1055. */
  1056. public function setOrderDetails($orderDetails): Order
  1057. {
  1058. $this->orderDetails = $orderDetails;
  1059. return $this;
  1060. }
  1061. public function addOrderDetail(OrderDetail $orderDetail): Order
  1062. {
  1063. if (!$this->orderDetails->contains($orderDetail)) {
  1064. $this->orderDetails[] = $orderDetail;
  1065. }
  1066. return $this;
  1067. }
  1068. public function getCustomer(): Customer
  1069. {
  1070. return $this->customer;
  1071. }
  1072. public function setCustomer(Customer $customer): self
  1073. {
  1074. $this->customer = $customer;
  1075. return $this;
  1076. }
  1077. public function getEstimatedShippingDate(): ?\DateTime
  1078. {
  1079. return $this->estimatedShippingDate;
  1080. }
  1081. public function setEstimatedShippingDate(?\DateTime $estimatedShippingDate): self
  1082. {
  1083. $this->estimatedShippingDate = $estimatedShippingDate;
  1084. return $this;
  1085. }
  1086. public function getA4bUuid(): ?string
  1087. {
  1088. return $this->a4bUuid;
  1089. }
  1090. public function setA4bUuid(?string $a4bUuid): self
  1091. {
  1092. $this->a4bUuid = $a4bUuid;
  1093. return $this;
  1094. }
  1095. public function getDispute(): bool
  1096. {
  1097. return $this->dispute;
  1098. }
  1099. public function setDispute(bool $dispute): self
  1100. {
  1101. $this->dispute = $dispute;
  1102. return $this;
  1103. }
  1104. public function getOrderStatusId(): int
  1105. {
  1106. return $this->orderStatus->getId();
  1107. }
  1108. public function getOrderStatus(): OrderStatus
  1109. {
  1110. return $this->orderStatus;
  1111. }
  1112. public function setOrderStatus(OrderStatus $orderStatus): self
  1113. {
  1114. $this->orderStatus = $orderStatus;
  1115. return $this;
  1116. }
  1117. public function getCart(): Cart
  1118. {
  1119. return $this->cart;
  1120. }
  1121. public function setCart(Cart $cart): Order
  1122. {
  1123. $this->cart = $cart;
  1124. return $this;
  1125. }
  1126. public function getWarehouse(): Warehouse
  1127. {
  1128. return $this->warehouse;
  1129. }
  1130. public function setWarehouse(Warehouse $warehouse): self
  1131. {
  1132. $this->warehouse = $warehouse;
  1133. return $this;
  1134. }
  1135. /**
  1136. * @return Collection<int, Invoice>&iterable<Invoice>
  1137. */
  1138. public function getInvoice()
  1139. {
  1140. return $this->invoice;
  1141. }
  1142. public function getPaymentMethodType(): ?string
  1143. {
  1144. return $this->paymentMethod->getSlug();
  1145. }
  1146. public function getPaymentMethodTitle(): ?string
  1147. {
  1148. return $this->paymentMethod->getTitle();
  1149. }
  1150. public function getPaypalPayerId(): ?string
  1151. {
  1152. return $this->paypalPayerId;
  1153. }
  1154. public function setPaypalPayerId(?string $paypalPayerId): Order
  1155. {
  1156. $this->paypalPayerId = $paypalPayerId;
  1157. return $this;
  1158. }
  1159. public function getPaypalPayerEmail(): ?string
  1160. {
  1161. return $this->paypalPayerEmail;
  1162. }
  1163. public function setPaypalPayerEmail(?string $paypalPayerEmail): Order
  1164. {
  1165. $this->paypalPayerEmail = $paypalPayerEmail;
  1166. return $this;
  1167. }
  1168. public function getOrderTax(): ?OrderTax
  1169. {
  1170. return $this->orderTax;
  1171. }
  1172. public function setOrderTax(OrderTax $orderTax): Order
  1173. {
  1174. $this->orderTax = $orderTax;
  1175. return $this;
  1176. }
  1177. public function getDropshipping(): bool
  1178. {
  1179. return $this->dropshipping;
  1180. }
  1181. public function isFba(): bool
  1182. {
  1183. return $this->fba;
  1184. }
  1185. public function setFba(bool $fba): Order
  1186. {
  1187. $this->fba = $fba;
  1188. return $this;
  1189. }
  1190. public function getMaxExpeditionDatetime(): ?\DateTime
  1191. {
  1192. return $this->maxExpeditionDatetime;
  1193. }
  1194. public function setMaxExpeditionDatetime(\DateTime $maxExpeditionDatetime): Order
  1195. {
  1196. $this->maxExpeditionDatetime = $maxExpeditionDatetime;
  1197. return $this;
  1198. }
  1199. public function getMaxDeliveryDatetime(): ?\DateTime
  1200. {
  1201. return $this->maxDeliveryDatetime;
  1202. }
  1203. public function setMaxDeliveryDatetime(\DateTime $maxDeliveryDatetime): Order
  1204. {
  1205. $this->maxDeliveryDatetime = $maxDeliveryDatetime;
  1206. return $this;
  1207. }
  1208. public function getFullRefund(): bool
  1209. {
  1210. return $this->fullRefund;
  1211. }
  1212. public function setFullRefund(bool $fullRefund): Order
  1213. {
  1214. $this->fullRefund = $fullRefund;
  1215. return $this;
  1216. }
  1217. public function getLogisticWeight(): ?float
  1218. {
  1219. return $this->logisticWeight;
  1220. }
  1221. public function setLogisticWeight(?float $logisticWeight): void
  1222. {
  1223. $this->logisticWeight = $logisticWeight;
  1224. }
  1225. public function getScheduledConfirmationDate(): ?\DateTime
  1226. {
  1227. if (null === $this->scheduledConfirmationDate) {
  1228. return null;
  1229. }
  1230. if ((int)$this->scheduledConfirmationDate->format('Y') <= 0) {
  1231. // 0000-00-00 00:00:00 dates
  1232. return null;
  1233. }
  1234. return $this->scheduledConfirmationDate;
  1235. }
  1236. public function setScheduledConfirmationDate(?\DateTime $scheduledConfirmationDate): void
  1237. {
  1238. $this->scheduledConfirmationDate = $scheduledConfirmationDate;
  1239. }
  1240. public function getCancellationRequest(): ?OrderCancellationRequest
  1241. {
  1242. return $this->cancellationRequest;
  1243. }
  1244. public function setCancellationRequest(?OrderCancellationRequest $cancellationRequest): void
  1245. {
  1246. $this->cancellationRequest = $cancellationRequest;
  1247. }
  1248. public function getNotification(): ?OrderNotification
  1249. {
  1250. return $this->notification;
  1251. }
  1252. public function setNotification(?OrderNotification $notification): void
  1253. {
  1254. $this->notification = $notification;
  1255. }
  1256. public function getPaymentMethod(): PaymentMethod
  1257. {
  1258. return $this->paymentMethod;
  1259. }
  1260. public function setPaymentMethod(PaymentMethod $paymentMethod): void
  1261. {
  1262. $this->paymentMethod = $paymentMethod;
  1263. }
  1264. /**
  1265. * @return Collection<int, Tracking>&iterable<Tracking>
  1266. */
  1267. public function getTrackings()
  1268. {
  1269. return $this->trackings;
  1270. }
  1271. /**
  1272. * @param Collection<int, Tracking>&iterable<Tracking> $trackings
  1273. */
  1274. public function setTrackings($trackings): void
  1275. {
  1276. $this->trackings = $trackings;
  1277. }
  1278. public function markAsRefunded(bool $isFullRefund): void
  1279. {
  1280. $this->refund = true;
  1281. $this->fullRefund = $isFullRefund;
  1282. $this->dateUpd = new \DateTime();
  1283. }
  1284. public function getExtraDiscountPercentage(): ?float
  1285. {
  1286. return $this->extraDiscountPercentage;
  1287. }
  1288. public function setExtraDiscountPercentage(?float $extraDiscountPercentage): Order
  1289. {
  1290. $this->extraDiscountPercentage = $extraDiscountPercentage;
  1291. return $this;
  1292. }
  1293. public function getShipFromAddressCompanyName(): ?string
  1294. {
  1295. return $this->shipFromAddressCompanyName;
  1296. }
  1297. public function setShipFromAddressCompanyName(?string $shipFromAddressCompanyName): void
  1298. {
  1299. $this->shipFromAddressCompanyName = $shipFromAddressCompanyName;
  1300. }
  1301. }