Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

OrderShopModel.php 23KB

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