src/Entity/Commande.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\CommandeRepository")
  8.  */
  9. class Commande
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\Agent", inversedBy="agent")
  19.      */
  20.     private $IdAg;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\Agent", inversedBy="agent")
  23.      */
  24.     private $IdCl;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\ProgrammeContenaire", inversedBy="$commandes")
  27.      */
  28.     private $IdCtPr;
  29.     /**
  30.      * @ORM\Column(type="date")
  31.      */
  32.     private $DateCommande;
  33.     /**
  34.      * @ORM\OneToMany(targetEntity="App\Entity\Paiement", mappedBy="IdCmd", orphanRemoval=true, cascade={"persist"})
  35.      */
  36.     private $paiements;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     private $AliasClient;
  41.     /**
  42.      * @ORM\Column(type="string", length=500, nullable=true)
  43.      */
  44.     private $RecuCargo;
  45.     /**
  46.      * @ORM\Column(type="integer")
  47.      */
  48.     private $QtePrint;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $contact;
  53.     /**
  54.      * @ORM\Column(type="boolean", nullable=true)
  55.      */
  56.     private $facturehors;
  57.     /**
  58.      * @ORM\Column(type="boolean")
  59.      */
  60.     private $NouvelleFacture;
  61.     /**
  62.      * @ORM\Column(type="boolean", nullable=true)
  63.      */
  64.     private $factureMarchandiseAbscent;
  65.     /**
  66.      * @ORM\OneToMany(targetEntity="App\Entity\TmpMarchandise", mappedBy="commande", cascade={"persist", "remove"})
  67.      */
  68.     private $tmpMarchandises;
  69.     /**
  70.      * @ORM\OneToMany(targetEntity="App\Entity\TmpVolume", mappedBy="commande", cascade={"persist", "remove"})
  71.      */
  72.     private $tmpVolumes;
  73.     /**
  74.      * @ORM\OneToMany(targetEntity="App\Entity\AutreFrais", mappedBy="commande", cascade={"persist", "remove"})
  75.      */
  76.     private $autreFrais;
  77.     /**
  78.      * @ORM\OneToMany(targetEntity="App\Entity\Reduction", mappedBy="IdCmd", cascade={"persist", "remove"})
  79.      */
  80.     private $reduction;
  81.     /**
  82.      * @ORM\Column(type="boolean")
  83.      */
  84.     private $isPaid;
  85.     /**
  86.      * @ORM\Column(type="boolean")
  87.      */
  88.     private $modification;
  89.     /**
  90.      * @var mixed
  91.      */
  92.     private $reductionTotal;
  93.     /**
  94.      * @var mixed
  95.      */
  96.     private $paiementAvance;
  97.     /**
  98.      * @var mixed
  99.      */
  100.     private $totalAPaiyer;
  101.     /**
  102.      * @var mixed
  103.      */
  104.     private $balance;
  105.     /**
  106.      * @var mixed
  107.      */
  108.     private $cbm;
  109.     /**
  110.      * @var mixed
  111.      */
  112.     private $kg;
  113.     /**
  114.      * @var mixed
  115.      */
  116.     private $tonne;
  117.     /**
  118.      * @var mixed
  119.      */
  120.     private $AutresFr;
  121.     /**
  122.      * @var mixed
  123.      */
  124.     private $fret;
  125.     /**
  126.      * @var mixed
  127.      */
  128.     private $netDejaPaie;
  129.     /**
  130.      * @ORM\Column(type="string", length=8000, nullable=true)
  131.      */
  132.     private $remarque;
  133.     /**
  134.      * @ORM\OneToMany(targetEntity="App\Entity\Remarque", mappedBy="commande", cascade={"persist", "remove"})
  135.      */
  136.     private $remarques;
  137.     /**
  138.      * @ORM\Column(type="boolean")
  139.      */
  140.     private $flagflutterNotification;
  141.     /**
  142.      * @ORM\OneToMany(targetEntity=Depot::class, mappedBy="commande")
  143.      */
  144.     private $depots;
  145.     /**
  146.      * @ORM\Column(type="string", length=10, nullable=true)
  147.      */
  148.     private $pkg;
  149.     /**
  150.      * @ORM\Column(type="string", length=25, nullable=true)
  151.      */
  152.     private $ville;
  153.     /**
  154.      * @ORM\Column(type="boolean")
  155.      */
  156.     private $isNumberVerified;
  157.     /**
  158.      * @ORM\Column(type="string", length=1500, nullable=true)
  159.      */
  160.     private $remarqueDepot;
  161.     /**
  162.      * @ORM\Column(type="boolean")
  163.      */
  164.     private $isScanned;
  165.     /**
  166.      * @ORM\Column(type="boolean", nullable=true)
  167.      */
  168.     private $p1;
  169.     /**
  170.      * @ORM\Column(type="boolean", nullable=true)
  171.      */
  172.     private $p2;
  173.     /**
  174.      * @ORM\Column(type="boolean", nullable=true)
  175.      */
  176.     private $p3;
  177.     /**
  178.      * @ORM\Column(type="boolean", nullable=true)
  179.      */
  180.     private $p4;
  181.     /**
  182.      * @ORM\Column(type="boolean", nullable=true)
  183.      */
  184.     private $p5;
  185.     /**
  186.      * @ORM\Column(type="boolean", nullable=true)
  187.      */
  188.     private $p6;
  189.     /**
  190.      * @ORM\Column(type="datetime", nullable=true)
  191.      */
  192.     private $dateP1;
  193.     /**
  194.      * @ORM\Column(type="datetime", nullable=true)
  195.      */
  196.     private $dateP2;
  197.     /**
  198.      * @ORM\Column(type="datetime", nullable=true)
  199.      */
  200.     private $dateP3;
  201.     /**
  202.      * @ORM\Column(type="datetime", nullable=true)
  203.      */
  204.     private $dateP4;
  205.     /**
  206.      * @ORM\Column(type="datetime", nullable=true)
  207.      */
  208.     private $dateP5;
  209.     /**
  210.      * @ORM\Column(type="datetime", nullable=true)
  211.      */
  212.     private $dateP6;
  213.     public function __construct()
  214.     {
  215.         $this->DateCommande = new \DateTime();
  216.         $this->paiements = new ArrayCollection();
  217.         $this->QtePrint = 0;
  218.         $this->modification = 0;
  219.         $this->isNumberVerified = false;
  220.         $this->isScanned = false;
  221.         $this->NouvelleFacture = true;
  222.         $this->factureMarchandiseAbscent = false;
  223.         $this->facturehors = false;
  224.         $this->tmpMarchandises = new ArrayCollection();
  225.         $this->tmpVolumes = new ArrayCollection();
  226.         $this->autreFrais = new ArrayCollection();
  227.         $this->reduction = new ArrayCollection();
  228.         $this->remarques = new ArrayCollection();
  229.         $this->depots = new ArrayCollection();
  230.     }
  231.     public function getId(): ?int
  232.     {
  233.         return $this->id;
  234.     }
  235.     public function getIdCtPr(): ?ProgrammeContenaire
  236.     {
  237.         return $this->IdCtPr;
  238.     }
  239.     public function setIdCtPr(?ProgrammeContenaire $IdCtPr): self
  240.     {
  241.         $this->IdCtPr = $IdCtPr;
  242.         return $this;
  243.     }
  244.     public function getIdCl(): ?Agent
  245.     {
  246.         return $this->IdCl;
  247.     }
  248.     public function setIdCl(?Agent $IdCl): self
  249.     {
  250.         $this->IdCl = $IdCl;
  251.         return $this;
  252.     }
  253.     public function getIdAg(): ?Agent
  254.     {
  255.         return $this->IdCl;
  256.     }
  257.     public function setIdAg(?Agent $IdAg): self
  258.     {
  259.         $this->IdAg = $IdAg;
  260.         return $this;
  261.     }
  262.     public function getDateCommande(): ?\DateTimeInterface
  263.     {
  264.         return $this->DateCommande;
  265.     }
  266.     public function setDateCommande(\DateTimeInterface $DateCommande): self
  267.     {
  268.         $this->DateCommande = $DateCommande;
  269.         return $this;
  270.     }
  271.     /**
  272.      * @return Collection|Paiement[]
  273.      */
  274.     public function getPaiements(): Collection
  275.     {
  276.         return $this->paiements;
  277.     }
  278.     public function addPaiement(Paiement $paiement): self
  279.     {
  280.         if (!$this->paiements->contains($paiement)) {
  281.             $this->paiements[] = $paiement;
  282.             $paiement->setIdCmd($this);
  283.         }
  284.         return $this;
  285.     }
  286.     public function removePaiement(Paiement $paiement): self
  287.     {
  288.         if ($this->paiements->contains($paiement)) {
  289.             $this->paiements->removeElement($paiement);
  290.             if ($paiement->getIdCmd() === $this) {
  291.                 $paiement->setIdCmd(null);
  292.             }
  293.         }
  294.         return $this;
  295.     }
  296.     public function __toString()
  297.     {
  298.         return (string) $this->id;
  299.     }
  300.     public function getAliasClient(): ?string
  301.     {
  302.         return $this->AliasClient;
  303.     }
  304.     public function setAliasClient(?string $AliasClient): self
  305.     {
  306.         $this->AliasClient = $AliasClient;
  307.         return $this;
  308.     }
  309.     public function getRecuCargo(): ?string
  310.     {
  311.         return $this->RecuCargo;
  312.     }
  313.     public function setRecuCargo(?string $RecuCargo): self
  314.     {
  315.         $this->RecuCargo = $RecuCargo;
  316.         return $this;
  317.     }
  318.     public function getQtePrint(): ?int
  319.     {
  320.         return $this->QtePrint;
  321.     }
  322.     public function setQtePrint(int $QtePrint): self
  323.     {
  324.         $this->QtePrint = $QtePrint;
  325.         return $this;
  326.     }
  327.     public function getContact(): ?string
  328.     {
  329.         return $this->contact;
  330.     }
  331.     public function setContact(?string $contact): self
  332.     {
  333.         $this->contact = $contact;
  334.         return $this;
  335.     }
  336.     public function getFacturehors(): ?bool
  337.     {
  338.         return $this->facturehors;
  339.     }
  340.     public function setFacturehors(?bool $facturehors): self
  341.     {
  342.         $this->facturehors = $facturehors;
  343.         return $this;
  344.     }
  345.     public function getNouvelleFacture(): ?bool
  346.     {
  347.         return $this->NouvelleFacture;
  348.     }
  349.     public function setNouvelleFacture(bool $NouvelleFacture): self
  350.     {
  351.         $this->NouvelleFacture = $NouvelleFacture;
  352.         return $this;
  353.     }
  354.     public function getFactureMarchandiseAbscent(): ?bool
  355.     {
  356.         return $this->factureMarchandiseAbscent;
  357.     }
  358.     public function setFactureMarchandiseAbscent(?bool $factureMarchandiseAbscent): self
  359.     {
  360.         $this->factureMarchandiseAbscent = $factureMarchandiseAbscent;
  361.         return $this;
  362.     }
  363.     /**
  364.      * @return Collection|TmpMarchandise[]
  365.      */
  366.     public function getTmpMarchandises(): Collection
  367.     {
  368.         return $this->tmpMarchandises;
  369.     }
  370.     public function addTmpMarchandise(TmpMarchandise $tmpMarchandise): self
  371.     {
  372.         if (!$this->tmpMarchandises->contains($tmpMarchandise)) {
  373.             $this->tmpMarchandises[] = $tmpMarchandise;
  374.             $tmpMarchandise->setCommande($this);
  375.         }
  376.         return $this;
  377.     }
  378.     public function removeTmpMarchandise(TmpMarchandise $tmpMarchandise): self
  379.     {
  380.         if ($this->tmpMarchandises->contains($tmpMarchandise)) {
  381.             $this->tmpMarchandises->removeElement($tmpMarchandise);
  382.             if ($tmpMarchandise->getCommande() === $this) {
  383.                 $tmpMarchandise->setCommande(null);
  384.             }
  385.         }
  386.         return $this;
  387.     }
  388.     /**
  389.      * @return Collection|TmpVolume[]
  390.      */
  391.     public function getTmpVolumes(): Collection
  392.     {
  393.         return $this->tmpVolumes;
  394.     }
  395.     public function addTmpVolume(TmpVolume $tmpVolume): self
  396.     {
  397.         if (!$this->tmpVolumes->contains($tmpVolume)) {
  398.             $this->tmpVolumes[] = $tmpVolume;
  399.             $tmpVolume->setCommande($this);
  400.         }
  401.         return $this;
  402.     }
  403.     public function removeTmpVolume(TmpVolume $tmpVolume): self
  404.     {
  405.         if ($this->tmpVolumes->contains($tmpVolume)) {
  406.             $this->tmpVolumes->removeElement($tmpVolume);
  407.             if ($tmpVolume->getCommande() === $this) {
  408.                 $tmpVolume->setCommande(null);
  409.             }
  410.         }
  411.         return $this;
  412.     }
  413.     /**
  414.      * @return Collection|AutreFrais[]
  415.      */
  416.     public function getAutreFrais(): Collection
  417.     {
  418.         return $this->autreFrais;
  419.     }
  420.     public function addAutreFrai(AutreFrais $autreFrai): self
  421.     {
  422.         if (!$this->autreFrais->contains($autreFrai)) {
  423.             $this->autreFrais[] = $autreFrai;
  424.             $autreFrai->setCommande($this);
  425.         }
  426.         return $this;
  427.     }
  428.     public function removeAutreFrai(AutreFrais $autreFrai): self
  429.     {
  430.         if ($this->autreFrais->contains($autreFrai)) {
  431.             $this->autreFrais->removeElement($autreFrai);
  432.             if ($autreFrai->getCommande() === $this) {
  433.                 $autreFrai->setCommande(null);
  434.             }
  435.         }
  436.         return $this;
  437.     }
  438.     public function getModification(): ?bool
  439.     {
  440.         return $this->modification;
  441.     }
  442.     public function setModification(bool $modification): self
  443.     {
  444.         $this->modification = $modification;
  445.         return $this;
  446.     }
  447.     public function getNomAgent(Commande $commande): string
  448.     {
  449.         return $this;
  450.     }
  451.     public function getTotalAPaiyerVolume()
  452.     {
  453.         $somme1 = 0;
  454.         $Tab = $this->getTmpVolumes();
  455.         for ($i = 0; $i < count($Tab); $i++) {
  456.             $somme = $Tab[$i]->getVolume() * $Tab[$i]->getPrixUnit();
  457.             $somme1 = round($somme) + $somme1;
  458.         }
  459.         return round($somme1);
  460.     }
  461.     public function getTotalAPaiyerAutraiFrais()
  462.     {
  463.         $somme = 0;
  464.         $Tab = $this->getAutreFrais();
  465.         for ($i = 0; $i < count($Tab); $i++) {
  466.             $somme += $Tab[$i]->getMontant();
  467.         }
  468.         return $somme;
  469.     }
  470.     /**
  471.      * @return float
  472.      */
  473.     public function getTotalPaiement()
  474.     {
  475.         $somme = 0;
  476.         $Tab = $this->getPaiements();
  477.         for ($i = 0; $i < count($Tab); $i++) {
  478.             $somme += $Tab[$i]->getMontant();
  479.         }
  480.         return $somme;
  481.     }
  482.     /**
  483.      * @return float
  484.      */
  485.     public function getTotalPaiementPaiement()
  486.     {
  487.         $somme = 0;
  488.         $Tab = $this->getPaiements();
  489.         for ($i = 0; $i < count($Tab); $i++) {
  490.             if ($Tab[$i]->getFlagEnAvance() === '0') {
  491.                 $somme += $Tab[$i]->getMontant();
  492.             }
  493.         }
  494.         return $somme;
  495.     }
  496.     /**
  497.      * @return float
  498.      */
  499.     public function getTotalPaiementAvance()
  500.     {
  501.         $somme = 0;
  502.         $Tab = $this->getPaiements();
  503.         for ($i = 0; $i < count($Tab); $i++) {
  504.             if ($Tab[$i]->getFlagEnAvance() === true) {
  505.                 $somme += $Tab[$i]->getMontant();
  506.             }
  507.         }
  508.         return $somme;
  509.     }
  510.     /**
  511.      * @return float
  512.      */
  513.     public function getTotalReduction()
  514.     {
  515.         $somme = 0;
  516.         $Tab = $this->getReduction();
  517.         for ($i = 0; $i < count($Tab); $i++) {
  518.             $somme += $Tab[$i]->getMontant();
  519.         }
  520.         return $this->reductionTotal = $somme;
  521.     }
  522.     /**
  523.      * @return float
  524.      */
  525.     public function getTotalReductionReduction()
  526.     {
  527.         $somme = 0;
  528.         $Tab = $this->getReduction();
  529.         for ($i = 0; $i < count($Tab); $i++) {
  530.             if ($Tab[$i]->getFlagCompassation() === '0') {
  531.                 $somme += $Tab[$i]->getMontant();
  532.             }
  533.         }
  534.         return $somme;
  535.     }
  536.     /**
  537.      * @return float
  538.      */
  539.     public function getTotalCompassation()
  540.     {
  541.         $somme = 0;
  542.         $Tab = $this->getReduction();
  543.         for ($i = 0; $i < count($Tab); $i++) {
  544.             if ($Tab[$i]->getFlagCompassation() === '1') {
  545.                 $somme += $Tab[$i]->getMontant();
  546.             }
  547.         }
  548.         return $somme;
  549.     }
  550.     /**
  551.      * @return float
  552.      */
  553.     public function getTotalBanque()
  554.     {
  555.         $somme = 0;
  556.         $Tab = $this->getReduction();
  557.         for ($i = 0; $i < count($Tab); $i++) {
  558.             if ($Tab[$i]->getFlagCompassation() === '2') {
  559.                 $somme += $Tab[$i]->getMontant();
  560.             }
  561.         }
  562.         return $somme;
  563.     }
  564.     /**
  565.      * @return float
  566.      */
  567.     public function getTotalCBM()
  568.     {
  569.         $somme = 0;
  570.         $Tab = $this->getTmpVolumes();
  571.         for ($i = 0; $i < count($Tab); $i++) {
  572.             if ($Tab[$i]->getUnite() === 'CBM') {
  573.                 $somme += $Tab[$i]->getVolume();
  574.             }
  575.         }
  576.         return $somme;
  577.     }
  578.     /**
  579.      * @return float
  580.      */
  581.     public function getTotalKG()
  582.     {
  583.         $somme = 0;
  584.         $Tab = $this->getTmpVolumes();
  585.         for ($i = 0; $i < count($Tab); $i++) {
  586.             if ($Tab[$i]->getUnite() === 'KG') {
  587.                 $somme += $Tab[$i]->getVolume();
  588.             }
  589.         }
  590.         return $somme;
  591.     }
  592.     /**
  593.      * @return float
  594.      */
  595.     public function getTotalCOLIS()
  596.     {
  597.         $somme = 0;
  598.         $Tab = $this->getTmpMarchandises();
  599.         for ($i = 0; $i < count($Tab); $i++) {
  600.             $somme += $Tab[$i]->getQte();
  601.         }
  602.         return $somme;
  603.     }
  604.     /**
  605.      * @return float
  606.      */
  607.     public function getTotalSortieDepot()
  608.     {
  609.         $somme = 0;
  610.         $Tab = $this->getDepots();
  611.         for ($i = 0; $i < count($Tab); $i++) {
  612.             $somme += $Tab[$i]->getQuantite();
  613.         }
  614.         return $somme;
  615.     }
  616.     /**
  617.      * @return float
  618.      */
  619.     public function getTotalTONNE()
  620.     {
  621.         $somme = 0;
  622.         $Tab = $this->getTmpVolumes();
  623.         for ($i = 0; $i < count($Tab); $i++) {
  624.             if ($Tab[$i]->getUnite() === 'TONNE') {
  625.                 $somme += $Tab[$i]->getVolume();
  626.             }
  627.         }
  628.         return $somme;
  629.     }
  630.     /**
  631.      * @return float
  632.      */
  633.     public function getTotalAF()
  634.     {
  635.         $somme = 0;
  636.         $Tab = $this->getAutreFrais();
  637.         for ($i = 0; $i < count($Tab); $i++) {
  638.             $somme += $Tab[$i]->getMontant();
  639.         }
  640.         return $somme;
  641.     }
  642.     /**
  643.      * @return float
  644.      */
  645.     public function getTotalAPaiyer()
  646.     {
  647.         return $this->totalAPaiyer = $this->getTotalAPaiyerVolume() + $this->getTotalAPaiyerAutraiFrais();
  648.     }
  649.     /**
  650.      * @return float
  651.      */
  652.     public function getBalance()
  653.     {
  654.         $this->balance = $this->getTotalAPaiyer() - $this->getTotalReduction() - $this->getTotalPaiement();
  655.         return $this->balance;
  656.     }
  657.     /**
  658.      * @return float
  659.      */
  660.     public function getNetDejaPaie()
  661.     {
  662.         $this->netDejaPaie = $this->getTotalReduction() + $this->getTotalPaiement();
  663.         return $this->netDejaPaie;
  664.     }
  665.     /**
  666.      * @return Collection|Reduction[]
  667.      */
  668.     public function getReduction(): Collection
  669.     {
  670.         return $this->reduction;
  671.     }
  672.     public function addReduction(Reduction $reduction): self
  673.     {
  674.         if (!$this->reduction->contains($reduction)) {
  675.             $this->reduction[] = $reduction;
  676.             $reduction->setIdCmd($this);
  677.         }
  678.         return $this;
  679.     }
  680.     public function removeReduction(Reduction $reduction): self
  681.     {
  682.         if ($this->reduction->contains($reduction)) {
  683.             $this->reduction->removeElement($reduction);
  684.             if ($reduction->getIdCmd() === $this) {
  685.                 $reduction->setIdCmd(null);
  686.             }
  687.         }
  688.         return $this;
  689.     }
  690.     public function getRemarque(): ?string
  691.     {
  692.         return $this->remarque;
  693.     }
  694.     public function setRemarque(?string $remarque): self
  695.     {
  696.         $this->remarque = $remarque;
  697.         return $this;
  698.     }
  699.     public function getPaiementAvance()
  700.     {
  701.         return $this->paiementAvance = $this->getTotalPaiementAvance();
  702.     }
  703.     public function getReductionTotal()
  704.     {
  705.         return $this->reductionTotal = $this->getTotalReductionReduction();
  706.     }
  707.     /**
  708.      * @return Collection|Remarque[]
  709.      */
  710.     public function getRemarques(): Collection
  711.     {
  712.         return $this->remarques;
  713.     }
  714.     public function addRemarque(Remarque $remarque): self
  715.     {
  716.         if (!$this->remarques->contains($remarque)) {
  717.             $this->remarques[] = $remarque;
  718.             $remarque->setCommande($this);
  719.         }
  720.         return $this;
  721.     }
  722.     public function removeRemarque(Remarque $remarque): self
  723.     {
  724.         if ($this->remarques->contains($remarque)) {
  725.             $this->remarques->removeElement($remarque);
  726.             if ($remarque->getCommande() === $this) {
  727.                 $remarque->setCommande(null);
  728.             }
  729.         }
  730.         return $this;
  731.     }
  732.     public function getCbm()
  733.     {
  734.         return $this->cbm = $this->getTotalCBM() / 1;
  735.     }
  736.     public function getKg()
  737.     {
  738.         return $this->kg = $this->getTotalKG() / 1;
  739.     }
  740.     public function getTonne()
  741.     {
  742.         return $this->tonne = $this->getTotalTONNE() / 1;
  743.     }
  744.     public function getAutresFr()
  745.     {
  746.         return $this->AutresFr = $this->getTotalAF();
  747.     }
  748.     public function getFret()
  749.     {
  750.         return $this->fret = $this->getTotalAPaiyerVolume();
  751.     }
  752.     public function getFlagflutterNotification(): ?bool
  753.     {
  754.         return $this->flagflutterNotification;
  755.     }
  756.     public function setFlagflutterNotification(bool $flagflutterNotification): self
  757.     {
  758.         $this->flagflutterNotification = $flagflutterNotification;
  759.         return $this;
  760.     }
  761.     /**
  762.      * @return Collection<int, Depot>
  763.      */
  764.     public function getDepots(): Collection
  765.     {
  766.         return $this->depots;
  767.     }
  768.     public function addDepot(Depot $depot): self
  769.     {
  770.         if (!$this->depots->contains($depot)) {
  771.             $this->depots[] = $depot;
  772.             $depot->setCommande($this);
  773.         }
  774.         return $this;
  775.     }
  776.     public function removeDepot(Depot $depot): self
  777.     {
  778.         if ($this->depots->removeElement($depot)) {
  779.             if ($depot->getCommande() === $this) {
  780.                 $depot->setCommande(null);
  781.             }
  782.         }
  783.         return $this;
  784.     }
  785.     public function isIsPaid(): ?bool
  786.     {
  787.         return $this->isPaid;
  788.     }
  789.     public function setIsPaid(bool $isPaid): self
  790.     {
  791.         $this->isPaid = $isPaid;
  792.         return $this;
  793.     }
  794.     public function getPkg(): ?string
  795.     {
  796.         return $this->pkg;
  797.     }
  798.     public function setPkg(?string $pkg): self
  799.     {
  800.         $this->pkg = $pkg;
  801.         return $this;
  802.     }
  803.     public function getVille(): ?string
  804.     {
  805.         return $this->ville;
  806.     }
  807.     public function setVille(?string $ville): self
  808.     {
  809.         $this->ville = $ville;
  810.         return $this;
  811.     }
  812.     public function isIsNumberVerified(): ?bool
  813.     {
  814.         return $this->isNumberVerified;
  815.     }
  816.     public function setIsNumberVerified(bool $isNumberVerified): self
  817.     {
  818.         $this->isNumberVerified = $isNumberVerified;
  819.         return $this;
  820.     }
  821.     public function getRemarqueDepot(): ?string
  822.     {
  823.         return $this->remarqueDepot;
  824.     }
  825.     public function setRemarqueDepot(?string $remarqueDepot): self
  826.     {
  827.         $this->remarqueDepot = $remarqueDepot;
  828.         return $this;
  829.     }
  830.     public function isIsScanned(): ?bool
  831.     {
  832.         return $this->isScanned;
  833.     }
  834.     public function setIsScanned(bool $isScanned): self
  835.     {
  836.         $this->isScanned = $isScanned;
  837.         return $this;
  838.     }
  839.     public function isP1(): ?bool
  840.     {
  841.         return $this->p1 ?? false;
  842.     }
  843.     public function setP1(bool $p1): self
  844.     {
  845.         $this->p1 = $p1;
  846.         $this->dateP1 = $p1 ? new \DateTime('now', new \DateTimeZone('Africa/Lubumbashi')) : null;
  847.         return $this;
  848.     }
  849.     public function isP2(): ?bool
  850.     {
  851.         return $this->p2 ?? false;
  852.     }
  853.     public function setP2(bool $p2): self
  854.     {
  855.         $this->p2 = $p2;
  856.         $this->dateP2 = $p2 ? new \DateTime('now', new \DateTimeZone('Africa/Lubumbashi')) : null;
  857.         return $this;
  858.     }
  859.     public function isP3(): ?bool
  860.     {
  861.         return $this->p3 ?? false;
  862.     }
  863.     public function setP3(bool $p3): self
  864.     {
  865.         $this->p3 = $p3;
  866.         $this->dateP3 = $p3 ? new \DateTime('now', new \DateTimeZone('Africa/Lubumbashi')) : null;
  867.         return $this;
  868.     }
  869.     public function isP4(): ?bool
  870.     {
  871.         return $this->p4 ?? false;
  872.     }
  873.     public function setP4(bool $p4): self
  874.     {
  875.         $this->p4 = $p4;
  876.         $this->dateP4 = $p4 ? new \DateTime('now', new \DateTimeZone('Africa/Lubumbashi')) : null;
  877.         return $this;
  878.     }
  879.     public function isP5(): ?bool
  880.     {
  881.         return $this->p5 ?? false;
  882.     }
  883.     public function setP5(bool $p5): self
  884.     {
  885.         $this->p5 = $p5;
  886.         $this->dateP5 = $p5 ? new \DateTime('now', new \DateTimeZone('Africa/Lubumbashi')) : null;
  887.         return $this;
  888.     }
  889.     public function isP6(): ?bool
  890.     {
  891.         return $this->p6 ?? false;
  892.     }
  893.     public function setP6(bool $p6): self
  894.     {
  895.         $this->p6 = $p6;
  896.         $this->dateP6 = $p6 ? new \DateTime('now', new \DateTimeZone('Africa/Lubumbashi')) : null;
  897.         return $this;
  898.     }
  899.     public function getDateP1(): ?\DateTimeInterface
  900.     {
  901.         return $this->dateP1;
  902.     }
  903.     public function setDateP1(?\DateTimeInterface $dateP1): self
  904.     {
  905.         $this->dateP1 = $dateP1;
  906.         return $this;
  907.     }
  908.     public function getDateP2(): ?\DateTimeInterface
  909.     {
  910.         return $this->dateP2;
  911.     }
  912.     public function setDateP2(?\DateTimeInterface $dateP2): self
  913.     {
  914.         $this->dateP2 = $dateP2;
  915.         return $this;
  916.     }
  917.     public function getDateP3(): ?\DateTimeInterface
  918.     {
  919.         return $this->dateP3;
  920.     }
  921.     public function setDateP3(?\DateTimeInterface $dateP3): self
  922.     {
  923.         $this->dateP3 = $dateP3;
  924.         return $this;
  925.     }
  926.     public function getDateP4(): ?\DateTimeInterface
  927.     {
  928.         return $this->dateP4;
  929.     }
  930.     public function setDateP4(?\DateTimeInterface $dateP4): self
  931.     {
  932.         $this->dateP4 = $dateP4;
  933.         return $this;
  934.     }
  935.     public function getDateP5(): ?\DateTimeInterface
  936.     {
  937.         return $this->dateP5;
  938.     }
  939.     public function setDateP5(?\DateTimeInterface $dateP5): self
  940.     {
  941.         $this->dateP5 = $dateP5;
  942.         return $this;
  943.     }
  944.     public function getDateP6(): ?\DateTimeInterface
  945.     {
  946.         return $this->dateP6;
  947.     }
  948.     public function setDateP6(?\DateTimeInterface $dateP6): self
  949.     {
  950.         $this->dateP5 = $dateP6;
  951.         return $this;
  952.     }
  953.     public function getTotalCOLISNature()
  954.     {
  955.         $nature = '';
  956.         $Tab = $this->getTmpMarchandises();
  957.         for ($i = 0; $i < count($Tab); $i++) {
  958.             $nature .= $Tab[$i]->getLibelle();
  959.         }
  960.         return $nature;
  961.     }
  962. }