<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\AppelDeMargeRepository")
*/
class AppelDeMarge
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime",nullable=true)
*/
private $mois;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ref_op;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $mandant;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $volume;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $montant_transaction;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $taux;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $frais_de_courtage;
/**
* @ORM\Column(type="datetime")
*/
private $created_at;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Status", inversedBy="appelDeMarges")
*/
private $status;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Incoterm", inversedBy="appelDeMarges")
*/
private $base;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\SousJacent", inversedBy="appelDeMarges")
*/
private $sous_jacent;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Unite", inversedBy="appelDeMarges")
*/
private $unite;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Products", inversedBy="appelDeMarges")
*/
private $filiere;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Devise", inversedBy="appelDeMarges")
*/
private $devise;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Devise", inversedBy="appelDeMargeDeviseMontant")
*/
private $dvise_montant;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Devise", inversedBy="applDeMargeStrike")
*/
private $strike_devise;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Client", inversedBy="appelDeMarges")
*/
private $client;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $objet;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $qte;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $designation;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $montant_commisionne;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Devise")
*/
private $devise_montant;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ca_net;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Devise")
*/
private $devise_ca_net;
public function __construct(){
$this->created_at = new \DateTime('now');
if (!isset($this->ref_op)){
$this->ref_op = 'APDM'.random_int(10,900).date('s');
}else{
$this->ref_op = 'APDM'.random_int(10,900).date('s');
}
}
public function getId(): ?int
{
return $this->id;
}
public function getMois(): ?\DateTimeInterface
{
return $this->mois;
}
public function setMois(\DateTimeInterface $mois): self
{
$this->mois = $mois;
return $this;
}
public function getRefOp(): ?string
{
return $this->ref_op;
}
public function setRefOp(?string $ref_op): self
{
$this->ref_op = $ref_op;
return $this;
}
public function getMandant(): ?string
{
return $this->mandant;
}
public function setMandant(string $mandant): self
{
$this->mandant = $mandant;
return $this;
}
public function getVolume(): ?string
{
return $this->volume;
}
public function setVolume(string $volume): self
{
$this->volume = $volume;
return $this;
}
public function getMontantTransaction(): ?string
{
return $this->montant_transaction;
}
public function setMontantTransaction(string $montant_transaction): self
{
$this->montant_transaction = $montant_transaction;
return $this;
}
public function getTaux(): ?string
{
return $this->taux;
}
public function setTaux(string $taux): self
{
$this->taux = $taux;
return $this;
}
public function getFraisDeCourtage(): ?string
{
return $this->frais_de_courtage;
}
public function setFraisDeCourtage(string $frais_de_courtage): self
{
$this->frais_de_courtage = $frais_de_courtage;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
/**
* @return mixed
*/
public function getStrike()
{
return $this->strike;
}
/**
* @param mixed $strike
* @return AppelDeMarge
*/
public function setStrike($strike)
{
$this->strike = $strike;
return $this;
}
public function __toString(): string{
return $this->mandant;
}
public function getStatus(): ?Status
{
return $this->status;
}
public function setStatus(?Status $status): self
{
$this->status = $status;
return $this;
}
public function getBase(): ?Incoterm
{
return $this->base;
}
public function setBase(?Incoterm $base): self
{
$this->base = $base;
return $this;
}
public function getSousJacent(): ?SousJacent
{
return $this->sous_jacent;
}
public function setSousJacent(?SousJacent $sous_jacent): self
{
$this->sous_jacent = $sous_jacent;
return $this;
}
public function getUnite(): ?Unite
{
return $this->unite;
}
public function setUnite(?Unite $unite): self
{
$this->unite = $unite;
return $this;
}
public function getFiliere(): ?Products
{
return $this->filiere;
}
public function setFiliere(?Products $filiere): self
{
$this->filiere = $filiere;
return $this;
}
public function getDevise(): ?Devise
{
return $this->devise;
}
public function setDevise(?Devise $devise): self
{
$this->devise = $devise;
return $this;
}
public function getDviseMontant(): ?Devise
{
return $this->dvise_montant;
}
public function setDviseMontant(?Devise $dvise_montant): self
{
$this->dvise_montant = $dvise_montant;
return $this;
}
public function getStrikeDevise(): ?Devise
{
return $this->strike_devise;
}
public function setStrikeDevise(?Devise $strike_devise): self
{
$this->strike_devise = $strike_devise;
return $this;
}
public function getClient(): ?Client
{
return $this->client;
}
public function setClient(?Client $client): self
{
$this->client = $client;
return $this;
}
public function getObjet(): ?string
{
return $this->objet;
}
public function setObjet(?string $objet): self
{
$this->objet = $objet;
return $this;
}
public function getQte(): ?string
{
return $this->qte;
}
public function setQte(?string $qte): self
{
$this->qte = $qte;
return $this;
}
public function getDesignation(): ?string
{
return $this->designation;
}
public function setDesignation(?string $designation): self
{
$this->designation = $designation;
return $this;
}
public function getMontantCommisionne(): ?string
{
return $this->montant_commisionne;
}
public function setMontantCommisionne(?string $montant_commisionne): self
{
$this->montant_commisionne = $montant_commisionne;
return $this;
}
public function getDeviseMontant(): ?Devise
{
return $this->devise_montant;
}
public function setDeviseMontant(?Devise $devise_montant): self
{
$this->devise_montant = $devise_montant;
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 getDeviseCaNet(): ?Devise
{
return $this->devise_ca_net;
}
public function setDeviseCaNet(?Devise $devise_ca_net): self
{
$this->devise_ca_net = $devise_ca_net;
return $this;
}
}