<?php
namespace App\Entity;
use App\Repository\ReglementEntrepriseRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ReglementEntrepriseRepository::class)
*/
class ReglementEntreprise
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=MoyPaiement::class)
*/
private $modpaiement;
/**
* @ORM\ManyToOne(targetEntity=Entreprise::class, inversedBy="reglementEntreprises")
*/
private $entreprise;
/**
* @ORM\ManyToOne(targetEntity=Organisme::class, inversedBy="reglementEntreprises")
*/
private $organisme;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $montant;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $montantimpute;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $resteaimputer;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $created_at;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $updated_at;
/**
* @ORM\OneToMany(targetEntity=ReglementFactureEntreprise::class, mappedBy="reglemententreprise")
*/
private $reglementFactureEntreprises;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $datereglement;
/**
* @ORM\OneToMany(targetEntity=ReglementFactureInscrit::class, mappedBy="reglemententreprise")
*/
private $reglementFactureInscrits;
/**
* @ORM\ManyToOne(targetEntity=Site::class)
*/
private $site;
/**
* @ORM\OneToMany(targetEntity=LigneFacturePrint::class, mappedBy="reglementNegatif")
*/
private $ligneFacturePrints;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $noteReglement;
public function __construct()
{
$this->reglementFactureEntreprises = new ArrayCollection();
$this->reglementFactureInscrits = new ArrayCollection();
$this->ligneFacturePrints = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getModpaiement(): ?MoyPaiement
{
return $this->modpaiement;
}
public function setModpaiement(?MoyPaiement $modpaiement): self
{
$this->modpaiement = $modpaiement;
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;
}
public function getMontant(): ?float
{
return $this->montant;
}
public function setMontant(?float $montant): self
{
$this->montant = $montant;
return $this;
}
public function getMontantimpute(): ?float
{
return $this->montantimpute;
}
public function setMontantimpute(?float $montantimpute): self
{
$this->montantimpute = $montantimpute;
return $this;
}
public function getResteaimputer(): ?float
{
return $this->resteaimputer;
}
public function setResteaimputer(?float $resteaimputer): self
{
$this->resteaimputer = $resteaimputer;
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, ReglementFactureEntreprise>
*/
public function getReglementFactureEntreprises(): Collection
{
return $this->reglementFactureEntreprises;
}
public function addReglementFactureEntreprise(ReglementFactureEntreprise $reglementFactureEntreprise): self
{
if (!$this->reglementFactureEntreprises->contains($reglementFactureEntreprise)) {
$this->reglementFactureEntreprises[] = $reglementFactureEntreprise;
$reglementFactureEntreprise->setReglemententreprise($this);
}
return $this;
}
public function removeReglementFactureEntreprise(ReglementFactureEntreprise $reglementFactureEntreprise): self
{
if ($this->reglementFactureEntreprises->removeElement($reglementFactureEntreprise)) {
// set the owning side to null (unless already changed)
if ($reglementFactureEntreprise->getReglemententreprise() === $this) {
$reglementFactureEntreprise->setReglemententreprise(null);
}
}
return $this;
}
public function getDatereglement(): ?\DateTimeInterface
{
return $this->datereglement;
}
public function setDatereglement(?\DateTimeInterface $datereglement): self
{
$this->datereglement = $datereglement;
return $this;
}
/**
* @return Collection<int, ReglementFactureInscrit>
*/
public function getReglementFactureInscrits(): Collection
{
return $this->reglementFactureInscrits;
}
public function addReglementFactureInscrit(ReglementFactureInscrit $reglementFactureInscrit): self
{
if (!$this->reglementFactureInscrits->contains($reglementFactureInscrit)) {
$this->reglementFactureInscrits[] = $reglementFactureInscrit;
$reglementFactureInscrit->setReglemententreprise($this);
}
return $this;
}
public function removeReglementFactureInscrit(ReglementFactureInscrit $reglementFactureInscrit): self
{
if ($this->reglementFactureInscrits->removeElement($reglementFactureInscrit)) {
// set the owning side to null (unless already changed)
if ($reglementFactureInscrit->getReglemententreprise() === $this) {
$reglementFactureInscrit->setReglemententreprise(null);
}
}
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->setReglementNegatif($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->getReglementNegatif() === $this) {
$ligneFacturePrint->setReglementNegatif(null);
}
}
return $this;
}
public function getNoteReglement(): ?string
{
return $this->noteReglement;
}
public function setNoteReglement(?string $noteReglement): self
{
$this->noteReglement = $noteReglement;
return $this;
}
}