src/Entity/System/OrderDetail.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * OrderDetail
  7. *
  8. * @ORM\Table(name="ps_order_detail", indexes={
  9. *
  10. * @ORM\Index(name="product_id", columns={"product_id"}),
  11. * @ORM\Index(name="id_order_id_order_detail", columns={"id_order", "id_order_detail"}),
  12. * @ORM\Index(name="locks", columns={"locks"}),
  13. * @ORM\Index(name="ps_order_detail_product_reference_index", columns={"product_reference"}),
  14. * @ORM\Index(name="product_attribute_id", columns={"product_attribute_id"}),
  15. * @ORM\Index(name="pedidos_transito", columns={"pedidos_transito"})
  16. * })
  17. *
  18. * @ORM\Entity(repositoryClass="App\Repository\System\OrderDetailRepository")
  19. */
  20. class OrderDetail
  21. {
  22. /**
  23. * @ORM\Id()
  24. *
  25. * @ORM\GeneratedValue()
  26. *
  27. * @ORM\Column(type="integer", name="id_order_detail")
  28. */
  29. private $id;
  30. /**
  31. * @var Order
  32. *
  33. * @ORM\ManyToOne(targetEntity="App\Entity\System\Order", inversedBy="orderDetails", cascade={"persist"})
  34. *
  35. * @ORM\JoinColumn(name="id_order", referencedColumnName="id_order", nullable=false)
  36. */
  37. private $order;
  38. /**
  39. * @var RefundLine[]|ArrayCollection<int, RefundLine>
  40. *
  41. * @ORM\OneToMany(targetEntity="App\Entity\System\RefundLine", mappedBy="orderDetail")
  42. */
  43. private $refundLines;
  44. /**
  45. * @var int|null
  46. *
  47. * @ORM\Column(type="integer", length=11, nullable=true)
  48. */
  49. private $idOrderInvoice;
  50. /**
  51. * @var int
  52. *
  53. * @ORM\Column(type="integer", length=10)
  54. */
  55. private $productId;
  56. /**
  57. * @var int|null
  58. *
  59. * @ORM\Column(type="integer", length=10, nullable=true)
  60. */
  61. private $productAttributeId;
  62. /**
  63. * @var string
  64. *
  65. * @ORM\Column(type="string", length=255)
  66. */
  67. private $productName;
  68. /**
  69. * @var int
  70. *
  71. * @ORM\Column(type="integer", length=10, options={"default" : 0})
  72. */
  73. private $productQuantity;
  74. /**
  75. * @var int
  76. *
  77. * @ORM\Column(type="integer", length=10, options={"default" : 0})
  78. */
  79. private $productCatalog;
  80. /**
  81. * @var int
  82. *
  83. * @ORM\Column(type="integer", length=10, options={"default" : 0})
  84. */
  85. private $productQuantityInStock;
  86. /**
  87. * @var int
  88. *
  89. * @ORM\Column(type="integer", length=10, options={"default" : 0})
  90. */
  91. private $productQuantityRefunded;
  92. /**
  93. * @var int
  94. *
  95. * @ORM\Column(type="integer", length=10, options={"default" : 0})
  96. */
  97. private $productQuantityReturn;
  98. /**
  99. * @var int
  100. *
  101. * @ORM\Column(type="integer", length=10, options={"default" : 0})
  102. */
  103. private $productQuantityReinjected;
  104. /**
  105. * @var float
  106. *
  107. * @ORM\Column(type="float", options={"default" : 0.000000})
  108. */
  109. private $productPrice;
  110. /**
  111. * @var float
  112. *
  113. * @ORM\Column(type="float", options={"default" : 0.00} )
  114. */
  115. private $reductionPercent;
  116. /**
  117. * @var float
  118. *
  119. * @ORM\Column(type="float", options={"default" : 0.000000})
  120. */
  121. private $reductionAmount;
  122. /**
  123. * @var float
  124. *
  125. * @ORM\Column(type="float", options={"default" : 0.000000})
  126. */
  127. private $reductionAmountTaxIncl;
  128. /**
  129. * @var float
  130. *
  131. * @ORM\Column(type="float", options={"default" : 0.000000})
  132. */
  133. private $reductionAmountTaxExcl;
  134. /**
  135. * @var float
  136. *
  137. * @ORM\Column(type="float", options={"default" : 0.00})
  138. */
  139. private $groupReduction;
  140. /**
  141. * @var float
  142. *
  143. * @ORM\Column(type="float", options={"default" : 0.000000})
  144. */
  145. private $productQuantityDiscount;
  146. /**
  147. * @var string|null
  148. *
  149. * @ORM\Column(type="string", length=13, nullable=true)
  150. */
  151. private $productEan13;
  152. /**
  153. * @var string|null
  154. *
  155. * @ORM\Column(type="string", length=12, nullable=true)
  156. */
  157. private $productUpc;
  158. /**
  159. * @var string|null
  160. *
  161. * @ORM\Column(type="string", length=32, nullable=true)
  162. */
  163. private $productReference;
  164. /**
  165. * @var string|null
  166. *
  167. * @ORM\Column(type="string", length=32, nullable=true)
  168. */
  169. private $productSupplierReference;
  170. /**
  171. * @var float
  172. *
  173. * @ORM\Column(type="decimal", precision=20, scale=6)
  174. */
  175. private $productWeight;
  176. /**
  177. * @var int
  178. *
  179. * @ORM\Column(type="integer", length=10, options={"default": 0})
  180. */
  181. private $taxComputationMethod;
  182. /**
  183. * @var string
  184. *
  185. * @ORM\Column(type="string", length=16)
  186. */
  187. private $taxName;
  188. /**
  189. * @var float
  190. *
  191. * @ORM\Column(type="float", options={"default" : 0.000})
  192. */
  193. private $taxRate;
  194. /**
  195. * @var float
  196. *
  197. * @ORM\Column(type="float", options={"default" : 0.000000})
  198. */
  199. private $ecotax;
  200. /**
  201. * @var float
  202. *
  203. * @ORM\Column(type="float", options={"default" : 0.000}, name="ecotax_tax_rate")
  204. */
  205. private $ecoTaxRate;
  206. /**
  207. * @var bool
  208. *
  209. * @ORM\Column(type="boolean", options={"default" : 0})
  210. */
  211. private $discountQuantityApplied;
  212. /**
  213. * @var string|null
  214. *
  215. * @ORM\Column(type="string", length=255, nullable=true)
  216. */
  217. private $downloadHash;
  218. /**
  219. * @var int|null
  220. *
  221. * @ORM\Column(type="integer", options={"default" : 0}, nullable=true)
  222. */
  223. private $downloadNb;
  224. /**
  225. * @var \DateTime|null
  226. *
  227. * @ORM\Column(type="datetime", nullable=true)
  228. */
  229. private $downloadDeadline;
  230. /**
  231. * @var float
  232. *
  233. * @ORM\Column(type="float", options={"default" : 0.000000})
  234. */
  235. private $totalPriceTaxIncl;
  236. /**
  237. * @var float
  238. *
  239. * @ORM\Column(type="float", options={"default" : 0.000000})
  240. */
  241. private $totalPriceTaxExcl;
  242. /**
  243. * @var float
  244. *
  245. * @ORM\Column(type="float", options={"default" : 0.000000})
  246. */
  247. private $unitPriceTaxIncl;
  248. /**
  249. * @var float
  250. *
  251. * @ORM\Column(type="float", options={"default" : 0.000000})
  252. */
  253. private $unitPriceTaxExcl;
  254. /**
  255. * @var float
  256. *
  257. * @ORM\Column(type="float", options={"default" : 0.000000})
  258. */
  259. private $totalShippingPriceTaxIncl;
  260. /**
  261. * @var float
  262. *
  263. * @ORM\Column(type="float", options={"default" : 0.000000})
  264. */
  265. private $totalShippingPriceTaxExcl;
  266. /**
  267. * @var float
  268. *
  269. * @ORM\Column(type="float", options={"default" : 0.000000})
  270. */
  271. private $purchaseSupplierPrice;
  272. /**
  273. * @var float
  274. *
  275. * @ORM\Column(type="float", options={"default" : 0.000000})
  276. */
  277. private $originalProductPrice;
  278. /**
  279. * @var bool
  280. *
  281. * @ORM\Column(type="boolean", options={"default" : 0})
  282. */
  283. private $re;
  284. /**
  285. * @var int
  286. *
  287. * @ORM\Column(type="integer", length=11 ,options={"default" : 0})
  288. */
  289. private $locks;
  290. /**
  291. * @var bool|null
  292. *
  293. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
  294. */
  295. private $quantityStockSupplier;
  296. /**
  297. * @var bool|null
  298. *
  299. * @ORM\Column(name="quantity_stock_supplier_3_5", type="boolean", options={"default" : 0}, nullable=false)
  300. */
  301. private $quantityStockSupplier3To5;
  302. /**
  303. * @var bool|null
  304. *
  305. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
  306. */
  307. private $quantityFutureStock;
  308. /**
  309. * @var string|null
  310. *
  311. * @ORM\Column(type="string", length=50, nullable=true, options={"default" : "0"} )
  312. */
  313. private $purchaseOrder;
  314. /**
  315. * @var int|null
  316. *
  317. * @ORM\Column(type="integer", length=11 ,options={"default" : 0}, nullable=true)
  318. */
  319. private $idPurchaseLine;
  320. /**
  321. * @var float
  322. *
  323. * @ORM\Column(type="float", options={"default" : 0.000000})
  324. */
  325. private $width;
  326. /**
  327. * @var float
  328. *
  329. * @ORM\Column(type="float", options={"default" : 0.000000})
  330. */
  331. private $height;
  332. /**
  333. * @var float
  334. *
  335. * @ORM\Column(type="float", options={"default" : 0.000000})
  336. */
  337. private $depth;
  338. /**
  339. * @var bool
  340. *
  341. * @ORM\Column(type="boolean", options={"default" : 1})
  342. */
  343. private $pedidosTransito;
  344. /**
  345. * @var float
  346. *
  347. * @ORM\Column(type="float", options={"default" : 0.000000})
  348. */
  349. private $estimateCostPrice;
  350. /**
  351. * @var int|null
  352. *
  353. * @ORM\Column(type="integer", length=11 , nullable=true)
  354. */
  355. private $priceByQuantity;
  356. /**
  357. * @var string|null
  358. *
  359. * @ORM\Column(type="string", length=100 , nullable=true)
  360. */
  361. private $internalReference;
  362. /**
  363. * @var bool
  364. *
  365. * @ORM\Column(name="buybox", type="boolean", options={"default" : 0})
  366. */
  367. private $buyBox;
  368. /**
  369. * @var \DateTime
  370. *
  371. * @ORM\Column(type="datetime", nullable=true)
  372. */
  373. private $dateUpd;
  374. /**
  375. * OrderDetail constructor.
  376. */
  377. public function __construct()
  378. {
  379. $this->productQuantity = 0;
  380. $this->productCatalog = 0;
  381. $this->productQuantityInStock = 0;
  382. $this->productQuantityRefunded = 0;
  383. $this->productQuantityReturn = 0;
  384. $this->productQuantityReinjected = 0;
  385. $this->productPrice = 0.000000;
  386. $this->reductionPercent = 0.00;
  387. $this->reductionAmount = 0.000000;
  388. $this->reductionAmountTaxIncl = 0.000000;
  389. $this->reductionAmountTaxExcl = 0.000000;
  390. $this->groupReduction = 0.00;
  391. $this->productQuantityDiscount = 0.000000;
  392. $this->taxComputationMethod = 0;
  393. $this->taxRate = 0.000;
  394. $this->ecotax = 0.000000;
  395. $this->ecoTaxRate = 0.000;
  396. $this->discountQuantityApplied = 0;
  397. $this->downloadNb = 0;
  398. $this->totalPriceTaxIncl = 0.000000;
  399. $this->totalPriceTaxExcl = 0.000000;
  400. $this->unitPriceTaxIncl = 0.000000;
  401. $this->unitPriceTaxExcl = 0.000000;
  402. $this->totalShippingPriceTaxExcl = 0.000000;
  403. $this->totalShippingPriceTaxIncl = 0.000000;
  404. $this->purchaseSupplierPrice = 0.000000;
  405. $this->originalProductPrice = 0.000000;
  406. $this->re = 0;
  407. $this->locks = 0;
  408. $this->quantityStockSupplier = 0;
  409. $this->quantityStockSupplier3To5 = 0;
  410. $this->quantityFutureStock = 0;
  411. $this->purchaseOrder = '0';
  412. $this->idPurchaseLine = 0;
  413. $this->width = 0.000000;
  414. $this->height = 0.000000;
  415. $this->depth = 0.000000;
  416. $this->pedidosTransito = 1;
  417. $this->estimateCostPrice = 0.000000;
  418. $this->buyBox = false;
  419. }
  420. /**
  421. * @return mixed
  422. */
  423. public function getId()
  424. {
  425. return $this->id;
  426. }
  427. /**
  428. * @param mixed $id
  429. *
  430. * @return OrderDetail
  431. */
  432. public function setId($id): OrderDetail
  433. {
  434. $this->id = $id;
  435. return $this;
  436. }
  437. /**
  438. * @return Order
  439. */
  440. public function getOrder(): Order
  441. {
  442. return $this->order;
  443. }
  444. /**
  445. * @param Order $order
  446. *
  447. * @return OrderDetail
  448. */
  449. public function setOrder(Order $order): OrderDetail
  450. {
  451. $this->order = $order;
  452. return $this;
  453. }
  454. /**
  455. * @return int|null
  456. */
  457. public function getIdOrderInvoice(): ?int
  458. {
  459. return $this->idOrderInvoice;
  460. }
  461. /**
  462. * @param int|null $idOrderInvoice
  463. *
  464. * @return OrderDetail
  465. */
  466. public function setIdOrderInvoice(?int $idOrderInvoice): OrderDetail
  467. {
  468. $this->idOrderInvoice = $idOrderInvoice;
  469. return $this;
  470. }
  471. /**
  472. * @return int
  473. */
  474. public function getProductId(): int
  475. {
  476. return $this->productId;
  477. }
  478. /**
  479. * @param int $productId
  480. *
  481. * @return OrderDetail
  482. */
  483. public function setProductId(int $productId): OrderDetail
  484. {
  485. $this->productId = $productId;
  486. return $this;
  487. }
  488. /**
  489. * @return int|null
  490. */
  491. public function getProductAttributeId(): ?int
  492. {
  493. return $this->productAttributeId;
  494. }
  495. /**
  496. * @param int|null $productAttributeId
  497. *
  498. * @return OrderDetail
  499. */
  500. public function setProductAttributeId(?int $productAttributeId): OrderDetail
  501. {
  502. $this->productAttributeId = $productAttributeId;
  503. return $this;
  504. }
  505. /**
  506. * @return string
  507. */
  508. public function getProductName(): string
  509. {
  510. return $this->productName;
  511. }
  512. /**
  513. * @param string $productName
  514. *
  515. * @return OrderDetail
  516. */
  517. public function setProductName(string $productName): OrderDetail
  518. {
  519. $this->productName = $productName;
  520. return $this;
  521. }
  522. /**
  523. * @return int
  524. */
  525. public function getProductQuantity(): int
  526. {
  527. return $this->productQuantity;
  528. }
  529. /**
  530. * @param int $productQuantity
  531. *
  532. * @return OrderDetail
  533. */
  534. public function setProductQuantity(int $productQuantity): OrderDetail
  535. {
  536. $this->productQuantity = $productQuantity;
  537. return $this;
  538. }
  539. public function getProductCatalog(): int
  540. {
  541. return $this->productCatalog;
  542. }
  543. public function setProductCatalog(int $productCatalog): OrderDetail
  544. {
  545. $this->productCatalog = $productCatalog;
  546. return $this;
  547. }
  548. /**
  549. * @return int
  550. */
  551. public function getProductQuantityInStock(): int
  552. {
  553. return $this->productQuantityInStock;
  554. }
  555. /**
  556. * @param int $productQuantityInStock
  557. *
  558. * @return OrderDetail
  559. */
  560. public function setProductQuantityInStock(int $productQuantityInStock): OrderDetail
  561. {
  562. $this->productQuantityInStock = $productQuantityInStock;
  563. return $this;
  564. }
  565. /**
  566. * @return int
  567. */
  568. public function getProductQuantityRefunded(): int
  569. {
  570. return $this->productQuantityRefunded;
  571. }
  572. /**
  573. * @param int $productQuantityRefunded
  574. *
  575. * @return OrderDetail
  576. */
  577. public function setProductQuantityRefunded(int $productQuantityRefunded): OrderDetail
  578. {
  579. $this->productQuantityRefunded = $productQuantityRefunded;
  580. return $this;
  581. }
  582. /**
  583. * @return int
  584. */
  585. public function getProductQuantityReturn(): int
  586. {
  587. return $this->productQuantityReturn;
  588. }
  589. /**
  590. * @param int $productQuantityReturn
  591. *
  592. * @return OrderDetail
  593. */
  594. public function setProductQuantityReturn(int $productQuantityReturn): OrderDetail
  595. {
  596. $this->productQuantityReturn = $productQuantityReturn;
  597. return $this;
  598. }
  599. /**
  600. * @return int
  601. */
  602. public function getProductQuantityReinjected(): int
  603. {
  604. return $this->productQuantityReinjected;
  605. }
  606. /**
  607. * @param int $productQuantityReinjected
  608. *
  609. * @return OrderDetail
  610. */
  611. public function setProductQuantityReinjected(int $productQuantityReinjected): OrderDetail
  612. {
  613. $this->productQuantityReinjected = $productQuantityReinjected;
  614. return $this;
  615. }
  616. /**
  617. * @return float
  618. */
  619. public function getProductPrice(): float
  620. {
  621. return $this->productPrice;
  622. }
  623. /**
  624. * @param float $productPrice
  625. *
  626. * @return OrderDetail
  627. */
  628. public function setProductPrice(float $productPrice): OrderDetail
  629. {
  630. $this->productPrice = $productPrice;
  631. return $this;
  632. }
  633. /**
  634. * @return float
  635. */
  636. public function getReductionPercent(): float
  637. {
  638. return $this->reductionPercent;
  639. }
  640. /**
  641. * @param float $reductionPercent
  642. *
  643. * @return OrderDetail
  644. */
  645. public function setReductionPercent(float $reductionPercent): OrderDetail
  646. {
  647. $this->reductionPercent = $reductionPercent;
  648. return $this;
  649. }
  650. /**
  651. * @return float
  652. */
  653. public function getReductionAmount(): float
  654. {
  655. return $this->reductionAmount;
  656. }
  657. /**
  658. * @param float $reductionAmount
  659. *
  660. * @return OrderDetail
  661. */
  662. public function setReductionAmount(float $reductionAmount): OrderDetail
  663. {
  664. $this->reductionAmount = $reductionAmount;
  665. return $this;
  666. }
  667. /**
  668. * @return float
  669. */
  670. public function getReductionAmountTaxIncl(): float
  671. {
  672. return $this->reductionAmountTaxIncl;
  673. }
  674. /**
  675. * @param float $reductionAmountTaxIncl
  676. *
  677. * @return OrderDetail
  678. */
  679. public function setReductionAmountTaxIncl(float $reductionAmountTaxIncl): OrderDetail
  680. {
  681. $this->reductionAmountTaxIncl = $reductionAmountTaxIncl;
  682. return $this;
  683. }
  684. /**
  685. * @return float
  686. */
  687. public function getReductionAmountTaxExcl(): float
  688. {
  689. return $this->reductionAmountTaxExcl;
  690. }
  691. /**
  692. * @param float $reductionAmountTaxExcl
  693. *
  694. * @return OrderDetail
  695. */
  696. public function setReductionAmountTaxExcl(float $reductionAmountTaxExcl): OrderDetail
  697. {
  698. $this->reductionAmountTaxExcl = $reductionAmountTaxExcl;
  699. return $this;
  700. }
  701. /**
  702. * @return float
  703. */
  704. public function getGroupReduction(): float
  705. {
  706. return $this->groupReduction;
  707. }
  708. /**
  709. * @param float $groupReduction
  710. *
  711. * @return OrderDetail
  712. */
  713. public function setGroupReduction(float $groupReduction): OrderDetail
  714. {
  715. $this->groupReduction = $groupReduction;
  716. return $this;
  717. }
  718. /**
  719. * @return float
  720. */
  721. public function getProductQuantityDiscount(): float
  722. {
  723. return $this->productQuantityDiscount;
  724. }
  725. /**
  726. * @param float $productQuantityDiscount
  727. *
  728. * @return OrderDetail
  729. */
  730. public function setProductQuantityDiscount(float $productQuantityDiscount): OrderDetail
  731. {
  732. $this->productQuantityDiscount = $productQuantityDiscount;
  733. return $this;
  734. }
  735. /**
  736. * @return string|null
  737. */
  738. public function getProductEan13(): ?string
  739. {
  740. return $this->productEan13;
  741. }
  742. /**
  743. * @param string|null $productEan13
  744. *
  745. * @return OrderDetail
  746. */
  747. public function setProductEan13(?string $productEan13): OrderDetail
  748. {
  749. $this->productEan13 = $productEan13;
  750. return $this;
  751. }
  752. /**
  753. * @return string|null
  754. */
  755. public function getProductUpc(): ?string
  756. {
  757. return $this->productUpc;
  758. }
  759. /**
  760. * @param string|null $productUpc
  761. *
  762. * @return OrderDetail
  763. */
  764. public function setProductUpc(?string $productUpc): OrderDetail
  765. {
  766. $this->productUpc = $productUpc;
  767. return $this;
  768. }
  769. /**
  770. * @return string|null
  771. */
  772. public function getProductReference(): ?string
  773. {
  774. return $this->productReference;
  775. }
  776. /**
  777. * @param string|null $productReference
  778. *
  779. * @return OrderDetail
  780. */
  781. public function setProductReference(?string $productReference): OrderDetail
  782. {
  783. $this->productReference = $productReference;
  784. return $this;
  785. }
  786. /**
  787. * @return string|null
  788. */
  789. public function getProductSupplierReference(): ?string
  790. {
  791. return $this->productSupplierReference;
  792. }
  793. /**
  794. * @param string|null $productSupplierReference
  795. *
  796. * @return OrderDetail
  797. */
  798. public function setProductSupplierReference(?string $productSupplierReference): OrderDetail
  799. {
  800. $this->productSupplierReference = $productSupplierReference;
  801. return $this;
  802. }
  803. /**
  804. * @return float
  805. */
  806. public function getProductWeight(): float
  807. {
  808. return $this->productWeight;
  809. }
  810. /**
  811. * @param float $productWeight
  812. *
  813. * @return OrderDetail
  814. */
  815. public function setProductWeight(float $productWeight): OrderDetail
  816. {
  817. $this->productWeight = $productWeight;
  818. return $this;
  819. }
  820. public function isTaxComputationMethod(): int
  821. {
  822. return $this->taxComputationMethod;
  823. }
  824. public function setTaxComputationMethod(int $taxComputationMethod): OrderDetail
  825. {
  826. $this->taxComputationMethod = $taxComputationMethod;
  827. return $this;
  828. }
  829. /**
  830. * @return string
  831. */
  832. public function getTaxName(): string
  833. {
  834. return $this->taxName;
  835. }
  836. /**
  837. * @param string $taxName
  838. *
  839. * @return OrderDetail
  840. */
  841. public function setTaxName(string $taxName): OrderDetail
  842. {
  843. $this->taxName = $taxName;
  844. return $this;
  845. }
  846. /**
  847. * @return float
  848. */
  849. public function getTaxRate(): float
  850. {
  851. return $this->taxRate;
  852. }
  853. /**
  854. * @param float $taxRate
  855. *
  856. * @return OrderDetail
  857. */
  858. public function setTaxRate(float $taxRate): OrderDetail
  859. {
  860. $this->taxRate = $taxRate;
  861. return $this;
  862. }
  863. /**
  864. * @return float
  865. */
  866. public function getEcotax(): float
  867. {
  868. return $this->ecotax;
  869. }
  870. /**
  871. * @param float $ecotax
  872. *
  873. * @return OrderDetail
  874. */
  875. public function setEcotax(float $ecotax): OrderDetail
  876. {
  877. $this->ecotax = $ecotax;
  878. return $this;
  879. }
  880. /**
  881. * @return float
  882. */
  883. public function getEcoTaxRate(): float
  884. {
  885. return $this->ecoTaxRate;
  886. }
  887. /**
  888. * @param float $ecoTaxRate
  889. *
  890. * @return OrderDetail
  891. */
  892. public function setEcoTaxRate(float $ecoTaxRate): OrderDetail
  893. {
  894. $this->ecoTaxRate = $ecoTaxRate;
  895. return $this;
  896. }
  897. /**
  898. * @return bool
  899. */
  900. public function isDiscountQuantityApplied(): bool
  901. {
  902. return $this->discountQuantityApplied;
  903. }
  904. /**
  905. * @param bool $discountQuantityApplied
  906. *
  907. * @return OrderDetail
  908. */
  909. public function setDiscountQuantityApplied(bool $discountQuantityApplied): OrderDetail
  910. {
  911. $this->discountQuantityApplied = $discountQuantityApplied;
  912. return $this;
  913. }
  914. /**
  915. * @return string|null
  916. */
  917. public function getDownloadHash(): ?string
  918. {
  919. return $this->downloadHash;
  920. }
  921. /**
  922. * @param string|null $downloadHash
  923. *
  924. * @return OrderDetail
  925. */
  926. public function setDownloadHash(?string $downloadHash): OrderDetail
  927. {
  928. $this->downloadHash = $downloadHash;
  929. return $this;
  930. }
  931. /**
  932. * @return int|null
  933. */
  934. public function getDownloadNb(): ?int
  935. {
  936. return $this->downloadNb;
  937. }
  938. /**
  939. * @param int|null $downloadNb
  940. *
  941. * @return OrderDetail
  942. */
  943. public function setDownloadNb(?int $downloadNb): OrderDetail
  944. {
  945. $this->downloadNb = $downloadNb;
  946. return $this;
  947. }
  948. /**
  949. * @return \DateTime|null
  950. */
  951. public function getDownloadDeadline(): ?\DateTime
  952. {
  953. return $this->downloadDeadline;
  954. }
  955. /**
  956. * @param \DateTime|null $downloadDeadline
  957. *
  958. * @return OrderDetail
  959. */
  960. public function setDownloadDeadline(?\DateTime $downloadDeadline): OrderDetail
  961. {
  962. $this->downloadDeadline = $downloadDeadline;
  963. return $this;
  964. }
  965. /**
  966. * @return float
  967. */
  968. public function getTotalPriceTaxIncl(): float
  969. {
  970. return $this->totalPriceTaxIncl;
  971. }
  972. /**
  973. * @param float $totalPriceTaxIncl
  974. *
  975. * @return OrderDetail
  976. */
  977. public function setTotalPriceTaxIncl(float $totalPriceTaxIncl): OrderDetail
  978. {
  979. $this->totalPriceTaxIncl = $totalPriceTaxIncl;
  980. return $this;
  981. }
  982. /**
  983. * @return float
  984. */
  985. public function getTotalPriceTaxExcl(): float
  986. {
  987. return $this->totalPriceTaxExcl;
  988. }
  989. /**
  990. * @param float $totalPriceTaxExcl
  991. *
  992. * @return OrderDetail
  993. */
  994. public function setTotalPriceTaxExcl(float $totalPriceTaxExcl): OrderDetail
  995. {
  996. $this->totalPriceTaxExcl = $totalPriceTaxExcl;
  997. return $this;
  998. }
  999. /**
  1000. * @return float
  1001. */
  1002. public function getUnitPriceTaxIncl(): float
  1003. {
  1004. return $this->unitPriceTaxIncl;
  1005. }
  1006. /**
  1007. * @param float $unitPriceTaxIncl
  1008. *
  1009. * @return OrderDetail
  1010. */
  1011. public function setUnitPriceTaxIncl(float $unitPriceTaxIncl): OrderDetail
  1012. {
  1013. $this->unitPriceTaxIncl = $unitPriceTaxIncl;
  1014. return $this;
  1015. }
  1016. /**
  1017. * @return float
  1018. */
  1019. public function getUnitPriceTaxExcl(): float
  1020. {
  1021. return $this->unitPriceTaxExcl;
  1022. }
  1023. /**
  1024. * @param float $unitPriceTaxExcl
  1025. *
  1026. * @return OrderDetail
  1027. */
  1028. public function setUnitPriceTaxExcl(float $unitPriceTaxExcl): OrderDetail
  1029. {
  1030. $this->unitPriceTaxExcl = $unitPriceTaxExcl;
  1031. return $this;
  1032. }
  1033. /**
  1034. * @return float
  1035. */
  1036. public function getTotalShippingPriceTaxIncl(): float
  1037. {
  1038. return $this->totalShippingPriceTaxIncl;
  1039. }
  1040. /**
  1041. * @param float $totalShippingPriceTaxIncl
  1042. *
  1043. * @return OrderDetail
  1044. */
  1045. public function setTotalShippingPriceTaxIncl(float $totalShippingPriceTaxIncl): OrderDetail
  1046. {
  1047. $this->totalShippingPriceTaxIncl = $totalShippingPriceTaxIncl;
  1048. return $this;
  1049. }
  1050. /**
  1051. * @return float
  1052. */
  1053. public function getTotalShippingPriceTaxExcl(): float
  1054. {
  1055. return $this->totalShippingPriceTaxExcl;
  1056. }
  1057. /**
  1058. * @param float $totalShippingPriceTaxExcl
  1059. *
  1060. * @return OrderDetail
  1061. */
  1062. public function setTotalShippingPriceTaxExcl(float $totalShippingPriceTaxExcl): OrderDetail
  1063. {
  1064. $this->totalShippingPriceTaxExcl = $totalShippingPriceTaxExcl;
  1065. return $this;
  1066. }
  1067. /**
  1068. * @return float
  1069. */
  1070. public function getPurchaseSupplierPrice(): float
  1071. {
  1072. return $this->purchaseSupplierPrice;
  1073. }
  1074. /**
  1075. * @param float $purchaseSupplierPrice
  1076. *
  1077. * @return OrderDetail
  1078. */
  1079. public function setPurchaseSupplierPrice(float $purchaseSupplierPrice): OrderDetail
  1080. {
  1081. $this->purchaseSupplierPrice = $purchaseSupplierPrice;
  1082. return $this;
  1083. }
  1084. /**
  1085. * @return float
  1086. */
  1087. public function getOriginalProductPrice(): float
  1088. {
  1089. return $this->originalProductPrice;
  1090. }
  1091. /**
  1092. * @param float $originalProductPrice
  1093. *
  1094. * @return OrderDetail
  1095. */
  1096. public function setOriginalProductPrice(float $originalProductPrice): OrderDetail
  1097. {
  1098. $this->originalProductPrice = $originalProductPrice;
  1099. return $this;
  1100. }
  1101. /**
  1102. * @return bool
  1103. */
  1104. public function isRe(): bool
  1105. {
  1106. return $this->re;
  1107. }
  1108. /**
  1109. * @param bool $re
  1110. *
  1111. * @return OrderDetail
  1112. */
  1113. public function setRe(bool $re): OrderDetail
  1114. {
  1115. $this->re = $re;
  1116. return $this;
  1117. }
  1118. /**
  1119. * @return int
  1120. */
  1121. public function getLocks(): int
  1122. {
  1123. return $this->locks;
  1124. }
  1125. /**
  1126. * @param int $locks
  1127. *
  1128. * @return OrderDetail
  1129. */
  1130. public function setLocks(int $locks): OrderDetail
  1131. {
  1132. $this->locks = $locks;
  1133. return $this;
  1134. }
  1135. /**
  1136. * @return bool|null
  1137. */
  1138. public function getQuantityStockSupplier(): ?bool
  1139. {
  1140. return $this->quantityStockSupplier;
  1141. }
  1142. /**
  1143. * @param bool|null $quantityStockSupplier
  1144. *
  1145. * @return OrderDetail
  1146. */
  1147. public function setQuantityStockSupplier(?bool $quantityStockSupplier): OrderDetail
  1148. {
  1149. $this->quantityStockSupplier = $quantityStockSupplier;
  1150. return $this;
  1151. }
  1152. /**
  1153. * @return bool|null
  1154. */
  1155. public function getQuantityFutureStock(): ?bool
  1156. {
  1157. return $this->quantityFutureStock;
  1158. }
  1159. /**
  1160. * @param bool|null $quantityFutureStock
  1161. *
  1162. * @return OrderDetail
  1163. */
  1164. public function setQuantityFutureStock(?bool $quantityFutureStock): OrderDetail
  1165. {
  1166. $this->quantityFutureStock = $quantityFutureStock;
  1167. return $this;
  1168. }
  1169. /**
  1170. * @return string|null
  1171. */
  1172. public function getPurchaseOrder(): ?string
  1173. {
  1174. return $this->purchaseOrder;
  1175. }
  1176. /**
  1177. * @param string|null $purchaseOrder
  1178. *
  1179. * @return OrderDetail
  1180. */
  1181. public function setPurchaseOrder(?string $purchaseOrder): OrderDetail
  1182. {
  1183. $this->purchaseOrder = $purchaseOrder;
  1184. return $this;
  1185. }
  1186. /**
  1187. * @return int|null
  1188. */
  1189. public function getIdPurchaseLine(): ?int
  1190. {
  1191. return $this->idPurchaseLine;
  1192. }
  1193. /**
  1194. * @param int|null $idPurchaseLine
  1195. *
  1196. * @return OrderDetail
  1197. */
  1198. public function setIdPurchaseLine(?int $idPurchaseLine): OrderDetail
  1199. {
  1200. $this->idPurchaseLine = $idPurchaseLine;
  1201. return $this;
  1202. }
  1203. /**
  1204. * @return float
  1205. */
  1206. public function getWidth(): float
  1207. {
  1208. return $this->width;
  1209. }
  1210. /**
  1211. * @param float $width
  1212. *
  1213. * @return OrderDetail
  1214. */
  1215. public function setWidth(float $width): OrderDetail
  1216. {
  1217. $this->width = $width;
  1218. return $this;
  1219. }
  1220. /**
  1221. * @return float
  1222. */
  1223. public function getHeight(): float
  1224. {
  1225. return $this->height;
  1226. }
  1227. /**
  1228. * @param float $height
  1229. *
  1230. * @return OrderDetail
  1231. */
  1232. public function setHeight(float $height): OrderDetail
  1233. {
  1234. $this->height = $height;
  1235. return $this;
  1236. }
  1237. /**
  1238. * @return float
  1239. */
  1240. public function getDepth(): float
  1241. {
  1242. return $this->depth;
  1243. }
  1244. /**
  1245. * @param float $depth
  1246. *
  1247. * @return OrderDetail
  1248. */
  1249. public function setDepth(float $depth): OrderDetail
  1250. {
  1251. $this->depth = $depth;
  1252. return $this;
  1253. }
  1254. /**
  1255. * @return bool
  1256. */
  1257. public function isPedidosTransito(): bool
  1258. {
  1259. return $this->pedidosTransito;
  1260. }
  1261. /**
  1262. * @param bool $pedidosTransito
  1263. *
  1264. * @return OrderDetail
  1265. */
  1266. public function setPedidosTransito(bool $pedidosTransito): OrderDetail
  1267. {
  1268. $this->pedidosTransito = $pedidosTransito;
  1269. return $this;
  1270. }
  1271. /**
  1272. * @return float
  1273. */
  1274. public function getEstimateCostPrice(): float
  1275. {
  1276. return $this->estimateCostPrice;
  1277. }
  1278. /**
  1279. * @param float $estimateCostPrice
  1280. *
  1281. * @return OrderDetail
  1282. */
  1283. public function setEstimateCostPrice(float $estimateCostPrice): OrderDetail
  1284. {
  1285. $this->estimateCostPrice = $estimateCostPrice;
  1286. return $this;
  1287. }
  1288. /**
  1289. * @return int|null
  1290. */
  1291. public function getPriceByQuantity(): ?int
  1292. {
  1293. return $this->priceByQuantity;
  1294. }
  1295. /**
  1296. * @param int|null $priceByQuantity
  1297. *
  1298. * @return OrderDetail
  1299. */
  1300. public function setPriceByQuantity(?int $priceByQuantity): OrderDetail
  1301. {
  1302. $this->priceByQuantity = $priceByQuantity;
  1303. return $this;
  1304. }
  1305. /**
  1306. * @return string|null
  1307. */
  1308. public function getInternalReference(): ?string
  1309. {
  1310. return $this->internalReference;
  1311. }
  1312. /**
  1313. * @param string|null $internalReference
  1314. *
  1315. * @return OrderDetail
  1316. */
  1317. public function setInternalReference(?string $internalReference): OrderDetail
  1318. {
  1319. $this->internalReference = $internalReference;
  1320. return $this;
  1321. }
  1322. /**
  1323. * @return bool|int|null
  1324. */
  1325. public function getQuantityStockSupplier3To5()
  1326. {
  1327. return $this->quantityStockSupplier3To5;
  1328. }
  1329. /**
  1330. * @param bool|int|null $quantityStockSupplier3To5
  1331. */
  1332. public function setQuantityStockSupplier3To5($quantityStockSupplier3To5): void
  1333. {
  1334. $this->quantityStockSupplier3To5 = $quantityStockSupplier3To5;
  1335. }
  1336. public function getDateUpd(): \DateTime
  1337. {
  1338. return $this->dateUpd;
  1339. }
  1340. public function setDateUpd(\DateTime $dateUpd): OrderDetail
  1341. {
  1342. $this->dateUpd = $dateUpd;
  1343. return $this;
  1344. }
  1345. public function isBuyBox(): bool
  1346. {
  1347. return $this->buyBox;
  1348. }
  1349. public function setBuyBox(bool $buyBox): void
  1350. {
  1351. $this->buyBox = $buyBox;
  1352. }
  1353. /**
  1354. * @return RefundLine[]|ArrayCollection<int, RefundLine>
  1355. */
  1356. public function getRefundLines()
  1357. {
  1358. return $this->refundLines;
  1359. }
  1360. /**
  1361. * @param RefundLine[]|ArrayCollection<int, RefundLine> $refundLines
  1362. */
  1363. public function setRefundLines($refundLines): OrderDetail
  1364. {
  1365. $this->refundLines = $refundLines;
  1366. return $this;
  1367. }
  1368. public function isFullyRefunded(): bool
  1369. {
  1370. return $this->productQuantityRefunded >= $this->productQuantity;
  1371. }
  1372. public function isPartiallyRefunded(): bool
  1373. {
  1374. return $this->productQuantityRefunded > 0 && $this->productQuantityRefunded < $this->productQuantity;
  1375. }
  1376. public function getRefundedPercentage(): float
  1377. {
  1378. if ($this->productQuantity === 0) {
  1379. return 0.0;
  1380. }
  1381. return ($this->productQuantityRefunded / $this->productQuantity) * 100;
  1382. }
  1383. public function getRemainingQuantity(): int
  1384. {
  1385. return max(0, $this->productQuantity - $this->productQuantityRefunded - $this->productQuantityReturn);
  1386. }
  1387. public function hasRemainingQuantity(): bool
  1388. {
  1389. return $this->getRemainingQuantity() > 0;
  1390. }
  1391. }