<?php
namespace App\Entity;
use App\Repository\FicheoffreRepository;
use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: FicheoffreRepository::class)]
class Ficheoffre
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?DateTimeInterface $datefacteur = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $modepaiement = null;
#[ORM\Column(nullable: true)]
private ?bool $payee = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $total = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $doucumentfee = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $fraistransit = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $numfact = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $douane = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $transport = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $consignee = null;
#[ORM\ManyToOne(inversedBy: 'ficheoffres')]
private ?Fournisseur $fournisseur = null;
#[ORM\OneToMany(mappedBy: 'ficheoffre', targetEntity: Article::class, cascade: ["remove"])]
private Collection $article;
#[ORM\Column(length: 255, nullable: true)]
private ?string $type = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totalproduit = null;
#[ORM\OneToMany(mappedBy: 'ficheoffre', targetEntity: Payment::class, cascade: ["remove"])]
private Collection $payments;
#[ORM\Column(length: 255, nullable: true)]
private ?string $fraisdedocument = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totaldolar = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $transportdhl = null;
#[ORM\Column(nullable: true)]
private ?array $frais = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?DateTimeInterface $date = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totalqte = null;
#[ORM\OneToMany(mappedBy: 'ficheoffre', targetEntity: Fraislocaux::class, cascade: ["remove"])]
private Collection $fraislocaux;
#[ORM\OneToMany(mappedBy: 'ficheoffre', targetEntity: Fraisfournisseurr::class, cascade: ["remove"])]
private Collection $fraisfournisseurrs;
#[ORM\Column(length: 255, nullable: true)]
private ?string $tauxdeconversion = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totaldinar = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totalfraislocaux = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $num = null;
#[ORM\OneToMany(mappedBy: 'ficheachat', targetEntity: Archivearticle::class)]
private Collection $archivearticles;
public function __construct()
{
$this->article = new ArrayCollection();
$this->payments = new ArrayCollection();
$this->fraislocaux = new ArrayCollection();
$this->fraisfournisseurrs = new ArrayCollection();
$this->archivearticles = new ArrayCollection();
}
public function __toString()
{
return $this->getConsignee();
}
public function getId(): ?int
{
return $this->id;
}
public function getDatefacteur(): ?DateTimeInterface
{
return $this->datefacteur;
}
public function setDatefacteur(?DateTimeInterface $datefacteur): self
{
$this->datefacteur = $datefacteur;
return $this;
}
public function getModepaiement(): ?string
{
return $this->modepaiement;
}
public function setModepaiement(?string $modepaiement): self
{
$this->modepaiement = $modepaiement;
return $this;
}
public function isPayee(): ?bool
{
return $this->payee;
}
public function setPayee(?bool $payee): self
{
$this->payee = $payee;
return $this;
}
public function getTotal(): ?string
{
return $this->total;
}
public function setTotal(?string $total): self
{
$this->total = $total;
return $this;
}
public function getDoucumentfee(): ?string
{
return $this->doucumentfee;
}
public function setDoucumentfee(?string $doucumentfee): self
{
$this->doucumentfee = $doucumentfee;
return $this;
}
public function getFraistransit(): ?string
{
return $this->fraistransit;
}
public function setFraistransit(?string $fraistransit): self
{
$this->fraistransit = $fraistransit;
return $this;
}
public function getNumfact(): ?string
{
return $this->numfact;
}
public function setNumfact(?string $numfact): self
{
$this->numfact = $numfact;
return $this;
}
public function getDouane(): ?string
{
return $this->douane;
}
public function setDouane(?string $douane): self
{
$this->douane = $douane;
return $this;
}
public function getTransport(): ?string
{
return $this->transport;
}
public function setTransport(?string $transport): self
{
$this->transport = $transport;
return $this;
}
public function getConsignee(): ?string
{
return $this->consignee;
}
public function setConsignee(?string $consignee): self
{
$this->consignee = $consignee;
return $this;
}
public function getFournisseur(): ?Fournisseur
{
return $this->fournisseur;
}
public function setFournisseur(?Fournisseur $fournisseur): self
{
$this->fournisseur = $fournisseur;
return $this;
}
/**
* @return Collection<int, Article>
*/
public function getArticle(): Collection
{
return $this->article;
}
public function addArticle(Article $article): self
{
if (!$this->article->contains($article)) {
$this->article->add($article);
$article->setFicheoffre($this);
}
return $this;
}
public function removeArticle(Article $article): self
{
if ($this->article->removeElement($article)) {
// set the owning side to null (unless already changed)
if ($article->getFicheoffre() === $this) {
$article->setFicheoffre(null);
}
}
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getTotalproduit(): ?string
{
return $this->totalproduit;
}
public function setTotalproduit(?string $totalproduit): self
{
$this->totalproduit = $totalproduit;
return $this;
}
/**
* @return Collection<int, Payment>
*/
public function getPayments(): Collection
{
return $this->payments;
}
public function addPayment(Payment $payment): self
{
if (!$this->payments->contains($payment)) {
$this->payments->add($payment);
$payment->setFicheoffre($this);
}
return $this;
}
public function removePayment(Payment $payment): self
{
if ($this->payments->removeElement($payment)) {
// set the owning side to null (unless already changed)
if ($payment->getFicheoffre() === $this) {
$payment->setFicheoffre(null);
}
}
return $this;
}
public function getFraisdedocument(): ?string
{
return $this->fraisdedocument;
}
public function setFraisdedocument(?string $fraisdedocument): self
{
$this->fraisdedocument = $fraisdedocument;
return $this;
}
public function getTotaldolar(): ?string
{
return $this->totaldolar;
}
public function setTotaldolar(?string $totaldolar): self
{
$this->totaldolar = $totaldolar;
return $this;
}
public function getTransportdhl(): ?string
{
return $this->transportdhl;
}
public function setTransportdhl(?string $transportdhl): self
{
$this->transportdhl = $transportdhl;
return $this;
}
public function getFrais(): ?array
{
return $this->frais;
}
public function setFrais(?array $frais): static
{
$this->frais = $frais;
return $this;
}
public function getDate(): ?DateTimeInterface
{
return $this->date;
}
public function setDate(?DateTimeInterface $date): static
{
$this->date = $date;
return $this;
}
public function getTotalqte(): ?string
{
return $this->totalqte;
}
public function setTotalqte(?string $totalqte): static
{
$this->totalqte = $totalqte;
return $this;
}
/**
* @return Collection<int, Fraislocaux>
*/
public function getFraislocaux(): Collection
{
return $this->fraislocaux;
}
public function addFraislocaux(Fraislocaux $fraislocaux): static
{
if (!$this->fraislocaux->contains($fraislocaux)) {
$this->fraislocaux->add($fraislocaux);
$fraislocaux->setFicheoffre($this);
}
return $this;
}
public function removeFraislocaux(Fraislocaux $fraislocaux): static
{
if ($this->fraislocaux->removeElement($fraislocaux)) {
// set the owning side to null (unless already changed)
if ($fraislocaux->getFicheoffre() === $this) {
$fraislocaux->setFicheoffre(null);
}
}
return $this;
}
/**
* @return Collection<int, Fraisfournisseurr>
*/
public function getFraisfournisseurrs(): Collection
{
return $this->fraisfournisseurrs;
}
public function addFraisfournisseurr(Fraisfournisseurr $fraisfournisseurr): static
{
if (!$this->fraisfournisseurrs->contains($fraisfournisseurr)) {
$this->fraisfournisseurrs->add($fraisfournisseurr);
$fraisfournisseurr->setFicheoffre($this);
}
return $this;
}
public function removeFraisfournisseurr(Fraisfournisseurr $fraisfournisseurr): static
{
if ($this->fraisfournisseurrs->removeElement($fraisfournisseurr)) {
// set the owning side to null (unless already changed)
if ($fraisfournisseurr->getFicheoffre() === $this) {
$fraisfournisseurr->setFicheoffre(null);
}
}
return $this;
}
public function getTauxdeconversion(): ?string
{
return $this->tauxdeconversion;
}
public function setTauxdeconversion(?string $tauxdeconversion): static
{
$this->tauxdeconversion = $tauxdeconversion;
return $this;
}
public function getTotaldinar(): ?string
{
return $this->totaldinar;
}
public function setTotaldinar(?string $totaldinar): static
{
$this->totaldinar = $totaldinar;
return $this;
}
public function getTotalfraislocaux(): ?string
{
return $this->totalfraislocaux;
}
public function setTotalfraislocaux(?string $totalfraislocaux): static
{
$this->totalfraislocaux = $totalfraislocaux;
return $this;
}
public function getNum(): ?string
{
return $this->num;
}
public function setNum(?string $num): static
{
$this->num = $num;
return $this;
}
/**
* @return Collection<int, Archivearticle>
*/
public function getArchivearticles(): Collection
{
return $this->archivearticles;
}
public function addArchivearticle(Archivearticle $archivearticle): self
{
if (!$this->archivearticles->contains($archivearticle)) {
$this->archivearticles->add($archivearticle);
$archivearticle->setFicheachat($this);
}
return $this;
}
public function removeArchivearticle(Archivearticle $archivearticle): self
{
if ($this->archivearticles->removeElement($archivearticle)) {
// set the owning side to null (unless already changed)
if ($archivearticle->getFicheachat() === $this) {
$archivearticle->setFicheachat(null);
}
}
return $this;
}
}