<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\FraisDeCourtageRepository")
*/
class FraisDeCourtage
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime")
*/
private $date_saisie;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ref_fact;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Devise", inversedBy="fraisDeCourtages")
*/
private $devise;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $object;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $identifiant;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\Column(type="string",length=255, nullable=true)
*/
private $volume;
/**
* @ORM\Column(type="string",length=255, nullable=true)
*/
private $nature;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Unite", inversedBy="fraisDeCourtages")
*/
private $unite;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $montant_commissionne;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ca_net;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $tva;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $total_ht;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $total_ttc;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $condition_et_mode_de_paiement;
/**
* @ORM\Column(type="datetime")
*/
private $created_at;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Status", inversedBy="fraisDeCourtages")
*/
private $status;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\AdminDonneurOrdre", inversedBy="fraisDeCourtages")
*/
private $client;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Objet", inversedBy="fraisDeCourtages")
*/
private $objet;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Devise")
*/
private $ca_net_devise;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $qte;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Devise")
*/
private $montant_devise;
public function __construct(){
$this->created_at = new \DateTime('now');
if (!isset($this->ref_fact)){
$this->ref_fact = 'APDM'.random_int(10,900).date('s');
}else{
$this->ref_fact = 'APDM'.random_int(10,900).date('s');
}
}
public function getId(): ?int
{
return $this->id;
}
public function getDateSaisie(): ?\DateTimeInterface
{
return $this->date_saisie;
}
public function setDateSaisie(\DateTimeInterface $date_saisie): self
{
$this->date_saisie = $date_saisie;
return $this;
}
public function getRefFact(): ?string
{
return $this->ref_fact;
}
public function setRefFact(?string $ref_fact): self
{
$this->ref_fact = $ref_fact;
return $this;
}
public function getNature():?string
{
return $this->nature;
}
public function setNature(?string $nature): self
{
$this->nature = $nature;
return $this;
}
public function getDevise(): ?Devise
{
return $this->devise;
}
public function setDevise(?Devise $devise): self
{
$this->devise = $devise;
return $this;
}
public function getObject(): ?string
{
return $this->object;
}
public function setObject(?string $object): self
{
$this->object = $object;
return $this;
}
public function getIdentifiant(): ?string
{
return $this->identifiant;
}
public function setIdentifiant(?string $identifiant): self
{
$this->identifiant = $identifiant;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getVolume(): ?string
{
return $this->volume;
}
public function setVolume(?string $volume): self
{
$this->volume = $volume;
return $this;
}
public function getUnite(): ?Unite
{
return $this->unite;
}
public function setUnite(?Unite $unite): self
{
$this->unite = $unite;
return $this;
}
public function getMontantCommissionne(): ?string
{
return $this->montant_commissionne;
}
public function setMontantCommissionne(?string $montant_commissionne): self
{
$this->montant_commissionne = $montant_commissionne;
return $this;
}
public function getCaNet(): ?string
{
return $this->ca_net;
}
public function setCaNet(?string $ca_net): self
{
$this->ca_net = $ca_net;
return $this;
}
public function getTva(): ?string
{
return $this->tva;
}
public function setTva(?string $tva): self
{
$this->tva = $tva;
return $this;
}
public function getTotalHt(): ?string
{
return $this->total_ht;
}
public function setTotalHt(?string $total_ht): self
{
$this->total_ht = $total_ht;
return $this;
}
public function getTotalTtc(): ?string
{
return $this->total_ttc;
}
public function setTotalTtc(?string $total_ttc): self
{
$this->total_ttc = $total_ttc;
return $this;
}
public function getConditionEtModeDePaiement(): ?string
{
return $this->condition_et_mode_de_paiement;
}
public function setConditionEtModeDePaiement(?string $condition_et_mode_de_paiement): self
{
$this->condition_et_mode_de_paiement = $condition_et_mode_de_paiement;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getStatus(): ?Status
{
return $this->status;
}
public function setStatus(?Status $status): self
{
$this->status = $status;
return $this;
}
public function getClient(): ?AdminDonneurOrdre
{
return $this->client;
}
public function setClient(?AdminDonneurOrdre $client): self
{
$this->client = $client;
return $this;
}
public function getObjet(): ?Objet
{
return $this->objet;
}
public function setObjet(?Objet $objet): self
{
$this->objet = $objet;
return $this;
}
public function getCaNetDevise(): ?Devise
{
return $this->ca_net_devise;
}
public function setCaNetDevise(?Devise $ca_net_devise): self
{
$this->ca_net_devise = $ca_net_devise;
return $this;
}
public function getQte(): ?string
{
return $this->qte;
}
public function setQte(?string $qte): self
{
$this->qte = $qte;
return $this;
}
public function getMontantDevise(): ?Devise
{
return $this->montant_devise;
}
public function setMontantDevise(?Devise $montant_devise): self
{
$this->montant_devise = $montant_devise;
return $this;
}
}