src/Entity/ProgrammeContenaire.php line 14

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. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\ProgrammeContenaireRepository")
  9.  */
  10. class ProgrammeContenaire
  11. {
  12.     /**
  13.      * @ORM\Id()
  14.      * @ORM\GeneratedValue()
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity="App\Entity\Contenaire", inversedBy="programmeContenaires")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $IdCt;
  23.     /**
  24.      * @ORM\Column(type="date")
  25.      */
  26.     private $DateChargement;
  27.     /**
  28.      * @ORM\Column(type="date")
  29.      */
  30.     private $DateDepart;
  31.     /**
  32.      * @ORM\Column(type="date")
  33.      */
  34.     private $DateArriver;
  35.     /**
  36.      * @ORM\Column(type="date")
  37.      */
  38.     private $DateOperation;
  39.     /**
  40.      * @ORM\Column(type="string", length=255, nullable=true)
  41.      */
  42.     private $NomBateau;
  43.     /**
  44.      * @ORM\Column(type="integer")
  45.      */
  46.     private $IdAg;
  47.     /**
  48.      * @ORM\Column(type="boolean")
  49.      */
  50.     private $Flag;
  51.     /**
  52.      * @ORM\Column(type="string", length=255)
  53.      */
  54.     private $NumeroContenaire;
  55.     /**
  56.      * @ORM\OneToMany(targetEntity="App\Entity\SuiviContenaire", mappedBy="idCtPr", orphanRemoval=true, cascade={"persist", "remove"})
  57.      */
  58.     private $suiviContenaires;
  59.     /**
  60.      * @ORM\Column(type="string", length=255, nullable=true)
  61.      */
  62.     private $transporteur;
  63.     /**
  64.      * @ORM\ManyToOne(targetEntity=Ville::class, inversedBy="programmeContenaires")
  65.      * @ORM\JoinColumn(nullable=false)
  66.      */
  67.     private $IdVille;
  68.     /**
  69.      * @ORM\OneToMany(targetEntity="App\Entity\DepensesContenaire", mappedBy="idCmd", orphanRemoval=true)
  70.      */
  71.     private $depensesContenaires;
  72.     /**
  73.      * @ORM\Column(type="string", length=2)
  74.      */
  75.     private $CompletFlag;
  76.     /**
  77.      * @ORM\OneToMany(targetEntity="App\Entity\Declarant", mappedBy="idPrCt")
  78.      */
  79.     private $declarants;
  80.     /**
  81.      * @ORM\Column(type="string", length=255, nullable=true)
  82.      */
  83.     private $ProprietaireConteneur;
  84.     /**
  85.      * @ORM\Column(type="string", length=255, nullable=true)
  86.      */
  87.     private $destination;
  88.     /**
  89.      * @ORM\OneToMany(targetEntity="App\Entity\Commande", mappedBy="IdCtPr")
  90.      */
  91.     private $commandes;
  92.     /**
  93.      * @ORM\Column(type="boolean")
  94.      */
  95.     private $validation;
  96.     /**
  97.      * @ORM\Column(type="integer")
  98.      * @Assert\Type(type="integer", message="le champs entier")
  99.      */
  100.     private $DepensesPrevue;
  101.     private $facturePayer;
  102.     private $factureAccompte;
  103.     private $factureNonPayer;
  104.     private $facturePayerCompassation;
  105.     private $factureHors;
  106.     private $factureNull;
  107.     private $factureModifier;
  108.     private $MontantFacturePayerBanque;
  109.     private $MontantFacturePayerCash;
  110.     private $MontantFacturePayerAvance;
  111.     private $MontantFacturePayerReduction;
  112.     private $MontantFacturePayerCompassation;
  113.     private $MontantTotalAPayer;
  114.     private $TotalAPaiyerVolume;
  115.     private $MontantTotalAutreFraisPayer;
  116.     private $MontantTotalFacturePayer;
  117.     private $MontantTotalBalanceFacture;
  118.     private $MontantTotalFactureNulle;
  119.     private $MontantTotalDepensesReel;
  120.     private $TotalCBM;
  121.     private $TotalTONNE;
  122.     private $TotalCOLIS;
  123.     private $lieu;
  124.     private $declarant;
  125.     /**
  126.      * @ORM\OneToMany(targetEntity="App\Entity\RemarqueConteneur", mappedBy="programmeConteneur")
  127.      */
  128.     private $remarqueConteneurs;
  129.     private $lieuDate;
  130.     /**
  131.      * @ORM\Column(type="string", length=1000, nullable=true)
  132.      */
  133.     private $remarqueConteneur;
  134.     /**
  135.      * @ORM\Column(type="boolean")
  136.      */
  137.     private $isMco;
  138.     /**
  139.      * @ORM\Column(type="boolean", nullable=true)
  140.      */
  141.     private $isRapport;
  142.     /**
  143.      * @ORM\Column(type="datetime", nullable=true)
  144.      */
  145.     private $dateRapportAt;
  146.     /**
  147.      * @ORM\Column(type="boolean")
  148.      */
  149.     private $isClients;
  150.     /**
  151.      * @ORM\ManyToOne(targetEntity=Ville::class, inversedBy="programmeContenaires")
  152.      */
  153.     private $villeInitiale;
  154.     /**
  155.      * @ORM\OneToMany(targetEntity=Notification::class, mappedBy="prct")
  156.      */
  157.     private $notifications;
  158.     /**
  159.      * @ORM\OneToMany(targetEntity=TmpConteneurReception::class, mappedBy="programme", orphanRemoval=true)
  160.      */
  161.     private $tmpConteneurReceptions;
  162.     /**
  163.      * @ORM\Column(type="string", length=10)
  164.      */
  165.     private $rapport;
  166.     /**
  167.      * @ORM\Column(type="boolean")
  168.      */
  169.     private $isElectronique;
  170.     /**
  171.      * @ORM\Column(type="datetime_immutable", nullable=true)
  172.      */
  173.     private $dateValidation;
  174.     /**
  175.      * @ORM\Column(type="boolean")
  176.      */
  177.     private $isNotifier;
  178.     /**
  179.      * @ORM\Column(type="string", length=1, nullable=true)
  180.      */
  181.     private $fin;
  182.     /**
  183.      * @ORM\Column(type="datetime_immutable", nullable=true)
  184.      */
  185.     private $dateValidationFin;
  186.     /**
  187.      * @ORM\Column(type="datetime_immutable", nullable=true)
  188.      */
  189.     private $dateattribution;
  190.     /**
  191.      * CHANGÉ DE OneToOne À ManyToOne POUR LA GESTION MULTI-PROGRAMMES
  192.      * @ORM\ManyToOne(targetEntity=Agent::class, inversedBy="programmeContenaireGestionnaire")
  193.      */
  194.     private $agentGestionnaire;
  195.     /**
  196.      * @ORM\Column(type="boolean", nullable=true)
  197.      */
  198.     private $payeGestionnaire;
  199.     public function __construct()
  200.     {
  201.         $this->DateOperation = new \DateTime();
  202.         $this->Flag = false;
  203.         $this->isClients = false;
  204.         $this->validation = false;
  205.         $this->isNotifier = false;
  206.         $this->isElectronique = false;
  207.         $this->isMco = false;
  208.         $this->suiviContenaires = new ArrayCollection();
  209.         $this->depensesContenaires = new ArrayCollection();
  210.         $this->CompletFlag = '0';
  211.         $this->declarants = new ArrayCollection();
  212.         $this->remarqueConteneurs = new ArrayCollection();
  213.         $this->notifications = new ArrayCollection();
  214.         $this->tmpConteneurReceptions = new ArrayCollection();
  215.         $this->commandes = new ArrayCollection();
  216.         $this->payeGestionnaire = false;
  217.     }
  218.     public function getId(): ?int { return $this->id; }
  219.     public function getIdCt(): ?Contenaire { return $this->IdCt; }
  220.     public function setIdCt(?Contenaire $IdCt): self { $this->IdCt = $IdCt; return $this; }
  221.     public function getDateChargement(): ?\DateTimeInterface { return $this->DateChargement; }
  222.     public function getFin(): ?string { return $this->fin; }
  223.     public function setFin(?string $fin): self { $this->fin = $fin; return $this; }
  224.     public function setDateChargement(\DateTimeInterface $DateChargement): self { $this->DateChargement = $DateChargement; return $this; }
  225.     public function getDateDepart(): ?\DateTimeInterface { return $this->DateDepart; }
  226.     public function setDateDepart(\DateTimeInterface $DateDepart): self { $this->DateDepart = $DateDepart; return $this; }
  227.     public function getDateArriver(): ?\DateTimeInterface { return $this->DateArriver; }
  228.     public function setDateArriver(\DateTimeInterface $DateArriver): self { $this->DateArriver = $DateArriver; return $this; }
  229.     public function getDateOperation(): ?\DateTimeInterface { return $this->DateOperation; }
  230.     public function setDateOperation(\DateTimeInterface $DateOperation): self { $this->DateOperation = $DateOperation; return $this; }
  231.     public function getNomBateau(): ?string { return $this->NomBateau; }
  232.     public function setNomBateau(?string $NomBateau): self { $this->NomBateau = $NomBateau; return $this; }
  233.     public function getIdAg(): ?int { return $this->IdAg; }
  234.     public function setIdAg(int $IdAg): self { $this->IdAg = $IdAg; return $this; }
  235.     public function getFlag(): ?bool { return $this->Flag; }
  236.     public function setFlag(bool $Flag): self { $this->Flag = $Flag; return $this; }
  237.     public function getNumeroContenaire(): ?string { return $this->NumeroContenaire; }
  238.     public function setNumeroContenaire(string $NumeroContenaire): self { $this->NumeroContenaire = $NumeroContenaire; return $this; }
  239.     /** @return Collection|SuiviContenaire[] */
  240.     public function getSuiviContenaires(): Collection { return $this->suiviContenaires; }
  241.     public function addSuiviContenaire(SuiviContenaire $suiviContenaire): self
  242.     {
  243.         if (!$this->suiviContenaires->contains($suiviContenaire)) {
  244.             $this->suiviContenaires[] = $suiviContenaire;
  245.             $suiviContenaire->setIdCtPr($this);
  246.         }
  247.         return $this;
  248.     }
  249.     public function removeSuiviContenaire(SuiviContenaire $suiviContenaire): self
  250.     {
  251.         if ($this->suiviContenaires->contains($suiviContenaire)) {
  252.             $this->suiviContenaires->removeElement($suiviContenaire);
  253.             if ($suiviContenaire->getIdCtPr() === $this) { $suiviContenaire->setIdCtPr(null); }
  254.         }
  255.         return $this;
  256.     }
  257.     public function __toString(){
  258.         return $this->IdCt ? (string) $this->IdCt->getNomContenaire() : 'Conteneur non défini';
  259.     }
  260.     public function getTransporteur(): ?string { return $this->transporteur; }
  261.     public function setTransporteur(?string $transporteur): self { $this->transporteur = $transporteur; return $this; }
  262.     public function getIdVille(): ?Ville { return $this->IdVille; }
  263.     public function setIdVille(?Ville $IdVille): self { $this->IdVille = $IdVille; return $this; }
  264.     /** @return Collection|DepensesContenaire[] */
  265.     public function getDepensesContenaires(): Collection { return $this->depensesContenaires; }
  266.     public function addDepensesContenaire(DepensesContenaire $depensesContenaire): self
  267.     {
  268.         if (!$this->depensesContenaires->contains($depensesContenaire)) {
  269.             $this->depensesContenaires[] = $depensesContenaire;
  270.             $depensesContenaire->setIdCmd($this);
  271.         }
  272.         return $this;
  273.     }
  274.     public function removeDepensesContenaire(DepensesContenaire $depensesContenaire): self
  275.     {
  276.         if ($this->depensesContenaires->contains($depensesContenaire)) {
  277.             $this->depensesContenaires->removeElement($depensesContenaire);
  278.             if ($depensesContenaire->getIdCmd() === $this) { $depensesContenaire->setIdCmd(null); }
  279.         }
  280.         return $this;
  281.     }
  282.     public function getCompletFlag(): ?string { return $this->CompletFlag; }
  283.     public function setCompletFlag(string $CompletFlag): self { $this->CompletFlag = $CompletFlag; return $this; }
  284.     /** @return Collection|Declarant[] */
  285.     public function getDeclarants(): Collection { return $this->declarants; }
  286.     public function addDeclarant(Declarant $declarant): self
  287.     {
  288.         if (!$this->declarants->contains($declarant)) {
  289.             $this->declarants[] = $declarant;
  290.             $declarant->setIdPrCt($this);
  291.         }
  292.         return $this;
  293.     }
  294.     public function removeDeclarant(Declarant $declarant): self
  295.     {
  296.         if ($this->declarants->contains($declarant)) {
  297.             $this->declarants->removeElement($declarant);
  298.             if ($declarant->getIdPrCt() === $this) { $declarant->setIdPrCt(null); }
  299.         }
  300.         return $this;
  301.     }
  302.     public function getProprietaireConteneur(): ?string { return $this->ProprietaireConteneur; }
  303.     public function setProprietaireConteneur(?string $ProprietaireConteneur): self { $this->ProprietaireConteneur = $ProprietaireConteneur; return $this; }
  304.     public function getDestination(): ?string { return $this->destination; }
  305.     public function setDestination(?string $destination): self { $this->destination = $destination; return $this; }
  306.     /** @return Collection|Commande[] */
  307.     public function getCommandes(): Collection { return $this->commandes; }
  308.     public function addCommande(Commande $commandes): self
  309.     {
  310.         if (!$this->commandes->contains($commandes)) {
  311.             $this->commandes[] = $commandes;
  312.             $commandes->setIdCtPr($this);
  313.         }
  314.         return $this;
  315.     }
  316.     public function removeCommande(Commande $commandes): self
  317.     {
  318.         if ($this->commandes->contains($commandes)) {
  319.             $this->commandes->removeElement($commandes);
  320.             if ($commandes->getIdCtPr() === $this) { $commandes->setIdCtPr(null); }
  321.         }
  322.         return $this;
  323.     }
  324.     public function getValidation(): ?bool { return $this->validation; }
  325.     public function setValidation(bool $validation): self { $this->validation = $validation; return $this; }
  326.     public function getDepensesPrevue(): ?int { return $this->DepensesPrevue; }
  327.     public function setDepensesPrevue(int $DepensesPrevue): self { $this->DepensesPrevue = $DepensesPrevue; return $this; }
  328.     /** --- MÉTHODES MÉTIER DE CALCUL --- **/
  329.     public function getFacturePayer()
  330.     {
  331.         $total = 0;
  332.         foreach($this->getCommandes() as $v){ if($v->getBalance() < 1){ $total++; } }
  333.         return $this->facturePayer = $total;
  334.     }
  335.     public function getFactureAccompte()
  336.     {
  337.         $total = 0;
  338.         foreach($this->getCommandes() as $v){ if($v->getBalance() < $v->getTotalAPaiyer() && $v->getBalance() > 0){ $total++; } }
  339.         return $this->factureAccompte = $total;
  340.     }
  341.     public function getFactureNonPayer()
  342.     {
  343.         $total = 0;
  344.         foreach($this->getCommandes() as $v){ if($v->getNetDejaPaie() < 1 && $v->getTotalAPaiyer() > 0){ $total++; } }
  345.         return $this->factureNonPayer = $total;
  346.     }
  347.     public function getFacturePayerCompassation()
  348.     {
  349.         $total = 0;
  350.         foreach($this->getCommandes() as $v){
  351.             foreach($v->getReduction() as $k){ if($k->getFlagCompassation() == 1){ $total++; break; } }
  352.         }
  353.         return $this->facturePayerCompassation = $total;
  354.     }
  355.     public function getFactureHors()
  356.     {
  357.         $total = 0;
  358.         foreach($this->getCommandes() as $v){ if($v->getFacturehors() == true){ $total++; } }
  359.         return $this->factureHors = $total;
  360.     }
  361.     public function getFactureNull()
  362.     {
  363.         $total = 0;
  364.         foreach($this->getCommandes() as $v){ if($v->getFactureMarchandiseAbscent() == true){ $total++; } }
  365.         return $this->factureNull = $total;
  366.     }
  367.     public function getFactureModifier()
  368.     {
  369.         $total = 0;
  370.         foreach($this->getCommandes() as $v){ if($v->getModification() == true){ $total++; } }
  371.         return $this->factureModifier = $total;
  372.     }
  373.     public function getMontantFacturePayerBanque()
  374.     {
  375.         $total = 0;
  376.         foreach($this->getCommandes() as $v){
  377.             foreach($v->getReduction() as $k){ if($k->getFlagCompassation() == 2){ $total += $k->getMontant(); break; } }
  378.         }
  379.         return $this->MontantFacturePayerBanque = $total;
  380.     }
  381.     public function getMontantFacturePayerCash()
  382.     {
  383.         $total = 0;
  384.         foreach($this->getCommandes() as $v){
  385.             foreach($v->getPaiements() as $k){ if($k->getFlagEnAvance() == false){ $total += $k->getMontant(); } }
  386.         }
  387.         return $this->MontantFacturePayerCash = $total;
  388.     }
  389.     public function getMontantFacturePayerAvance()
  390.     {
  391.         $total = 0;
  392.         foreach($this->getCommandes() as $v){
  393.             foreach($v->getPaiements() as $k){ if($k->getFlagEnAvance() == true){ $total += $k->getMontant(); break; } }
  394.         }
  395.         return $this->MontantFacturePayerAvance = $total;
  396.     }
  397.     public function getMontantFacturePayerReduction()
  398.     {
  399.         $total = 0;
  400.         foreach($this->getCommandes() as $v){
  401.             foreach($v->getReduction() as $k){ if($k->getFlagCompassation() == 0){ $total += $k->getMontant(); break; } }
  402.         }
  403.         return $this->MontantFacturePayerReduction = $total;
  404.     }
  405.     public function getMontantFacturePayerCompassation()
  406.     {
  407.         $total = 0;
  408.         foreach($this->getCommandes() as $v){
  409.             foreach($v->getReduction() as $k){ if($k->getFlagCompassation() == 1){ $total += $k->getMontant(); break; } }
  410.         }
  411.         return $this->MontantFacturePayerCompassation = $total;
  412.     }
  413.     public function getMontantTotalFacturePayer()
  414.     {
  415.         return $this->MontantTotalFacturePayer = $this->getMontantFacturePayerCash() + $this->getMontantFacturePayerAvance() + $this->getMontantFacturePayerBanque() + $this->getMontantFacturePayerCompassation() + $this->getMontantFacturePayerReduction();
  416.     }
  417.     public function getMontantTotalBalanceFacture()
  418.     {
  419.         return $this->MontantTotalBalanceFacture = $this->getMontantTotalAPayer() - $this->getMontantTotalFactureNulle() - $this->getMontantTotalFacturePayer();
  420.     }
  421.     public function getMontantTotalAPayer()
  422.     {
  423.         $total = 0;
  424.         foreach($this->getCommandes() as $v){ $total += $v->getTotalAPaiyer(); }
  425.         return $this->MontantTotalAPayer = $total;
  426.     }
  427.     public function getMontantTotalDepensesReel()
  428.     {
  429.         $total = 0;
  430.         foreach($this->getDepensesContenaires() as $v){ $total += $v->getMontant(); }
  431.         return $this->MontantTotalDepensesReel = $total;
  432.     }
  433.     public function getMontantTotalFactureNulle()
  434.     {
  435.         $total = 0;
  436.         foreach($this->getCommandes() as $v){ if($v->getFactureMarchandiseAbscent() == true){ $total += $v->getTotalAPaiyer(); } }
  437.         return $this->MontantTotalFactureNulle = $total;
  438.     }
  439.     public function getTotalCBM()
  440.     {
  441.         $total = 0;
  442.         foreach($this->getCommandes() as $v){
  443.             foreach($v->getTmpVolumes() as $k){ if($k->getUnite() == 'CBM'){ $total += $k->getVolume(); } }
  444.         }
  445.         return $this->TotalCBM = $total;
  446.     }
  447.     public function getTotalTONNE()
  448.     {
  449.         $total = 0;
  450.         foreach($this->getCommandes() as $v){
  451.             foreach($v->getTmpVolumes() as $k){ if($k->getUnite() == 'TONNE'){ $total += $k->getVolume(); } }
  452.         }
  453.         return $this->TotalTONNE = $total;
  454.     }
  455.     public function getLieu()
  456.     {
  457.         $position = 'A DETERMINER';
  458.         foreach($this->getSuiviContenaires() as $v){ if($v->getPositionActuelleFlag() === true){ $position = $v->getLieu(); } }
  459.         return $this->lieu = $position;
  460.     }
  461.     public function getLieuDate()
  462.     {
  463.         $positionDate = new \DateTime();
  464.         foreach($this->getSuiviContenaires() as $v){ if($v->getPositionActuelleFlag() === true){ $positionDate = $v->getDateOperation(); } }
  465.         return $this->lieuDate = $positionDate;
  466.     }
  467.     public function getDeclarant()
  468.     {
  469.         $declarant = 'A DETERMINER';
  470.         foreach($this->getDeclarants() as $v){ $declarant = $v->getNomDeclarant(); }
  471.         return $this->declarant = $declarant;
  472.     }
  473.     /** @return Collection|RemarqueConteneur[] */
  474.     public function getRemarqueConteneurs(): Collection { return $this->remarqueConteneurs; }
  475.     public function addRemarqueConteneur(RemarqueConteneur $remarqueConteneur): self
  476.     {
  477.         if (!$this->remarqueConteneurs->contains($remarqueConteneur)) {
  478.             $this->remarqueConteneurs[] = $remarqueConteneur;
  479.             $remarqueConteneur->setProgrammeConteneur($this);
  480.         }
  481.         return $this;
  482.     }
  483.     public function removeRemarqueConteneur(RemarqueConteneur $remarqueConteneur): self
  484.     {
  485.         if ($this->remarqueConteneurs->contains($remarqueConteneur)) {
  486.             $this->remarqueConteneurs->removeElement($remarqueConteneur);
  487.             if ($remarqueConteneur->getProgrammeConteneur() === $this) { $remarqueConteneur->setProgrammeConteneur(null); }
  488.         }
  489.         return $this;
  490.     }
  491.     public function getTotalCOLIS()
  492.     {
  493.         $total = 0;
  494.         foreach($this->getCommandes() as $v){ $total += $v->getTotalCOLIS(); }
  495.         return $this->TotalCOLIS = $total;
  496.     }
  497.     public function getMontantTotalAutreFraisPayer()
  498.     {
  499.         $total = 0;
  500.         foreach($this->getCommandes() as $v){ $total += $v->getTotalAPaiyerAutraiFrais(); }
  501.         return $this->MontantTotalAutreFraisPayer = $total;
  502.     }
  503.     public function getTotalAPaiyerVolume()
  504.     {
  505.         $total = 0;
  506.         foreach($this->getCommandes() as $v){ $total += $v->getTotalAPaiyerVolume(); }
  507.         return $this->TotalAPaiyerVolume = $total;
  508.     }
  509.     public function getRemarqueConteneur() { return $this->remarqueConteneur; }
  510.     public function setRemarqueConteneur($remarqueConteneur) { $this->remarqueConteneur = $remarqueConteneur; }
  511.     public function isIsMco(): ?bool { return $this->isMco; }
  512.     public function setIsMco(bool $isMco): self { $this->isMco = $isMco; return $this; }
  513.     public function isIsRapport(): ?bool { return $this->isRapport; }
  514.     public function setIsRapport(bool $isRapport): self { $this->isRapport = $isRapport; return $this; }
  515.     public function getDateRapportAt(): ?\DateTimeInterface { return $this->dateRapportAt; }
  516.     public function setDateRapportAt(?\DateTimeInterface $dateRapportAt): self { $this->dateRapportAt = $dateRapportAt; return $this; }
  517.     public function isIsClients(): ?bool { return $this->isClients; }
  518.     public function setIsClients(bool $isClients): self { $this->isClients = $isClients; return $this; }
  519.     public function getVilleInitiale(): ?Ville { return $this->villeInitiale; }
  520.     public function setVilleInitiale(?Ville $villeInitiale): self { $this->villeInitiale = $villeInitiale; return $this; }
  521.     /** @return Collection<int, Notification> */
  522.     public function getNotifications(): Collection { return $this->notifications; }
  523.     public function addNotification(Notification $notification): self
  524.     {
  525.         if (!$this->notifications->contains($notification)) {
  526.             $this->notifications[] = $notification;
  527.             $notification->setPrct($this);
  528.         }
  529.         return $this;
  530.     }
  531.     public function removeNotification(Notification $notification): self
  532.     {
  533.         if ($this->notifications->removeElement($notification)) {
  534.             if ($notification->getPrct() === $this) { $notification->setPrct(null); }
  535.         }
  536.         return $this;
  537.     }
  538.     /** @return Collection<int, TmpConteneurReception> */
  539.     public function getTmpConteneurReceptions(): Collection { return $this->tmpConteneurReceptions; }
  540.     public function addTmpConteneurReception(TmpConteneurReception $tmpConteneurReception): self
  541.     {
  542.         if (!$this->tmpConteneurReceptions->contains($tmpConteneurReception)) {
  543.             $this->tmpConteneurReceptions[] = $tmpConteneurReception;
  544.             $tmpConteneurReception->setProgramme($this);
  545.         }
  546.         return $this;
  547.     }
  548.     public function removeTmpConteneurReception(TmpConteneurReception $tmpConteneurReception): self
  549.     {
  550.         if ($this->tmpConteneurReceptions->removeElement($tmpConteneurReception)) {
  551.             if ($tmpConteneurReception->getProgramme() === $this) { $tmpConteneurReception->setProgramme(null); }
  552.         }
  553.         return $this;
  554.     }
  555.     public function getRapport(): ?string { return $this->rapport; }
  556.     public function setRapport(?string $rapport): self { $this->rapport = $rapport; return $this; }
  557.     public function isIsElectronique(): ?bool { return $this->isElectronique; }
  558.     public function setIsElectronique(bool $isElectronique): self { $this->isElectronique = $isElectronique; return $this; }
  559.     public function getDateValidation(): ?\DateTimeImmutable { return $this->dateValidation; }
  560.     public function setDateValidation(?\DateTimeImmutable $dateValidation): self { $this->dateValidation = $dateValidation; return $this; }
  561.     public function getDateValidationFin(): ?\DateTimeImmutable { return $this->dateValidationFin; }
  562.     public function setDateValidationFin(?\DateTimeImmutable $dateValidationFin): self { $this->dateValidationFin = $dateValidationFin; return $this; }
  563.     public function getDateattibution(): ?\DateTimeImmutable { return $this->dateattribution; }
  564.     public function setDateattibution(?\DateTimeImmutable $dateattribution): self { $this->dateattribution = $dateattribution; return $this; }
  565.     public function isIsNotifier(): ?bool { return $this->isNotifier; }
  566.     public function setIsNotifier(bool $isNotifier): self { $this->isNotifier = $isNotifier; return $this; }
  567.     public function getAgentGestionnaire(): ?Agent { return $this->agentGestionnaire; }
  568.     public function setAgentGestionnaire(?Agent $agentGestionnaire): self
  569.     {
  570.         $this->agentGestionnaire = $agentGestionnaire;
  571.         return $this;
  572.     }
  573.     public function isPayeGestionnaire(): ?bool { return $this->payeGestionnaire; }
  574.     public function setPayeGestionnaire(?bool $payeGestionnaire): self { $this->payeGestionnaire = $payeGestionnaire; return $this; }
  575. }