src/Entity/Commande.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AgentRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\CommandeRepository")
  9.  */
  10. class Commande
  11. {
  12.     /**
  13.      * @ORM\Id()
  14.      * @ORM\GeneratedValue()
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity="App\Entity\Agent", inversedBy="agent")
  20.      */
  21.     private $IdAg;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity="App\Entity\Agent", inversedBy="agent")
  24.      */
  25.     private $IdCl;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity="App\Entity\ProgrammeContenaire", inversedBy="$commandes")
  28.      */
  29.     private $IdCtPr;
  30.     /**
  31.      * @ORM\Column(type="date")
  32.      */
  33.     private $DateCommande;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity="App\Entity\Paiement", mappedBy="IdCmd", orphanRemoval=true,cascade={"persist"})
  36.      */
  37.     private $paiements;
  38.     
  39.     /**
  40.      * @ORM\Column(type="string", length=255, nullable=true)
  41.      */
  42.     private $AliasClient;
  43.     /**
  44.      * @ORM\Column(type="integer")
  45.      */
  46.     private $QtePrint;
  47.     /**
  48.      * @ORM\Column(type="string", length=255, nullable=true)
  49.      */
  50.     private $contact;
  51.     /**
  52.      * @ORM\Column(type="boolean", nullable=true)
  53.      */
  54.     private $facturehors;
  55.     /**
  56.      * @ORM\Column(type="boolean")
  57.      */
  58.     private $NouvelleFacture;
  59.     /**
  60.      * @ORM\Column(type="boolean", nullable=true)
  61.      */
  62.     private $factureMarchandiseAbscent;
  63.     /**
  64.      * @ORM\OneToMany(targetEntity="App\Entity\TmpMarchandise", mappedBy="commande",cascade={"persist"})
  65.      */
  66.     private $tmpMarchandises;
  67.     /**
  68.      * @ORM\OneToMany(targetEntity="App\Entity\TmpVolume", mappedBy="commande",cascade={"persist"})
  69.      */
  70.     private $tmpVolumes;
  71.     /**
  72.      * @ORM\OneToMany(targetEntity="App\Entity\AutreFrais", mappedBy="commande",cascade={"persist"})
  73.      */
  74.     private $autreFrais;
  75.     /**
  76.      * @ORM\OneToMany(targetEntity="App\Entity\Reduction", mappedBy="IdCmd", cascade={"persist"})
  77.      */
  78.     private $reduction;
  79.     /**
  80.      * @ORM\Column(type="boolean")
  81.      */
  82.     private $isPaid;
  83.     /**
  84.      * @ORM\Column(type="boolean")
  85.      */
  86.     private $modification;
  87.     /**
  88.      * @var
  89.      */
  90.     private $reductionTotal;
  91.     /**
  92.      * @var
  93.      */
  94.     private $paiementAvance;
  95.     /**
  96.      * @var
  97.      */
  98.     private $totalAPaiyer;
  99.     /**
  100.      * @var
  101.      */
  102.     private $balance;
  103.     /**
  104.      * @var
  105.      */
  106.     private $cbm;
  107.     /**
  108.      * @var
  109.      */
  110.     private $kg;
  111.     /**
  112.      * @var
  113.      */
  114.     private $tonne;
  115.     /**
  116.      * @var
  117.      */
  118.     private $AutresFr;
  119.     /**
  120.      * @var
  121.      */
  122.     private $fret;
  123.     /**
  124.      * @var
  125.      */
  126.     private $netDejaPaie;
  127.     /**
  128.      * @ORM\Column(type="string", length=8000, nullable=true)
  129.      */
  130.     private $remarque;
  131.     /**
  132.      * @ORM\OneToMany(targetEntity="App\Entity\Remarque", mappedBy="commande",cascade={"persist"})
  133.      */
  134.     private $remarques;
  135.     /**
  136.      * @ORM\Column(type="boolean")
  137.      */
  138.     private $flagflutterNotification;
  139.     /**
  140.      * @ORM\OneToMany(targetEntity=Depot::class, mappedBy="commande")
  141.      */
  142.     private $depots;
  143.     /**
  144.      * @ORM\Column(type="string", length=10, nullable=true)
  145.      */
  146.     private $pkg;
  147.     /**
  148.      * @ORM\Column(type="string", length=25, nullable=true)
  149.      */
  150.     private $ville;
  151.     public function __construct()
  152.     {
  153.         $this->DateCommande = new \DateTime();
  154.         $this->paiements = new ArrayCollection();
  155.         $this->QtePrint 0;
  156.         $this->modification 0;
  157.         $this->NouvelleFacture true;
  158.         $this->factureMarchandiseAbscent false;
  159.         $this->facturehors false;
  160.         $this->tmpMarchandises = new ArrayCollection();
  161.         $this->tmpVolumes = new ArrayCollection();
  162.         $this->autreFrais = new ArrayCollection();
  163.         $this->reduction = new ArrayCollection();
  164.         $this->remarques = new ArrayCollection();
  165.         $this->depots = new ArrayCollection();
  166.     }
  167.     public function getId(): ?int
  168.     {
  169.         return $this->id;
  170.     }
  171.     public function getIdCtPr(): ?ProgrammeContenaire
  172.     {
  173.         return $this->IdCtPr;
  174.     }
  175.     public function setIdCtPr(?ProgrammeContenaire $IdCtPr): self
  176.     {
  177.         $this->IdCtPr $IdCtPr;
  178.         return $this;
  179.     }
  180.     public function getIdCl(): ?Agent
  181.     {
  182.         return $this->IdCl;
  183.     }
  184.     public function setIdCl(?Agent $IdCl): self
  185.     {
  186.         $this->IdCl $IdCl;
  187.         return $this;
  188.     }
  189.     public function getIdAg(): ?Agent
  190.     {
  191.         return $this->IdCl;
  192.     }
  193.     public function setIdAg(?Agent $IdAg): self
  194.     {
  195.         $this->IdAg $IdAg;
  196.         return $this;
  197.     }
  198.     public function getDateCommande(): ?\DateTimeInterface
  199.     {
  200.         return $this->DateCommande;
  201.     }
  202.     public function setDateCommande(\DateTimeInterface $DateCommande): self
  203.     {
  204.         $this->DateCommande $DateCommande;
  205.         return $this;
  206.     }
  207.     /**
  208.      * @return Collection|Paiement[]
  209.      */
  210.     public function getPaiements(): Collection
  211.     {
  212.         return $this->paiements;
  213.     }
  214.     public function addPaiement(Paiement $paiement): self
  215.     {
  216.         if (!$this->paiements->contains($paiement)) {
  217.             $this->paiements[] = $paiement;
  218.             $paiement->setIdCmd($this);
  219.         }
  220.         return $this;
  221.     }
  222.     public function removePaiement(Paiement $paiement): self
  223.     {
  224.         if ($this->paiements->contains($paiement)) {
  225.             $this->paiements->removeElement($paiement);
  226.             // set the owning side to null (unless already changed)
  227.             if ($paiement->getIdCmd() === $this) {
  228.                 $paiement->setIdCmd(null);
  229.             }
  230.         }
  231.         return $this;
  232.     }
  233.     public function __toString(){
  234.         // to show the name of the Category in the select
  235.         return (string) $this->id;
  236.         // to show the id of the Category in the select
  237.         // return $this->id;
  238.     }
  239.     public function getAliasClient(): ?string
  240.     {
  241.         return $this->AliasClient;
  242.     }
  243.     public function setAliasClient(?string $AliasClient): self
  244.     {
  245.         $this->AliasClient $AliasClient;
  246.         return $this;
  247.     }
  248.     public function getQtePrint(): ?int
  249.     {
  250.         return $this->QtePrint;
  251.     }
  252.     public function setQtePrint(int $QtePrint): self
  253.     {
  254.         $this->QtePrint $QtePrint;
  255.         return $this;
  256.     }
  257.     public function getContact(): ?string
  258.     {
  259.         return $this->contact;
  260.     }
  261.     public function setContact(?string $contact): self
  262.     {
  263.         $this->contact $contact;
  264.         return $this;
  265.     }
  266.     public function getFacturehors(): ?bool
  267.     {
  268.         return $this->facturehors;
  269.     }
  270.     public function setFacturehors(?bool $facturehors): self
  271.     {
  272.         $this->facturehors $facturehors;
  273.         return $this;
  274.     }
  275.     public function getNouvelleFacture(): ?bool
  276.     {
  277.         return $this->NouvelleFacture;
  278.     }
  279.     public function setNouvelleFacture(bool $NouvelleFacture): self
  280.     {
  281.         $this->NouvelleFacture $NouvelleFacture;
  282.         return $this;
  283.     }
  284.     public function getFactureMarchandiseAbscent(): ?bool
  285.     {
  286.         return $this->factureMarchandiseAbscent;
  287.     }
  288.     public function setFactureMarchandiseAbscent(?bool $factureMarchandiseAbscent): self
  289.     {
  290.         $this->factureMarchandiseAbscent $factureMarchandiseAbscent;
  291.         return $this;
  292.     }
  293.     /**
  294.      * @return Collection|TmpMarchandise[]
  295.      */
  296.     public function getTmpMarchandises(): Collection
  297.     {
  298.         return $this->tmpMarchandises;
  299.     }
  300.     public function addTmpMarchandise(TmpMarchandise $tmpMarchandise): self
  301.     {
  302.         if (!$this->tmpMarchandises->contains($tmpMarchandise)) {
  303.             $this->tmpMarchandises[] = $tmpMarchandise;
  304.             $tmpMarchandise->setCommande($this);
  305.         }
  306.         return $this;
  307.     }
  308.     public function removeTmpMarchandise(TmpMarchandise $tmpMarchandise): self
  309.     {
  310.         if ($this->tmpMarchandises->contains($tmpMarchandise)) {
  311.             $this->tmpMarchandises->removeElement($tmpMarchandise);
  312.             // set the owning side to null (unless already changed)
  313.             if ($tmpMarchandise->getCommande() === $this) {
  314.                 $tmpMarchandise->setCommande(null);
  315.             }
  316.         }
  317.         return $this;
  318.     }
  319.     /**
  320.      * @return Collection|TmpVolume[]
  321.      */
  322.     public function getTmpVolumes(): Collection
  323.     {
  324.         return $this->tmpVolumes;
  325.     }
  326.     public function addTmpVolume(TmpVolume $tmpVolume): self
  327.     {
  328.         if (!$this->tmpVolumes->contains($tmpVolume)) {
  329.             $this->tmpVolumes[] = $tmpVolume;
  330.             $tmpVolume->setCommande($this);
  331.         }
  332.         return $this;
  333.     }
  334.     public function removeTmpVolume(TmpVolume $tmpVolume): self
  335.     {
  336.         if ($this->tmpVolumes->contains($tmpVolume)) {
  337.             $this->tmpVolumes->removeElement($tmpVolume);
  338.             // set the owning side to null (unless already changed)
  339.             if ($tmpVolume->getCommande() === $this) {
  340.                 $tmpVolume->setCommande(null);
  341.             }
  342.         }
  343.         return $this;
  344.     }
  345.     /**
  346.      * @return Collection|AutreFrais[]
  347.      */
  348.     public function getAutreFrais(): Collection
  349.     {
  350.         return $this->autreFrais;
  351.     }
  352.     public function addAutreFrai(AutreFrais $autreFrai): self
  353.     {
  354.         if (!$this->autreFrais->contains($autreFrai)) {
  355.             $this->autreFrais[] = $autreFrai;
  356.             $autreFrai->setCommande($this);
  357.         }
  358.         return $this;
  359.     }
  360.     public function removeAutreFrai(AutreFrais $autreFrai): self
  361.     {
  362.         if ($this->autreFrais->contains($autreFrai)) {
  363.             $this->autreFrais->removeElement($autreFrai);
  364.             // set the owning side to null (unless already changed)
  365.             if ($autreFrai->getCommande() === $this) {
  366.                 $autreFrai->setCommande(null);
  367.             }
  368.         }
  369.         return $this;
  370.     }
  371.     public function getModification(): ?bool
  372.     {
  373.         return $this->modification;
  374.     }
  375.     public function setModification(bool $modification): self
  376.     {
  377.         $this->modification $modification;
  378.         return $this;
  379.     }
  380.     public function getNomAgent(Commande $commande): string
  381.     {
  382.         return $this;
  383.     }
  384.     public function getTotalAPaiyerVolume(){
  385.         $somme1 0;
  386.         $Tab $this->getTmpVolumes();
  387.         for($i 0$i count($Tab); $i++){
  388.             $somme $Tab[$i]->getVolume() * $Tab[$i]->getPrixUnit();
  389.             $somme1 round($somme) + $somme1;
  390.         }
  391.         return round($somme1);
  392.     }
  393.     public function getTotalAPaiyerAutraiFrais(){
  394.         $somme 0;
  395.         $Tab $this->getAutreFrais();
  396.         for($i 0$i count($Tab); $i++){
  397.             $somme += $Tab[$i]->getMontant();
  398.         }
  399.         return $somme;
  400.     }
  401.     /**
  402.      * Renvoie le total des Paiements pour une facture
  403.      *
  404.      * @return float
  405.      */
  406.     public function getTotalPaiement(){
  407.         $somme 0;
  408.         $Tab $this->getPaiements();
  409.         for($i 0$i count($Tab); $i++){
  410.             $somme += $Tab[$i]->getMontant();
  411.         }
  412.         return $somme;
  413.     }
  414.     /**
  415.      * Renvoie le total des Paiements Cash pour une facture
  416.      *
  417.      * @return float
  418.      */
  419.     public function getTotalPaiementPaiement(){
  420.         $somme 0;
  421.         $Tab $this->getPaiements();
  422.         for($i 0$i count($Tab); $i++){
  423.             if($Tab[$i]->getFlagEnAvance() === '0')
  424.             $somme += $Tab[$i]->getMontant();
  425.         }
  426.         return $somme;
  427.     }
  428.     /**
  429.      * Renvoie le total des Paiements avance pour une facture
  430.      *
  431.      * @return float
  432.      */
  433.     public function getTotalPaiementAvance(){
  434.         $somme 0;
  435.         $Tab $this->getPaiements();
  436.         for($i 0$i count($Tab); $i++){
  437.             if($Tab[$i]->getFlagEnAvance() === true)
  438.             $somme += $Tab[$i]->getMontant();
  439.         }
  440.         return $somme;
  441.     }
  442.     /**
  443.      * Renvoie le total des reductions pour une facture
  444.      *
  445.      * @return float
  446.      */
  447.     public function getTotalReduction(){
  448.         $somme 0;
  449.         $Tab $this->getReduction();
  450.         for($i 0$i count($Tab); $i++){
  451.             $somme += $Tab[$i]->getMontant();
  452.         }
  453.         return $this->reductionTotal =  $somme;
  454.     }
  455.     /**
  456.      * Renvoie le total des reductions pour une facture
  457.      *
  458.      * @return float
  459.      */
  460.     public function getTotalReductionReduction(){
  461.         $somme 0;
  462.         $Tab $this->getReduction();
  463.         for($i 0$i count($Tab); $i++){
  464.             if($Tab[$i]->getFlagCompassation() === '0'){
  465.                 $somme += $Tab[$i]->getMontant();
  466.             }
  467.         }
  468.         return $somme;
  469.     }
  470.     /**
  471.      * Renvoie le total paie par compassation pour une facture
  472.      *
  473.      * @return float
  474.      */
  475.     public function getTotalCompassation(){
  476.         $somme 0;
  477.         $Tab $this->getReduction();
  478.         for($i 0$i count($Tab); $i++){
  479.             if($Tab[$i]->getFlagCompassation() === '1'){
  480.                 $somme += $Tab[$i]->getMontant();
  481.             }
  482.         }
  483.         return $somme;
  484.     }
  485.     /**
  486.      * Renvoie le total paie a la banque pour une facture
  487.      *
  488.      * @return float
  489.      */
  490.     public function getTotalBanque(){
  491.         $somme 0;
  492.         $Tab $this->getReduction();
  493.         for($i 0$i count($Tab); $i++){
  494.             if($Tab[$i]->getFlagCompassation() === '2'){
  495.                 $somme += $Tab[$i]->getMontant();
  496.             }
  497.         }
  498.         return $somme;
  499.     }
  500.     /**
  501.      * Renvoie le total volime
  502.      *
  503.      * @return float
  504.      */
  505.     public function getTotalCBM(){
  506.         $somme 0;
  507.         $Tab $this->getTmpVolumes();
  508.         for($i 0$i count($Tab); $i++){
  509.             if($Tab[$i]->getUnite() === 'CBM'){
  510.                 $somme += $Tab[$i]->getVolume();
  511.             }
  512.         }
  513.         return $somme;
  514.     }
  515.     /**
  516.      * Renvoie le total volime
  517.      *
  518.      * @return float
  519.      */
  520.     public function getTotalKG(){
  521.         $somme 0;
  522.         $Tab $this->getTmpVolumes();
  523.         for($i 0$i count($Tab); $i++){
  524.             if($Tab[$i]->getUnite() === 'KG'){
  525.                 $somme += $Tab[$i]->getVolume();
  526.             }
  527.         }
  528.         return $somme;
  529.     }
  530.     /**
  531.      * Renvoie le total colis
  532.      *
  533.      * @return float
  534.      */
  535.     public function getTotalCOLIS(){
  536.         $somme 0;
  537.         $Tab $this->getTmpMarchandises();
  538.         for($i 0$i count($Tab); $i++){
  539.             $somme += $Tab[$i]->getQte();
  540.         }
  541.         return $somme;
  542.     }
  543.     /**
  544.      * Renvoie le total colis
  545.      *
  546.      * @return float
  547.      */
  548.     public function getTotalSortieDepot(){
  549.         $somme 0;
  550.         $Tab $this->getDepots();
  551.         for($i 0$i count($Tab); $i++){
  552.             $somme += $Tab[$i]->getQuantite();
  553.         }
  554.         return $somme;
  555.     }
  556.     /**
  557.      * Renvoie le total tonnage
  558.      *
  559.      * @return float
  560.      */
  561.     public function getTotalTONNE(){
  562.         $somme 0;
  563.         $Tab $this->getTmpVolumes();
  564.         for($i 0$i count($Tab); $i++){
  565.             if($Tab[$i]->getUnite() === 'TONNE'){
  566.                 $somme += $Tab[$i]->getVolume();
  567.             }
  568.         }
  569.         return $somme;
  570.     }
  571.     /**
  572.      * Renvoie le total autreFrais
  573.      *
  574.      * @return float
  575.      */
  576.     public function getTotalAF(){
  577.         $somme 0;
  578.         $Tab $this->getAutreFrais();
  579.         for($i 0$i count($Tab); $i++){
  580.             $somme += $Tab[$i]->getMontant();
  581.         }
  582.         return $somme;
  583.     }
  584.     /**
  585.      * Renvoie le total net a payer pour une facture
  586.      *
  587.      * @return float
  588.      */
  589.     public function getTotalAPaiyer(){
  590.         return  $this->totalAPaiyer $this->getTotalAPaiyerVolume() + $this->getTotalAPaiyerAutraiFrais();
  591.     }
  592.     /**
  593.      * Renvoie la balance net d'une facture
  594.      *
  595.      * @return float
  596.      */
  597.     public function getBalance(){
  598.         $this->balance $this->getTotalAPaiyer() - $this->getTotalReduction() - $this->getTotalPaiement();
  599.         return $this->balance;
  600.     }
  601.     /**
  602.      * Renvoie la balance net d'une facture
  603.      *
  604.      * @return float
  605.      */
  606.     public function getNetDejaPaie(){
  607.         $this->netDejaPaie $this->getTotalReduction() + $this->getTotalPaiement();
  608.         return $this->netDejaPaie;
  609.     }
  610.     /**
  611.      * @return Collection|Reduction[]
  612.      */
  613.     public function getReduction(): Collection
  614.     {
  615.         return $this->reduction;
  616.     }
  617.     public function addReduction(Reduction $reduction): self
  618.     {
  619.         if (!$this->reduction->contains($reduction)) {
  620.             $this->reduction[] = $reduction;
  621.             $reduction->setIdCmd($this);
  622.         }
  623.         return $this;
  624.     }
  625.     public function removeReduction(Reduction $reduction): self
  626.     {
  627.         if ($this->reduction->contains($reduction)) {
  628.             $this->reduction->removeElement($reduction);
  629.             // set the owning side to null (unless already changed)
  630.             if ($reduction->getIdCmd() === $this) {
  631.                 $reduction->setIdCmd(null);
  632.             }
  633.         }
  634.         return $this;
  635.     }
  636.     public function getRemarque(): ?string
  637.     {
  638.         return $this->remarque;
  639.     }
  640.     public function setRemarque(?string $remarque): self
  641.     {
  642.         $this->remarque $remarque;
  643.         return $this;
  644.     }
  645.     /**
  646.      * @return mixed
  647.      */
  648.     public function getPaiementAvance()
  649.     {
  650.         return $this->paiementAvance $this->getTotalPaiementAvance();
  651.     }
  652.     /**
  653.      * @return mixed
  654.      */
  655.     public function getReductionTotal()
  656.     {
  657.         return $this->reductionTotal $this->getTotalReductionReduction();
  658.     }
  659.     /**
  660.      * @return Collection|Remarque[]
  661.      */
  662.     public function getRemarques(): Collection
  663.     {
  664.         return $this->remarques;
  665.     }
  666.     public function addRemarque(Remarque $remarque): self
  667.     {
  668.         if (!$this->remarques->contains($remarque)) {
  669.             $this->remarques[] = $remarque;
  670.             $remarque->setCommande($this);
  671.         }
  672.         return $this;
  673.     }
  674.     public function removeRemarque(Remarque $remarque): self
  675.     {
  676.         if ($this->remarques->contains($remarque)) {
  677.             $this->remarques->removeElement($remarque);
  678.             // set the owning side to null (unless already changed)
  679.             if ($remarque->getCommande() === $this) {
  680.                 $remarque->setCommande(null);
  681.             }
  682.         }
  683.         return $this;
  684.     }
  685.     public function getCbm()
  686.     {
  687.         return $this->cbm $this->getTotalCBM()/1;
  688.     }
  689.     public function getKg()
  690.     {
  691.         return $this->kg $this->getTotalKG()/1;
  692.     }
  693.     /**
  694.      * @return mixed
  695.      */
  696.     public function getTonne()
  697.     {
  698.         return $this->tonne $this->getTotalTONNE()/1;
  699.     }
  700.     /**
  701.      * @return mixed
  702.      */
  703.     public function getAutresFr()
  704.     {
  705.         return $this->AutresFr $this->getTotalAF();
  706.     }
  707.     /**
  708.      * @return mixed
  709.      */
  710.     public function getFret()
  711.     {
  712.         return $this->fret $this->getTotalAPaiyerVolume();
  713.     }
  714.     public function getFlagflutterNotification(): ?bool
  715.     {
  716.         return $this->flagflutterNotification;
  717.     }
  718.     public function setFlagflutterNotification(bool $flagflutterNotification): self
  719.     {
  720.         $this->flagflutterNotification $flagflutterNotification;
  721.         return $this;
  722.     }
  723.     /**
  724.      * @return Collection<int, Depot>
  725.      */
  726.     public function getDepots(): Collection
  727.     {
  728.         return $this->depots;
  729.     }
  730.     public function addDepot(Depot $depot): self
  731.     {
  732.         if (!$this->depots->contains($depot)) {
  733.             $this->depots[] = $depot;
  734.             $depot->setCommande($this);
  735.         }
  736.         return $this;
  737.     }
  738.     public function removeDepot(Depot $depot): self
  739.     {
  740.         if ($this->depots->removeElement($depot)) {
  741.             // set the owning side to null (unless already changed)
  742.             if ($depot->getCommande() === $this) {
  743.                 $depot->setCommande(null);
  744.             }
  745.         }
  746.         return $this;
  747.     }
  748.     public function isIsPaid(): ?bool
  749.     {
  750.         return $this->isPaid;
  751.     }
  752.     public function setIsPaid(bool $isPaid): self
  753.     {
  754.         $this->isPaid $isPaid;
  755.         return $this;
  756.     }
  757.     public function getPkg(): ?string
  758.     {
  759.         return $this->pkg;
  760.     }
  761.     public function setPkg(?string $pkg): self
  762.     {
  763.         $this->pkg $pkg;
  764.         return $this;
  765.     }
  766.     public function getVille(): ?string
  767.     {
  768.         return $this->ville;
  769.     }
  770.     public function setVille(?string $ville): self
  771.     {
  772.         $this->ville $ville;
  773.         return $this;
  774.     }
  775. }