Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

OrderShopModel.php 23KB

před 3 roky
před 3 roky
před 3 roky
před 3 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894
  1. <?php
  2. namespace Lc\CaracoleBundle\Model\Order;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface;
  7. use Lc\CaracoleBundle\Model\Address\AddressInterface;
  8. use Lc\CaracoleBundle\Model\Config\TaxRateInterface;
  9. use Lc\CaracoleBundle\Model\Distribution\DistributionInterface;
  10. use Lc\CaracoleBundle\Model\File\DocumentInterface;
  11. use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface;
  12. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  13. use Lc\SovBundle\Model\Ticket\TicketInterface;
  14. use Lc\CaracoleBundle\Model\User\VisitorInterface;
  15. use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity;
  16. use Lc\SovBundle\Model\User\UserInterface;
  17. abstract class OrderShopModel extends AbstractLightEntity implements FilterSectionInterface, OrderShopInterface
  18. {
  19. const DELIVERY_TYPE_HOME = 'home';
  20. const DELIVERY_TYPE_POINTSALE = 'point-sale';
  21. /**
  22. * @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface", inversedBy="orderShops", fetch="EAGER")
  23. */
  24. protected $user;
  25. /**
  26. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\VisitorInterface", inversedBy="orders")
  27. */
  28. protected $visitor;
  29. /**
  30. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface")
  31. */
  32. protected $invoiceAddress;
  33. /**
  34. * @ORM\Column(type="text", nullable=true)
  35. */
  36. protected $invoiceAddressText;
  37. /**
  38. * @ORM\Column(type="datetime", nullable=true)
  39. */
  40. protected $validationDate;
  41. /**
  42. * @ORM\Column(type="text", nullable=true)
  43. */
  44. protected $comment;
  45. /**
  46. * @ORM\Column(type="string", length=31, nullable=true)
  47. */
  48. protected $meanPayment;
  49. /**
  50. * @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderStatusHistoryInterface", mappedBy="orderShop", orphanRemoval=true, cascade={"persist"})
  51. */
  52. protected $orderStatusHistories;
  53. /**
  54. * @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderPaymentInterface", mappedBy="orderShop", orphanRemoval=true,cascade={"persist"})
  55. */
  56. protected $orderPayments;
  57. /**
  58. * @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderProductInterface", mappedBy="orderShop", cascade={"persist", "remove"}, orphanRemoval=true, fetch="EAGER")
  59. */
  60. protected $orderProducts;
  61. /**
  62. * @ORM\Column(type="text", nullable=true)
  63. */
  64. protected $deliveryInfos;
  65. /**
  66. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderStatusInterface")
  67. * @ORM\JoinColumn(nullable=false)
  68. */
  69. protected $orderStatus;
  70. /**
  71. * @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderReductionCartInterface", mappedBy="orderShop", orphanRemoval=true)
  72. */
  73. protected $orderReductionCarts;
  74. /**
  75. * @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderReductionCreditInterface", mappedBy="orderShop", orphanRemoval=true)
  76. */
  77. protected $orderReductionCredits;
  78. /**
  79. * @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\File\DocumentInterface", inversedBy="orderShops", cascade={"persist"})
  80. */
  81. protected $documents;
  82. /**
  83. * @ORM\OneToMany(targetEntity="Lc\SovBundle\Model\Ticket\TicketInterface", mappedBy="orderShop")
  84. */
  85. protected $tickets;
  86. /**
  87. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface", inversedBy="orderShops")
  88. * @ORM\JoinColumn(nullable=false)
  89. */
  90. protected $section;
  91. /**
  92. * @ORM\Column(type="integer", nullable=true)
  93. */
  94. protected $cycleId;
  95. /**
  96. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Distribution\DistributionInterface")
  97. * @ORM\JoinColumn(nullable=true)
  98. */
  99. protected $distribution;
  100. /**
  101. * @ORM\Column(type="datetime", nullable=true)
  102. */
  103. protected $orderShopCreatedAt;
  104. /**
  105. * @ORM\Column(type="integer", nullable=true)
  106. */
  107. protected $idValidOrder;
  108. /**
  109. * @ORM\ManyToOne(targetEntity="App\Entity\Address\Address")
  110. */
  111. protected $deliveryAddress;
  112. /**
  113. * @ORM\ManyToOne(targetEntity="App\Entity\PointSale\PointSale")
  114. */
  115. protected $deliveryPointSale;
  116. /**
  117. * @ORM\Column(type="text", nullable=true)
  118. */
  119. protected $deliveryAddressText;
  120. /**
  121. * @ORM\Column(type="string", length=255, nullable=true)
  122. */
  123. protected $deliveryType;
  124. /**
  125. * @ORM\Column(type="float", nullable=true)
  126. */
  127. protected $deliveryPrice;
  128. /**
  129. * @ORM\ManyToOne(targetEntity="App\Entity\Config\TaxRate")
  130. */
  131. protected $deliveryTaxRate;
  132. /**
  133. * @ORM\Column(type="string", length=20, nullable=true)
  134. */
  135. protected $reference;
  136. /**
  137. * @ORM\ManyToOne(targetEntity="App\Entity\Order\OrderShop", inversedBy="complementaryOrderShops")
  138. */
  139. protected $mainOrderShop;
  140. /**
  141. * @ORM\OneToMany(targetEntity="App\Entity\Order\OrderShop", mappedBy="mainOrderShop")
  142. */
  143. protected $complementaryOrderShops;
  144. /**
  145. * @ORM\Column(type="boolean", nullable=true)
  146. */
  147. protected $declineComplementaryOrderShop;
  148. /**
  149. * @ORM\Column(type="boolean", nullable=true)
  150. */
  151. protected $orderAllowByAdmin;
  152. /**
  153. * @ORM\Column(type="integer", nullable=true)
  154. */
  155. protected $hasReach;
  156. /**
  157. * @ORM\Column(type="float", nullable=true)
  158. */
  159. protected $statTotal;
  160. /**
  161. * @ORM\Column(type="float", nullable=true)
  162. */
  163. protected $statTotalWithTax;
  164. /**
  165. * @ORM\Column(type="float", nullable=true)
  166. */
  167. protected $statTotalOrderProductsWithReductions;
  168. /**
  169. * @ORM\Column(type="float", nullable=true)
  170. */
  171. protected $statTotalOrderProductsWithTaxAndReductions;
  172. /**
  173. * @ORM\Column(type="float", nullable=true)
  174. */
  175. protected $statMarginOrderProductsWithReductions;
  176. /**
  177. * @ORM\Column(type="float", nullable=true)
  178. */
  179. protected $statDeliveryPriceWithReduction;
  180. /**
  181. * @ORM\Column(type="float", nullable=true)
  182. */
  183. protected $statDeliveryPriceWithTaxAndReduction;
  184. public function __construct()
  185. {
  186. $this->orderStatusHistories = new ArrayCollection();
  187. $this->orderPayments = new ArrayCollection();
  188. $this->orderProducts = new ArrayCollection();
  189. $this->orderReductionCarts = new ArrayCollection();
  190. $this->orderReductionCredits = new ArrayCollection();
  191. $this->documents = new ArrayCollection();
  192. $this->complementaryOrderShops = new ArrayCollection();
  193. $this->tickets = new ArrayCollection();
  194. }
  195. public function __toString()
  196. {
  197. if ($this->getValidationDate()) {
  198. return 'Commande du ' . $this->getValidationDate()->format('d/m/Y');
  199. } else {
  200. return 'Commande #' . $this->getId();
  201. }
  202. }
  203. public function getValidationDate(): ?\DateTimeInterface
  204. {
  205. return $this->validationDate;
  206. }
  207. public function setValidationDate(\DateTimeInterface $validationDate): self
  208. {
  209. $this->validationDate = $validationDate;
  210. return $this;
  211. }
  212. public function getUser(): ?UserInterface
  213. {
  214. return $this->user;
  215. }
  216. public function setUser(?UserInterface $user): self
  217. {
  218. $this->user = $user;
  219. return $this;
  220. }
  221. public function getInvoiceAddress(): ?AddressInterface
  222. {
  223. return $this->invoiceAddress;
  224. }
  225. public function setInvoiceAddress(?AddressInterface $invoiceAddress): self
  226. {
  227. $this->invoiceAddress = $invoiceAddress;
  228. return $this;
  229. }
  230. public function getInvoiceAddressText(): ?string
  231. {
  232. return $this->invoiceAddressText;
  233. }
  234. public function setInvoiceAddressText(string $invoiceAddressText): self
  235. {
  236. $this->invoiceAddressText = $invoiceAddressText;
  237. return $this;
  238. }
  239. public function getComment(): ?string
  240. {
  241. return $this->comment;
  242. }
  243. public function setComment(?string $comment): self
  244. {
  245. $this->comment = $comment;
  246. return $this;
  247. }
  248. public function getMeanPayment(): ?string
  249. {
  250. return $this->meanPayment;
  251. }
  252. public function setMeanPayment(string $meanPayment): self
  253. {
  254. $this->meanPayment = $meanPayment;
  255. return $this;
  256. }
  257. /**
  258. * @return Collection|OrderStatusHistoryInterface[]
  259. */
  260. public function getOrderStatusHistories(): Collection
  261. {
  262. return $this->orderStatusHistories;
  263. }
  264. public function addOrderStatusHistory(OrderStatusHistoryInterface $orderStatusHistory): self
  265. {
  266. if (!$this->orderStatusHistories->contains($orderStatusHistory)) {
  267. $this->orderStatusHistories[] = $orderStatusHistory;
  268. $orderStatusHistory->setOrderShop($this);
  269. }
  270. return $this;
  271. }
  272. public function removeOrderStatusHistory(OrderStatusHistoryInterface $orderStatusHistory): self
  273. {
  274. if ($this->orderStatusHistories->contains($orderStatusHistory)) {
  275. $this->orderStatusHistories->removeElement($orderStatusHistory);
  276. // set the owning side to null (unless already changed)
  277. if ($orderStatusHistory->getOrderShop() === $this) {
  278. $orderStatusHistory->setOrderShop(null);
  279. }
  280. }
  281. return $this;
  282. }
  283. /**
  284. * @return Collection|OrderPaymentInterface[]
  285. */
  286. public function getOrderPayments($meanPayment = null): Collection
  287. {
  288. if ($meanPayment) {
  289. $orderPaymentsReturn = new ArrayCollection();
  290. foreach ($this->orderPayments as $orderPayment) {
  291. if ($orderPayment->getMeanPayment() == $meanPayment) {
  292. $orderPaymentsReturn[] = $orderPayment;
  293. }
  294. }
  295. return $orderPaymentsReturn;
  296. }
  297. return $this->orderPayments;
  298. }
  299. public function addOrderPayment(OrderPaymentInterface $orderPayment): self
  300. {
  301. if (!$this->orderPayments->contains($orderPayment)) {
  302. $this->orderPayments[] = $orderPayment;
  303. $orderPayment->setOrderShop($this);
  304. }
  305. return $this;
  306. }
  307. public function removeOrderPayment(OrderPaymentInterface $orderPayment): self
  308. {
  309. if ($this->orderPayments->contains($orderPayment)) {
  310. $this->orderPayments->removeElement($orderPayment);
  311. // set the owning side to null (unless already changed)
  312. if ($orderPayment->getOrderShop() === $this) {
  313. $orderPayment->setOrderShop(null);
  314. }
  315. }
  316. return $this;
  317. }
  318. /**
  319. * @return Collection|OrderProductInterface[]
  320. */
  321. public function getOrderProducts(): Collection
  322. {
  323. return $this->orderProducts;
  324. }
  325. public function addOrderProduct(OrderProductInterface $orderProduct): self
  326. {
  327. if (!$this->orderProducts->contains($orderProduct)) {
  328. $this->orderProducts[] = $orderProduct;
  329. $orderProduct->setOrderShop($this);
  330. }
  331. return $this;
  332. }
  333. public function removeOrderProduct(OrderProductInterface $orderProduct): self
  334. {
  335. if ($this->orderProducts->contains($orderProduct)) {
  336. $this->orderProducts->removeElement($orderProduct);
  337. // set the owning side to null (unless already changed)
  338. if ($orderProduct->getOrderShop() === $this) {
  339. $orderProduct->setOrderShop(null);
  340. }
  341. }
  342. return $this;
  343. }
  344. public function getVisitor(): ?VisitorInterface
  345. {
  346. return $this->visitor;
  347. }
  348. public function setVisitor(?VisitorInterface $visitor): self
  349. {
  350. $this->visitor = $visitor;
  351. return $this;
  352. }
  353. public function getDeliveryInfos(): ?string
  354. {
  355. return $this->deliveryInfos;
  356. }
  357. public function setDeliveryInfos(?string $deliveryInfos): self
  358. {
  359. $this->deliveryInfos = $deliveryInfos;
  360. return $this;
  361. }
  362. public function getOrderStatus(): ?OrderStatusInterface
  363. {
  364. return $this->orderStatus;
  365. }
  366. public function setOrderStatusProtected(?OrderStatusInterface $orderStatus): self
  367. {
  368. $this->orderStatus = $orderStatus;
  369. return $this;
  370. }
  371. /**
  372. * @return Collection|OrderReductionCartInterface[]
  373. */
  374. public function getOrderReductionCarts(): Collection
  375. {
  376. return $this->orderReductionCarts;
  377. }
  378. public function addOrderReductionCart(OrderReductionCartInterface $orderReductionCart): self
  379. {
  380. if (!$this->orderReductionCarts->contains($orderReductionCart)) {
  381. $this->orderReductionCarts[] = $orderReductionCart;
  382. $orderReductionCart->setOrderShop($this);
  383. }
  384. return $this;
  385. }
  386. public function removeOrderReductionCart(OrderReductionCartInterface $orderReductionCart): self
  387. {
  388. if ($this->orderReductionCarts->contains($orderReductionCart)) {
  389. $this->orderReductionCarts->removeElement($orderReductionCart);
  390. // set the owning side to null (unless already changed)
  391. if ($orderReductionCart->getOrderShop() === $this) {
  392. $orderReductionCart->setOrderShop(null);
  393. }
  394. }
  395. return $this;
  396. }
  397. /**
  398. * @return Collection|OrderReductionCreditInterface[]
  399. */
  400. public function getOrderReductionCredits(): Collection
  401. {
  402. return $this->orderReductionCredits;
  403. }
  404. public function addOrderReductionCredit(OrderReductionCreditInterface $orderReductionCredit): self
  405. {
  406. if (!$this->orderReductionCredits->contains($orderReductionCredit)) {
  407. $this->orderReductionCredits[] = $orderReductionCredit;
  408. $orderReductionCredit->setOrderShop($this);
  409. }
  410. return $this;
  411. }
  412. public function removeOrderReductionCredit(OrderReductionCreditInterface $orderReductionCredit): self
  413. {
  414. if ($this->orderReductionCredits->contains($orderReductionCredit)) {
  415. $this->orderReductionCredits->removeElement($orderReductionCredit);
  416. // set the owning side to null (unless already changed)
  417. if ($orderReductionCredit->getOrderShop() === $this) {
  418. $orderReductionCredit->setOrderShop(null);
  419. }
  420. }
  421. return $this;
  422. }
  423. /**
  424. * @return Collection|DocumentInterface[]
  425. */
  426. public function getDocuments(): Collection
  427. {
  428. return $this->documents;
  429. }
  430. public function addDocument(DocumentInterface $document): self
  431. {
  432. if (!$this->documents->contains($document)) {
  433. $this->documents[] = $document;
  434. }
  435. return $this;
  436. }
  437. public function removeDocument(DocumentInterface $document): self
  438. {
  439. if ($this->documents->contains($document)) {
  440. $this->documents->removeElement($document);
  441. }
  442. return $this;
  443. }
  444. /**
  445. * @return Collection|TicketInterface[]
  446. */
  447. public function getTickets(): Collection
  448. {
  449. return $this->tickets;
  450. }
  451. public function addTicket(TicketInterface $ticket): self
  452. {
  453. if (!$this->tickets->contains($ticket)) {
  454. $this->tickets[] = $ticket;
  455. $ticket->setOrderShop($this);
  456. }
  457. return $this;
  458. }
  459. public function removeTicket(TicketInterface $ticket): self
  460. {
  461. if ($this->tickets->contains($ticket)) {
  462. $this->tickets->removeElement($ticket);
  463. // set the owning side to null (unless already changed)
  464. if ($ticket->getOrderShop() === $this) {
  465. $ticket->setOrderShop(null);
  466. }
  467. }
  468. return $this;
  469. }
  470. public function getSection(): ?SectionInterface
  471. {
  472. return $this->section;
  473. }
  474. public function setSection(?SectionInterface $section): self
  475. {
  476. $this->section = $section;
  477. return $this;
  478. }
  479. public function getCycleId(): ?int
  480. {
  481. return $this->cycleId;
  482. }
  483. public function setCycleId(?int $cycleId): self
  484. {
  485. $this->cycleId = $cycleId;
  486. return $this;
  487. }
  488. public function getDistribution(): ?DistributionInterface
  489. {
  490. return $this->distribution;
  491. }
  492. public function setDistribution(?DistributionInterface $distribution): self
  493. {
  494. $this->distribution = $distribution;
  495. return $this;
  496. }
  497. public function getOrderShopCreatedAt(): ?\DateTimeInterface
  498. {
  499. return $this->orderShopCreatedAt;
  500. }
  501. public function setOrderShopCreatedAt(?\DateTimeInterface $orderShopCreatedAt): self
  502. {
  503. $this->orderShopCreatedAt = $orderShopCreatedAt;
  504. return $this;
  505. }
  506. public function getIdValidOrder(): ?int
  507. {
  508. return $this->idValidOrder;
  509. }
  510. public function setIdValidOrder(?int $idValidOrder): self
  511. {
  512. $this->idValidOrder = $idValidOrder;
  513. return $this;
  514. }
  515. public function getDeliveryAddress(): ?AddressInterface
  516. {
  517. return $this->deliveryAddress;
  518. }
  519. public function setDeliveryAddress(?AddressInterface $deliveryAddress): self
  520. {
  521. $this->deliveryAddress = $deliveryAddress;
  522. return $this;
  523. }
  524. public function getDeliveryAddressText(): ?string
  525. {
  526. return $this->deliveryAddressText;
  527. }
  528. public function setDeliveryAddressText(string $deliveryAddressText): self
  529. {
  530. $this->deliveryAddressText = $deliveryAddressText;
  531. return $this;
  532. }
  533. public function getDeliveryPointSale(): ?PointSaleInterface
  534. {
  535. return $this->deliveryPointSale;
  536. }
  537. public function setDeliveryPointSale(?PointSaleInterface $deliveryPointSale): self
  538. {
  539. $this->deliveryPointSale = $deliveryPointSale;
  540. return $this;
  541. }
  542. public function getDeliveryType(): ?string
  543. {
  544. return $this->deliveryType;
  545. }
  546. public function setDeliveryType(?string $deliveryType): self
  547. {
  548. $this->deliveryType = $deliveryType;
  549. return $this;
  550. }
  551. public function getDeliveryPrice(): ?float
  552. {
  553. return $this->deliveryPrice;
  554. }
  555. public function setDeliveryPrice(?float $deliveryPrice): self
  556. {
  557. $this->deliveryPrice = $deliveryPrice;
  558. return $this;
  559. }
  560. public function getDeliveryTaxRate(): ?TaxRateInterface
  561. {
  562. return $this->deliveryTaxRate;
  563. }
  564. public function setDeliveryTaxRate(?TaxRateInterface $deliveryTaxRate): self
  565. {
  566. $this->deliveryTaxRate = $deliveryTaxRate;
  567. return $this;
  568. }
  569. public function getReference(): ?string
  570. {
  571. return $this->reference;
  572. }
  573. public function setReference(?string $reference): self
  574. {
  575. $this->reference = $reference;
  576. return $this;
  577. }
  578. public function getMainOrderShop(): ?self
  579. {
  580. return $this->mainOrderShop;
  581. }
  582. public function setMainOrderShop(?self $mainOrderShop): self
  583. {
  584. $this->mainOrderShop = $mainOrderShop;
  585. return $this;
  586. }
  587. /**
  588. * @return Collection|OrderShopInterface[]
  589. */
  590. public function getComplementaryOrderShops(): Collection
  591. {
  592. $arrayComplementaryOrderShops = new ArrayCollection();
  593. foreach ($this->complementaryOrderShops as $complementaryOrderShop) {
  594. $arrayComplementaryOrderShops[] = $complementaryOrderShop;
  595. }
  596. return $arrayComplementaryOrderShops;
  597. }
  598. public function addComplementaryOrderShop(self $complementaryOrderShop): self
  599. {
  600. if (!$this->complementaryOrderShops->contains($complementaryOrderShop)) {
  601. $this->complementaryOrderShops[] = $complementaryOrderShop;
  602. $complementaryOrderShop->setMainOrderShop($this);
  603. }
  604. return $this;
  605. }
  606. public function removeComplementaryOrderShop(self $complementaryOrderShop): self
  607. {
  608. if ($this->complementaryOrderShops->contains($complementaryOrderShop)) {
  609. $this->complementaryOrderShops->removeElement($complementaryOrderShop);
  610. // set the owning side to null (unless already changed)
  611. if ($complementaryOrderShop->getMainOrderShop() === $this) {
  612. $complementaryOrderShop->setMainOrderShop(null);
  613. }
  614. }
  615. return $this;
  616. }
  617. public function getDeclineComplementaryOrderShop(): ?bool
  618. {
  619. return $this->declineComplementaryOrderShop;
  620. }
  621. public function setDeclineComplementaryOrderShop(?bool $declineComplementaryOrderShop): self
  622. {
  623. $this->declineComplementaryOrderShop = $declineComplementaryOrderShop;
  624. return $this;
  625. }
  626. public function getOrderAllowByAdmin(): ?bool
  627. {
  628. return $this->orderAllowByAdmin;
  629. }
  630. public function setOrderAllowByAdmin(?bool $orderAllowByAdmin): self
  631. {
  632. $this->orderAllowByAdmin = $orderAllowByAdmin;
  633. return $this;
  634. }
  635. public function getHasReach(): ?int
  636. {
  637. return $this->hasReach;
  638. }
  639. public function setHasReach(?int $hasReach): self
  640. {
  641. $this->hasReach = $hasReach;
  642. return $this;
  643. }
  644. public function getStatTotal(): ?float
  645. {
  646. return $this->statTotal;
  647. }
  648. public function setStatTotal(?float $statTotal): self
  649. {
  650. $this->statTotal = $statTotal;
  651. return $this;
  652. }
  653. public function getStatTotalWithTax(): ?float
  654. {
  655. return $this->statTotalWithTax;
  656. }
  657. public function setStatTotalWithTax(?float $statTotalWithTax): self
  658. {
  659. $this->statTotalWithTax = $statTotalWithTax;
  660. return $this;
  661. }
  662. public function getStatTotalOrderProductsWithReductions(): ?float
  663. {
  664. return $this->statTotalOrderProductsWithReductions;
  665. }
  666. public function setStatTotalOrderProductsWithReductions(?float $statTotalOrderProductsWithReductions): self
  667. {
  668. $this->statTotalOrderProductsWithReductions = $statTotalOrderProductsWithReductions;
  669. return $this;
  670. }
  671. public function getStatTotalOrderProductsWithTaxAndReductions(): ?float
  672. {
  673. return $this->statTotalOrderProductsWithTaxAndReductions;
  674. }
  675. public function setStatTotalOrderProductsWithTaxAndReductions(?float $statTotalOrderProductsWithTaxAndReductions): self
  676. {
  677. $this->statTotalOrderProductsWithTaxAndReductions = $statTotalOrderProductsWithTaxAndReductions;
  678. return $this;
  679. }
  680. public function getStatMarginOrderProductsWithReductions(): ?float
  681. {
  682. return $this->statMarginOrderProductsWithReductions;
  683. }
  684. public function setStatMarginOrderProductsWithReductions(?float $statMarginOrderProductsWithReductions): self
  685. {
  686. $this->statMarginOrderProductsWithReductions = $statMarginOrderProductsWithReductions;
  687. return $this;
  688. }
  689. public function getStatDeliveryPriceWithReduction(): ?float
  690. {
  691. return $this->statDeliveryPriceWithReduction;
  692. }
  693. public function setStatDeliveryPriceWithReduction(?float $statDeliveryPriceWithReduction): self
  694. {
  695. $this->statDeliveryPriceWithReduction = $statDeliveryPriceWithReduction;
  696. return $this;
  697. }
  698. public function getStatDeliveryPriceWithTaxAndReduction(): ?float
  699. {
  700. return $this->statDeliveryPriceWithTaxAndReduction;
  701. }
  702. public function setStatDeliveryPriceWithTaxAndReduction(?float $statDeliveryPriceWithTaxAndReduction): self
  703. {
  704. $this->statDeliveryPriceWithTaxAndReduction = $statDeliveryPriceWithTaxAndReduction;
  705. return $this;
  706. }
  707. }