src/Entity/Payment.php line 20
<?phpnamespace App\Entity;use App\Repository\PaymentRepository;use App\Traits\TimeStampTrait;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;use Symfony\Component\Uid\Uuid;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity(repositoryClass: PaymentRepository::class)]#[ORM\HasLifecycleCallbacks]#[UniqueEntity(fields: ['code'])]class Payment{use TimeStampTrait;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column(type: 'integer')]private $id;#[ORM\Column(type: 'uuid', unique: true, nullable: true)]private ?Uuid $code;#[ORM\Column(length: 100, nullable: true)]private ?string $verificationCode = null;#[ORM\Column(nullable: true)]private ?bool $status = null;#[ORM\Column(nullable: true)]private ?bool $step = null;#[ORM\Column(nullable: true)]private ?bool $paid = null;#[ORM\Column(nullable: true)]private ?bool $closed = null;#[ORM\Column(length: 100, nullable: true)]private ?string $reference = null;#[ORM\Column(length: 30, nullable: true)]private ?string $token = null;#[ORM\Column(nullable: true)]private ?bool $sent = null;#[ORM\ManyToOne(inversedBy: 'payments')]private ?Annee $annee = null;#[ORM\Column(length: 100, nullable: true)]private ?string $depositeur = null;#[ORM\Column(type: 'date', nullable: true)]private $paymentdate;#[ORM\ManyToOne(inversedBy: 'payments')]private ?PaymentMode $paymentmode = null;#[ORM\Column(length: 255, nullable: true)]private ?string $commentaire = null;#[ORM\ManyToOne(inversedBy: 'payments')]private ?User $createdBy = null;#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2)]private ?string $totalAmount = null;#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2)]private ?string $singleAmount = null;#[ORM\Column(length: 100, nullable: true)]private ?string $type = null;#[ORM\ManyToOne(inversedBy: 'payments')]private ?Entreprise $marchand = null;#[ORM\ManyToOne(cascade: ['all'], fetch: 'EAGER', inversedBy: 'payments')]private ?Location $location = null;#[ORM\ManyToMany(targetEntity: Mois::class, inversedBy: 'payments')]private Collection $mois;#[ORM\Column(length: 25, nullable: true)]private ?string $generatortype = null;#[ORM\Column(length: 50, nullable: true)]private ?string $cashInBy = null;#[ORM\Column(nullable: true)]private ?bool $partialPayment = null;#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2, nullable: true)]private ?string $partialAmount = null;#[ORM\OneToMany(mappedBy: 'payment', targetEntity: Pay::class, cascade: ['all'], fetch: 'EAGER')]private Collection $pays;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $paidAt = null;#[ORM\Column(nullable: true)]private ?bool $monthlyNotif = null;#[ORM\Column(length: 50, nullable: true)]private ?string $month = null;#[ORM\OneToMany(mappedBy: 'payment', targetEntity: Charge::class, cascade: ['all'], fetch: 'EAGER')]private Collection $charges;#[ORM\Column(length: 50, nullable: true)]private ?string $year = null;#[ORM\OneToMany(mappedBy: 'payment', targetEntity: ChargeAllocation::class)]private Collection $chargeAllocations;#[ORM\Column(length: 10, nullable: true)]private ?string $dgiCurrencyCode = null;#[ORM\Column(type: Types::DECIMAL, precision: 18, scale: 6, nullable: true)]private ?string $dgiCurrencyRate = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $dgiCurrencyDate = null;#[ORM\Column(type: Types::DECIMAL, precision: 14, scale: 2, nullable: true)]private ?string $dgiAmountCdf = null;#[ORM\Column(type: Types::DECIMAL, precision: 5, scale: 2, nullable: true)]private ?string $dgiTaxRate = null;#[ORM\Column(type: Types::DECIMAL, precision: 14, scale: 2, nullable: true)]private ?string $dgiTaxAmount = null;#[ORM\OneToOne(mappedBy: 'payment', targetEntity: PaymentDgi::class, cascade: ['persist', 'remove'])]private ?PaymentDgi $paymentDgi = null;public function getId(){return $this->id;}public function setId($id): void{$this->id = $id;}public function getCode(): ?Uuid{return $this->code;}public function setCode(Uuid $code): self{$this->code = $code;return $this;}/*** @return string|null*/public function getVerificationCode(): ?string{return $this->verificationCode;}/*** @param string|null $verificationCode*/public function setVerificationCode(?string $verificationCode): void{$this->verificationCode = $verificationCode;}/*** @return bool|null*/public function getStatus(): ?bool{return $this->status;}/*** @param bool|null $status*/public function setStatus(?bool $status): void{$this->status = $status;}/*** @return bool|null*/public function getStep(): ?bool{return $this->step;}/*** @param bool|null $step*/public function setStep(?bool $step): void{$this->step = $step;}/*** @return bool|null*/public function getPaid(): ?bool{return $this->paid;}/*** @param bool|null $paid*/public function setPaid(?bool $paid): void{$this->paid = $paid;}/*** @return bool|null*/public function getClosed(): ?bool{return $this->closed;}/*** @param bool|null $closed*/public function setClosed(?bool $closed): void{$this->closed = $closed;}/*** @return string|null*/public function getReference(): ?string{return $this->reference;}/*** @param string|null $reference*/public function setReference(?string $reference): void{$this->reference = $reference;}/*** @return string|null*/public function getToken(): ?string{return $this->token;}/*** @param string|null $token*/public function setToken(?string $token): void{$this->token = $token;}/*** @return bool|null*/public function getSent(): ?bool{return $this->sent;}/*** @param bool|null $sent*/public function setSent(?bool $sent): void{$this->sent = $sent;}/*** @return Annee|null*/public function getAnnee(): ?Annee{return $this->annee;}/*** @param Annee|null $annee*/public function setAnnee(?Annee $annee): void{$this->annee = $annee;}/*** @return string|null*/public function getDepositeur(): ?string{return $this->depositeur;}/*** @param string|null $depositeur*/public function setDepositeur(?string $depositeur): void{$this->depositeur = $depositeur;}/*** @return mixed*/public function getPaymentdate(){return $this->paymentdate;}/*** @param mixed $paymentdate*/public function setPaymentdate($paymentdate): void{$this->paymentdate = $paymentdate;}/*** @return PaymentMode|null*/public function getPaymentmode(): ?PaymentMode{return $this->paymentmode;}/*** @param PaymentMode|null $paymentmode*/public function setPaymentmode(?PaymentMode $paymentmode): void{$this->paymentmode = $paymentmode;}/*** @return string|null*/public function getCommentaire(): ?string{return $this->commentaire;}/*** @param string|null $commentaire*/public function setCommentaire(?string $commentaire): void{$this->commentaire = $commentaire;}/*** @return User|null*/public function getCreatedBy(): ?User{return $this->createdBy;}/*** @param User|null $createdBy*/public function setCreatedBy(?User $createdBy): void{$this->createdBy = $createdBy;}/*** @return string|null*/public function getTotalAmount(): ?string{return $this->totalAmount;}/*** @param string|null $totalAmount*/public function setTotalAmount(?string $totalAmount): void{$this->totalAmount = $totalAmount;}/*** @return string|null*/public function getSingleAmount(): ?string{return $this->singleAmount;}/*** @param string|null $singleAmount*/public function setSingleAmount(?string $singleAmount): void{$this->singleAmount = $singleAmount;}/*** @return string|null*/public function getType(): ?string{return $this->type;}/*** @param string|null $type*/public function setType(?string $type): void{$this->type = $type;}/*** @return Entreprise|null*/public function getMarchand(): ?Entreprise{return $this->marchand;}/*** @param Entreprise|null $marchand*/public function setMarchand(?Entreprise $marchand): void{$this->marchand = $marchand;}/*** @return Location|null*/public function getLocation(): ?Location{return $this->location;}/*** @param Location|null $location*/public function setLocation(?Location $location): void{$this->location = $location;}public function __construct(){$this->mois = new ArrayCollection();$this->pays = new ArrayCollection();$this->charges = new ArrayCollection();$this->chargeAllocations = new ArrayCollection();}/*** @return Collection<int, Mois>*/public function getMois(): Collection{return $this->mois;}public function addMoi(Mois $moi): static{if (!$this->mois->contains($moi)) {$this->mois->add($moi);}return $this;}public function removeMoi(Mois $moi): static{$this->mois->removeElement($moi);return $this;}public function getGeneratortype(): ?string{return $this->generatortype;}public function setGeneratortype(?string $generatortype): static{$this->generatortype = $generatortype;return $this;}public function getCashInBy(): ?string{return $this->cashInBy;}public function setCashInBy(?string $cashInBy): static{$this->cashInBy = $cashInBy;return $this;}public function isPartialPayment(): ?bool{return $this->partialPayment;}public function setPartialPayment(?bool $partialPayment): static{$this->partialPayment = $partialPayment;return $this;}public function getPartialAmount(): ?string{return $this->partialAmount;}public function setPartialAmount(?float $partialAmount): static{$this->partialAmount = $partialAmount;return $this;}/*** @return Collection<int, Pay>*/public function getPays(): Collection{return $this->pays;}public function addPay(Pay $pay): static{if (!$this->pays->contains($pay)) {$this->pays->add($pay);$pay->setPayment($this);}return $this;}public function removePay(Pay $pay): static{if ($this->pays->removeElement($pay)) {// set the owning side to null (unless already changed)if ($pay->getPayment() === $this) {$pay->setPayment(null);}}return $this;}public function getPaidAt(): ?\DateTimeInterface{return $this->paidAt;}public function setPaidAt(?\DateTimeInterface $paidAt): static{$this->paidAt = $paidAt;return $this;}public function isMonthlyNotif(): ?bool{return $this->monthlyNotif;}public function setMonthlyNotif(?bool $monthlyNotif): static{$this->monthlyNotif = $monthlyNotif;return $this;}public function getMonth(): ?string{return $this->month;}public function setMonth(?string $month): static{$this->month = $month;return $this;}/*** @return Collection<int, Charge>*/public function getCharges(): Collection{return $this->charges;}public function addCharge(Charge $charge): static{if (!$this->charges->contains($charge)) {$this->charges->add($charge);$charge->setPayment($this);}return $this;}public function removeCharge(Charge $charge): static{if ($this->charges->removeElement($charge)) {// set the owning side to null (unless already changed)if ($charge->getPayment() === $this) {$charge->setPayment(null);}}return $this;}public function getYear(): ?string{return $this->year;}public function setYear(?string $year): static{$this->year = $year;return $this;}/*** @return Collection<int, ChargeAllocation>*/public function getChargeAllocations(): Collection{return $this->chargeAllocations;}public function addChargeAllocation(ChargeAllocation $chargeAllocation): static{if (!$this->chargeAllocations->contains($chargeAllocation)) {$this->chargeAllocations->add($chargeAllocation);$chargeAllocation->setPayment($this);}return $this;}public function removeChargeAllocation(ChargeAllocation $chargeAllocation): static{if ($this->chargeAllocations->removeElement($chargeAllocation)) {// set the owning side to null (unless already changed)if ($chargeAllocation->getPayment() === $this) {$chargeAllocation->setPayment(null);}}return $this;}public function getPaymentDgi(): ?PaymentDgi{return $this->paymentDgi;}public function setPaymentDgi(?PaymentDgi $paymentDgi): static{// unset the owning side of the relation if necessaryif ($paymentDgi === null && $this->paymentDgi !== null) {$this->paymentDgi->setPayment(null);}// set the owning side of the relation if necessaryif ($paymentDgi !== null && $paymentDgi->getPayment() !== $this) {$paymentDgi->setPayment($this);}$this->paymentDgi = $paymentDgi;return $this;}public function getDgiCurrencyCode(): ?string{return $this->dgiCurrencyCode;}public function setDgiCurrencyCode(?string $dgiCurrencyCode): static{$this->dgiCurrencyCode = $dgiCurrencyCode;return $this;}public function getDgiCurrencyRate(): ?string{return $this->dgiCurrencyRate;}public function setDgiCurrencyRate(?string $dgiCurrencyRate): static{$this->dgiCurrencyRate = $dgiCurrencyRate;return $this;}public function getDgiCurrencyDate(): ?\DateTimeInterface{return $this->dgiCurrencyDate;}public function setDgiCurrencyDate(?\DateTimeInterface $dgiCurrencyDate): static{$this->dgiCurrencyDate = $dgiCurrencyDate;return $this;}public function getDgiAmountCdf(): ?string{return $this->dgiAmountCdf;}public function setDgiAmountCdf(?string $dgiAmountCdf): static{$this->dgiAmountCdf = $dgiAmountCdf;return $this;}public function getDgiTaxRate(): ?string{return $this->dgiTaxRate;}public function setDgiTaxRate(?string $dgiTaxRate): static{$this->dgiTaxRate = $dgiTaxRate;return $this;}public function getDgiTaxAmount(): ?string{return $this->dgiTaxAmount;}public function setDgiTaxAmount(?string $dgiTaxAmount): static{$this->dgiTaxAmount = $dgiTaxAmount;return $this;}}