src/Entity/Gestiform/Formations/Financement/Financement.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gestiform\Formations\Financement;
  3. use App\Entity\AbstractEntity;
  4. use App\Entity\Common\Upload;
  5. use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;
  6. use App\Entity\Gestiform\Formations\Actions\BondeCommandeParcour;
  7. use App\Entity\Gestiform\Formations\Devis\Devis;
  8. use App\Entity\Gestiform\Formations\Dossier\Dossier;
  9. use App\Entity\Gestiform\Formations\Financeur\Financeur;
  10. use App\Entity\Gestiform\Formations\Entreprise\Entreprise;
  11. use App\Entity\Gestiform\Formations\Session\Session;
  12. use App\Repository\Gestiform\Formations\Financement\FinancementRepository;
  13. use Doctrine\Common\Collections\ArrayCollection;
  14. use Doctrine\Common\Collections\Collection;
  15. use Doctrine\ORM\Mapping as ORM;
  16. /**
  17.  * @ORM\Entity(repositoryClass=FinancementRepository::class)
  18.  */
  19. class Financement extends AbstractEntity
  20. {
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=Dossier::class, inversedBy="financements", cascade={"persist"})
  23.      */
  24.     private ?Dossier $dossier null;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Entreprise::class, inversedBy="financements", cascade={"persist"})
  27.      */
  28.     private ?Entreprise $entreprise null;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=Financeur::class, inversedBy="financements", cascade={"persist"})
  31.      */
  32.     private ?Financeur $financeur null;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=Devis::class, inversedBy="financements", cascade={"persist"})
  35.      */
  36.     private ?Devis $devis null;
  37.     /**
  38.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  39.      */
  40.     private ?float $montantHt null;
  41.     /**
  42.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  43.      */
  44.     private ?float $tauxHoraire null// en €
  45.     /**
  46.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  47.      */
  48.     private ?float $affectationHoraire null// en %
  49.     /**
  50.      * @ORM\Column(type="datetime", nullable=true)
  51.      */
  52.     private ?\DateTime $start null;
  53.     /**
  54.      * @ORM\Column(type="datetime", nullable=true)
  55.      */
  56.     private ?\DateTime $end null;
  57.     /**
  58.      * @ORM\ManyToOne(targetEntity=Masterlistelg::class)
  59.      * @ORM\JoinColumn(nullable=true)
  60.      */
  61.     private ?Masterlistelg $codeTva null;
  62.     /**
  63.      * @ORM\Column( type="decimal", precision=10, scale=2, nullable=true)
  64.      */
  65.     private ?float $tauxTva null;
  66.     /**
  67.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  68.      */
  69.     private ?float $montantTva null;
  70.     /**
  71.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  72.      */
  73.     private ?float $montantTtc null;
  74.     /**
  75.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  76.      */
  77.     private ?float $montantRegleHt null;
  78.     /**
  79.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  80.      */
  81.     private ?float $montantRegleTtc null;
  82.     /**
  83.      * @ORM\Column(type="boolean", nullable=true)
  84.      */
  85.     private ?bool $subrogation false;
  86.     /**
  87.      * @ORM\Column(type="boolean", nullable=true)
  88.      */
  89.     private ?bool $financementTotal false;
  90.     /**
  91.      * @ORM\Column(type="boolean", nullable=true)
  92.      */
  93.     private ?bool $financementPrincipal false;
  94.     /**
  95.      * @ORM\Column(type="string", length=255, nullable=true)
  96.      */
  97.     private ?string $numDossier null;
  98.     /**
  99.      * @ORM\ManyToOne(targetEntity=Masterlistelg::class)
  100.      */
  101.     private ?Masterlistelg $typeFinancement null;
  102.     /**
  103.      * @ORM\ManyToOne(targetEntity=BondeCommandeParcour::class)
  104.      */
  105.     private ?BondeCommandeParcour $bdcParcours null;
  106.     /**
  107.      * @ORM\ManyToOne(targetEntity=Session::class)
  108.      */
  109.     private ?Session $session null;
  110.     /**
  111.      * @ORM\ManyToOne(targetEntity=Masterlistelg::class)
  112.      */
  113.     private ?Masterlistelg $echeancier null;
  114.     /**
  115.      * @ORM\Column(type="boolean", nullable=true)
  116.      */
  117.     private ?bool $concerneFrais false;
  118.     /**
  119.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  120.      */
  121.     private ?float $montantEcheances null;
  122.     /**
  123.      * @ORM\OneToOne(targetEntity=Upload::class, cascade={"persist", "remove"})
  124.      * @ORM\JoinColumn(nullable=true)
  125.      */
  126.     private ?Upload $document null;
  127.     /**
  128.      * @ORM\OneToMany(targetEntity=Echeancier::class, mappedBy="financement",cascade={"persist","remove"})
  129.      */
  130.     private Collection $echeances;
  131.     public function __construct()
  132.     {
  133.         $this->echeances = new ArrayCollection();
  134.     }
  135.     public function getMontantHt(): ?string
  136.     {
  137.         return $this->montantHt;
  138.     }
  139.     public function setMontantHt(?string $montantHt): self
  140.     {
  141.         $this->montantHt $montantHt;
  142.         return $this;
  143.     }
  144.     public function getTauxHoraire(): ?string
  145.     {
  146.         return $this->tauxHoraire;
  147.     }
  148.     public function setTauxHoraire(?string $tauxHoraire): self
  149.     {
  150.         $this->tauxHoraire $tauxHoraire;
  151.         return $this;
  152.     }
  153.     public function getAffectationHoraire(): ?string
  154.     {
  155.         return $this->affectationHoraire;
  156.     }
  157.     public function setAffectationHoraire(?string $affectationHoraire): self
  158.     {
  159.         $this->affectationHoraire $affectationHoraire;
  160.         return $this;
  161.     }
  162.     public function getStart(): ?\DateTime
  163.     {
  164.         return $this->start;
  165.     }
  166.     public function setStart(?\DateTime $start): self
  167.     {
  168.         $this->start $start;
  169.         return $this;
  170.     }
  171.     public function getEnd(): ?\DateTime
  172.     {
  173.         return $this->end;
  174.     }
  175.     public function setEnd(?\DateTime $end): self
  176.     {
  177.         $this->end $end;
  178.         return $this;
  179.     }
  180.     public function getTauxTva(): ?string
  181.     {
  182.         return $this->tauxTva;
  183.     }
  184.     public function setTauxTva(?string $tauxTva): self
  185.     {
  186.         $this->tauxTva $tauxTva;
  187.         return $this;
  188.     }
  189.     public function getMontantTva(): ?string
  190.     {
  191.         return $this->montantTva;
  192.     }
  193.     public function setMontantTva(?string $montantTva): self
  194.     {
  195.         $this->montantTva $montantTva;
  196.         return $this;
  197.     }
  198.     public function getMontantTtc(): ?string
  199.     {
  200.         return $this->montantTtc;
  201.     }
  202.     public function setMontantTtc(?string $montantTtc): self
  203.     {
  204.         $this->montantTtc $montantTtc;
  205.         return $this;
  206.     }
  207.     public function getMontantRegleHt(): ?string
  208.     {
  209.         return $this->montantRegleHt;
  210.     }
  211.     public function setMontantRegleHt(?string $montantRegleHt): self
  212.     {
  213.         $this->montantRegleHt $montantRegleHt;
  214.         return $this;
  215.     }
  216.     public function getMontantRegleTtc(): ?string
  217.     {
  218.         return $this->montantRegleTtc;
  219.     }
  220.     public function setMontantRegleTtc(?string $montantRegleTtc): self
  221.     {
  222.         $this->montantRegleTtc $montantRegleTtc;
  223.         return $this;
  224.     }
  225.     public function isSubrogation(): ?bool
  226.     {
  227.         return $this->subrogation;
  228.     }
  229.     public function setSubrogation(?bool $subrogation): self
  230.     {
  231.         $this->subrogation $subrogation;
  232.         return $this;
  233.     }
  234.     public function isFinancementTotal(): ?bool
  235.     {
  236.         return $this->financementTotal;
  237.     }
  238.     public function setFinancementTotal(?bool $financementTotal): self
  239.     {
  240.         $this->financementTotal $financementTotal;
  241.         return $this;
  242.     }
  243.     public function isFinancementPrincipal(): ?bool
  244.     {
  245.         return $this->financementPrincipal;
  246.     }
  247.     public function setFinancementPrincipal(?bool $financementPrincipal): self
  248.     {
  249.         $this->financementPrincipal $financementPrincipal;
  250.         return $this;
  251.     }
  252.     public function isConcerneFrais(): ?bool
  253.     {
  254.         return $this->concerneFrais;
  255.     }
  256.     public function setConcerneFrais(?bool $concerneFrais): self
  257.     {
  258.         $this->concerneFrais $concerneFrais;
  259.         return $this;
  260.     }
  261.     public function getDossier(): ?Dossier
  262.     {
  263.         return $this->dossier;
  264.     }
  265.     public function setDossier(?Dossier $dossier): self
  266.     {
  267.         $this->dossier $dossier;
  268.         return $this;
  269.     }
  270.     public function getEntreprise(): ?Entreprise
  271.     {
  272.         return $this->entreprise;
  273.     }
  274.     public function setEntreprise(?Entreprise $entreprise): self
  275.     {
  276.         $this->entreprise $entreprise;
  277.         return $this;
  278.     }
  279.     public function getDevis(): ?Devis
  280.     {
  281.         return $this->devis;
  282.     }
  283.     public function setDevis(?Devis $devis): self
  284.     {
  285.         $this->devis $devis;
  286.         return $this;
  287.     }
  288.     public function getCodeTva(): ?Masterlistelg
  289.     {
  290.         return $this->codeTva;
  291.     }
  292.     public function setCodeTva(?Masterlistelg $codeTva): self
  293.     {
  294.         $this->codeTva $codeTva;
  295.         return $this;
  296.     }
  297.     public function getTypeFinancement(): ?Masterlistelg
  298.     {
  299.         return $this->typeFinancement;
  300.     }
  301.     public function setTypeFinancement(?Masterlistelg $typeFinancement): self
  302.     {
  303.         $this->typeFinancement $typeFinancement;
  304.         return $this;
  305.     }
  306.     public function getFinanceur(): ?Financeur
  307.     {
  308.         return $this->financeur;
  309.     }
  310.     public function setFinanceur(?Financeur $financeur): self
  311.     {
  312.         $this->financeur $financeur;
  313.         return $this;
  314.     }
  315.     public function getBdcParcours(): ?BondeCommandeParcour
  316.     {
  317.         return $this->bdcParcours;
  318.     }
  319.     public function setBdcParcours(?BondeCommandeParcour $bdcParcours): self
  320.     {
  321.         $this->bdcParcours $bdcParcours;
  322.         return $this;
  323.     }
  324.     public function getSession(): ?Session
  325.     {
  326.         return $this->session;
  327.     }
  328.     public function setSession(?Session $session): self
  329.     {
  330.         $this->session $session;
  331.         return $this;
  332.     }
  333.     public function getEcheancier(): ?Masterlistelg
  334.     {
  335.         return $this->echeancier;
  336.     }
  337.     public function setEcheancier(?Masterlistelg $echeancier): self
  338.     {
  339.         $this->echeancier $echeancier;
  340.         return $this;
  341.     }
  342.     public function getNumDossier(): ?string
  343.     {
  344.         return $this->numDossier;
  345.     }
  346.     public function setNumDossier(?string $numDossier): self
  347.     {
  348.         $this->numDossier $numDossier;
  349.         return $this;
  350.     }
  351.     /**
  352.      * @return Collection<int, Echeancier>
  353.      */
  354.     public function getEcheances(): Collection
  355.     {
  356.         return $this->echeances;
  357.     }
  358.     public function addEcheance(Echeancier $echeance): static
  359.     {
  360.         if (!$this->echeances->contains($echeance)) {
  361.             $this->echeances->add($echeance);
  362.             $echeance->setFinancement($this);
  363.         }
  364.         return $this;
  365.     }
  366.     public function removeEcheance(Echeancier $echeance): static
  367.     {
  368.         if ($this->echeances->removeElement($echeance)) {
  369.             // set the owning side to null (unless already changed)
  370.             if ($echeance->getFinancement() === $this) {
  371.                 $echeance->setFinancement(null);
  372.             }
  373.         }
  374.         return $this;
  375.     }
  376.     public function getDocument(): ?Upload
  377.     {
  378.         return $this->document;
  379.     }
  380.     public function setDocument(?Upload $document): self
  381.     {
  382.         $this->document $document;
  383.         return $this;
  384.     }
  385.     public function getMontantEcheances(): ?float
  386.     {
  387.         return $this->montantEcheances;
  388.     }
  389.     public function setMontantEcheances(?float $montantEcheances): self
  390.     {
  391.         $this->montantEcheances $montantEcheances;
  392.         return $this;
  393.     }
  394. }