<?php
namespace App\Entity;
use App\Repository\EnteteFactureRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EnteteFactureRepository::class)
*/
class EnteteFacture
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $numerofacture;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $datefacture;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $dateecheance;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $reference;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $statut;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $created_at;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $updated_at;
/**
* @ORM\OneToMany(targetEntity=Inscrit::class, mappedBy="entetefacture")
*/
private $inscrits;
/**
* @ORM\OneToMany(targetEntity=LigneFacture::class, mappedBy="entetefacture",cascade={"persist"})
*/
private $ligneFactures;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $typeclient;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $statutreglement;
/**
* @ORM\OneToMany(targetEntity=ReglementFactureInscrit::class, mappedBy="entetefacture")
*/
private $enteteReglementFactureInscrits;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $payeur;
/**
* @ORM\ManyToOne(targetEntity=Site::class, inversedBy="enteteFactures")
*/
private $site;
/**
* @ORM\OneToMany(targetEntity=LigneFacturePrint::class, mappedBy="enteteFacture")
*/
private $ligneFacturePrints;
/**
* @ORM\ManyToOne(targetEntity=Tier::class)
*/
private $tier;
/**
* @ORM\ManyToOne(targetEntity=Entreprise::class, inversedBy="enteteFactures")
*/
private $entreprise;
/**
* @ORM\ManyToOne(targetEntity=Organisme::class, inversedBy="enteteFactures")
*/
private $organisme;
/**
* @ORM\OneToMany(targetEntity=EcheanceInscrit::class, mappedBy="enteteFacture")
*/
private $echeanceInscrits;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $montant;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $montantRegle;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $resteAregler;
/**
* @ORM\OneToMany(targetEntity=ReglementEcheance::class, mappedBy="enteteFacture")
*/
private $reglementEcheances;
public function __construct()
{
$this->inscrits = new ArrayCollection();
$this->ligneFactures = new ArrayCollection();
$this->enteteReglementFactureInscrits = new ArrayCollection();
$this->ligneFacturePrints = new ArrayCollection();
$this->echeanceInscrits = new ArrayCollection();
$this->reglementEcheances = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNumerofacture(): ?string
{
return $this->numerofacture;
}
public function setNumerofacture(string $numerofacture): self
{
$this->numerofacture = $numerofacture;
return $this;
}
public function getDatefacture(): ?\DateTimeInterface
{
return $this->datefacture;
}
public function setDatefacture(?\DateTimeInterface $datefacture): self
{
$this->datefacture = $datefacture;
return $this;
}
public function getDateecheance(): ?\DateTimeInterface
{
return $this->dateecheance;
}
public function setDateecheance(?\DateTimeInterface $dateecheance): self
{
$this->dateecheance = $dateecheance;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
return $this;
}
public function getStatut(): ?string
{
return $this->statut;
}
public function setStatut(?string $statut): self
{
$this->statut = $statut;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(?\DateTimeImmutable $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updated_at;
}
public function setUpdatedAt(?\DateTimeImmutable $updated_at): self
{
$this->updated_at = $updated_at;
return $this;
}
/**
* @return Collection<int, Inscrit>
*/
public function getInscrits(): Collection
{
return $this->inscrits;
}
public function addInscrit(Inscrit $inscrit): self
{
if (!$this->inscrits->contains($inscrit)) {
$this->inscrits[] = $inscrit;
$inscrit->setEntetefacture($this);
}
return $this;
}
public function removeInscrit(Inscrit $inscrit): self
{
if ($this->inscrits->removeElement($inscrit)) {
// set the owning side to null (unless already changed)
if ($inscrit->getEntetefacture() === $this) {
$inscrit->setEntetefacture(null);
}
}
return $this;
}
/**
* @return Collection<int, LigneFacture>
*/
public function getLigneFactures(): Collection
{
return $this->ligneFactures;
}
public function addLigneFacture(LigneFacture $ligneFacture): self
{
if (!$this->ligneFactures->contains($ligneFacture)) {
$this->ligneFactures[] = $ligneFacture;
$ligneFacture->setEntetefacture($this);
}
return $this;
}
public function removeLigneFacture(LigneFacture $ligneFacture): self
{
if ($this->ligneFactures->removeElement($ligneFacture)) {
// set the owning side to null (unless already changed)
if ($ligneFacture->getEntetefacture() === $this) {
$ligneFacture->setEntetefacture(null);
}
}
return $this;
}
public function getTypeclient(): ?string
{
return $this->typeclient;
}
public function setTypeclient(?string $typeclient): self
{
$this->typeclient = $typeclient;
return $this;
}
public function getStatutreglement(): ?string
{
return $this->statutreglement;
}
public function setStatutreglement(?string $statutreglement): self
{
$this->statutreglement = $statutreglement;
return $this;
}
/**
* @return Collection<int, ReglementFactureInscrit>
*/
public function getEnteteReglementFactureInscrits(): Collection
{
return $this->enteteReglementFactureInscrits;
}
public function addEnteteReglementFactureInscrit(ReglementFactureInscrit $enteteReglementFactureInscrit): self
{
if (!$this->enteteReglementFactureInscrits->contains($enteteReglementFactureInscrit)) {
$this->enteteReglementFactureInscrits[] = $enteteReglementFactureInscrit;
$enteteReglementFactureInscrit->setEntetefacture($this);
}
return $this;
}
public function removeEnteteReglementFactureInscrit(ReglementFactureInscrit $enteteReglementFactureInscrit): self
{
if ($this->enteteReglementFactureInscrits->removeElement($enteteReglementFactureInscrit)) {
// set the owning side to null (unless already changed)
if ($enteteReglementFactureInscrit->getEntetefacture() === $this) {
$enteteReglementFactureInscrit->setEntetefacture(null);
}
}
return $this;
}
public function getPayeur(): ?string
{
return $this->payeur;
}
public function setPayeur(?string $payeur): self
{
$this->payeur = $payeur;
return $this;
}
public function getSite(): ?Site
{
return $this->site;
}
public function setSite(?Site $site): self
{
$this->site = $site;
return $this;
}
/**
* @return Collection<int, LigneFacturePrint>
*/
public function getLigneFacturePrints(): Collection
{
return $this->ligneFacturePrints;
}
public function addLigneFacturePrint(LigneFacturePrint $ligneFacturePrint): self
{
if (!$this->ligneFacturePrints->contains($ligneFacturePrint)) {
$this->ligneFacturePrints[] = $ligneFacturePrint;
$ligneFacturePrint->setEnteteFacture($this);
}
return $this;
}
public function removeLigneFacturePrint(LigneFacturePrint $ligneFacturePrint): self
{
if ($this->ligneFacturePrints->removeElement($ligneFacturePrint)) {
// set the owning side to null (unless already changed)
if ($ligneFacturePrint->getEnteteFacture() === $this) {
$ligneFacturePrint->setEnteteFacture(null);
}
}
return $this;
}
public function getTier(): ?Tier
{
return $this->tier;
}
public function setTier(?Tier $tier): self
{
$this->tier = $tier;
return $this;
}
public function getEntreprise(): ?Entreprise
{
return $this->entreprise;
}
public function setEntreprise(?Entreprise $entreprise): self
{
$this->entreprise = $entreprise;
return $this;
}
public function getOrganisme(): ?Organisme
{
return $this->organisme;
}
public function setOrganisme(?Organisme $organisme): self
{
$this->organisme = $organisme;
return $this;
}
/**
* @return Collection<int, EcheanceInscrit>
*/
public function getEcheanceInscrits(): Collection
{
return $this->echeanceInscrits;
}
public function addEcheanceInscrit(EcheanceInscrit $echeanceInscrit): self
{
if (!$this->echeanceInscrits->contains($echeanceInscrit)) {
$this->echeanceInscrits[] = $echeanceInscrit;
$echeanceInscrit->setEnteteFacture($this);
}
return $this;
}
public function removeEcheanceInscrit(EcheanceInscrit $echeanceInscrit): self
{
if ($this->echeanceInscrits->removeElement($echeanceInscrit)) {
// set the owning side to null (unless already changed)
if ($echeanceInscrit->getEnteteFacture() === $this) {
$echeanceInscrit->setEnteteFacture(null);
}
}
return $this;
}
public function getMontant(): ?float
{
return $this->montant;
}
public function setMontant(?float $montant): self
{
$this->montant = $montant;
return $this;
}
public function getMontantRegle(): ?float
{
return $this->montantRegle;
}
public function setMontantRegle(?float $montantRegle): self
{
$this->montantRegle = $montantRegle;
return $this;
}
public function getResteAregler(): ?float
{
return $this->resteAregler;
}
public function setResteAregler(?float $resteAregler): self
{
$this->resteAregler = $resteAregler;
return $this;
}
/**
* @return Collection<int, ReglementEcheance>
*/
public function getReglementEcheances(): Collection
{
return $this->reglementEcheances;
}
public function addReglementEcheance(ReglementEcheance $reglementEcheance): self
{
if (!$this->reglementEcheances->contains($reglementEcheance)) {
$this->reglementEcheances[] = $reglementEcheance;
$reglementEcheance->setEnteteFacture($this);
}
return $this;
}
public function removeReglementEcheance(ReglementEcheance $reglementEcheance): self
{
if ($this->reglementEcheances->removeElement($reglementEcheance)) {
// set the owning side to null (unless already changed)
if ($reglementEcheance->getEnteteFacture() === $this) {
$reglementEcheance->setEnteteFacture(null);
}
}
return $this;
}
}