src/Entity/Articles/Devise.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Articles;
  3. use App\Entity\Fournisseurs\Fournisseur;
  4. use App\Entity\GestionComerciale\Acompte;
  5. use App\Entity\GestionComerciale\LCR;
  6. use App\Entity\Utilisateur\Utilisateur;
  7. use DateTime;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use Doctrine\ORM\Mapping as ORM;
  11. use Gedmo\Mapping\Annotation as Gedmo;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. use App\Annotations\SecuredEntity;
  14. /**
  15.  * Devise
  16.  *
  17.  * @ORM\Table("article__devise")
  18.  * @ORM\Entity(repositoryClass="App\Repository\Articles\DeviseRepository")
  19.  * @SecuredEntity(name="Devise", group="COMPTABILITE")
  20.  */
  21. class Devise
  22. {
  23.     /**
  24.      * @ORM\Column(name="id", type="integer")
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="AUTO")
  27.      */
  28.     private $id;
  29.     
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="devise")
  32.      * @ORM\JoinColumn(nullable=true)
  33.      */
  34.     private $utilisateur;
  35.     
  36.     /**
  37.      * @ORM\Column(name="date", type="datetime", nullable=true)
  38.      */
  39.     private $date;
  40.     /**
  41.      * @ORM\Column(name="date_suppression", type="datetime", nullable=true)
  42.      */
  43.     private $dateSuppression;
  44.     /**
  45.      * @ORM\Column(name="date_maj", type="datetime", nullable=true)
  46.      * @Gedmo\Timestampable(on="update")
  47.      */
  48.     private $dateMaj;    
  49.     /**
  50.      * @ORM\Column(name="name", type="string", length=255)
  51.      * @Assert\NotBlank(message="LibellĂ© obligatoire")
  52.      */
  53.     private $name;
  54.     
  55.     /**
  56.     * @ORM\OneToMany(targetEntity="App\Entity\Fournisseurs\Fournisseur", mappedBy="devise")
  57.     */
  58.     private $fournisseurs;
  59.     
  60.     /**
  61.      * @ORM\Column(name="symbole", type="string", length=255)
  62.      * @Assert\NotBlank(message="symbole obligatoire")
  63.      */
  64.     private $symbole;
  65.     
  66.     /**
  67.      * @ORM\Column(name="symbole_compta", type="string", length=255, nullable=true)
  68.      */
  69.     private $symboleCompta;
  70.     
  71.     /**
  72.      * @ORM\Column(name="taux_change", type="float", nullable=true)
  73.      */
  74.     private $tauxChange;
  75.     
  76.     /**
  77.     * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Acompte", mappedBy="devise")
  78.     */
  79.     private $reglements;
  80.     
  81.     /**
  82.     * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\LCR", mappedBy="devise")
  83.     */
  84.     private $lcrs;
  85.     public function getId(): int
  86.     {
  87.         return $this->id;
  88.     }
  89.     public function setName(string $name): Devise
  90.     {
  91.         $this->name $name;
  92.         return $this;
  93.     }
  94.     public function getName(): string
  95.     {
  96.         return $this->name;
  97.     }
  98.     /**
  99.      * Constructor
  100.      */
  101.     public function __construct()
  102.     {
  103.         $this->date = new Datetime();
  104.             $this->conditionsAchat = new ArrayCollection();
  105.             $this->tauxChange      1;
  106.             $this->lcrs            = new ArrayCollection();
  107.             $this->reglements      = new ArrayCollection();
  108.             $this->fournisseurs    = new ArrayCollection();
  109.     }
  110.     public function addConditionsAchat(ConditionAchat $conditionsAchat): Devise
  111.     {
  112.         $this->conditionsAchat[] = $conditionsAchat;
  113.         return $this;
  114.     }
  115.     public function removeConditionsAchat(ConditionAchat $conditionsAchat)
  116.     {
  117.         $this->conditionsAchat->removeElement($conditionsAchat);
  118.     }
  119.     public function getConditionsAchat(): ArrayCollection
  120.     {
  121.         return $this->conditionsAchat;
  122.     }
  123.     public function addFournisseur(Fournisseur $fournisseurs): Devise
  124.     {
  125.         $this->fournisseurs[] = $fournisseurs;
  126.         return $this;
  127.     }
  128.     public function removeFournisseur(Fournisseur $fournisseurs)
  129.     {
  130.         $this->fournisseurs->removeElement($fournisseurs);
  131.     }
  132.     public function getFournisseurs(): ArrayCollection
  133.     {
  134.         return $this->fournisseurs;
  135.     }
  136.     public function setSymbole(string $symbole): Devise
  137.     {
  138.         $this->symbole $symbole;
  139.         return $this;
  140.     }
  141.     public function getSymbole(): string
  142.     {
  143.         return $this->symbole;
  144.     }
  145.     public function setUtilisateur(?Utilisateur $utilisateur): Devise
  146.     {
  147.         $this->utilisateur $utilisateur;
  148.         return $this;
  149.     }
  150.     public function getUtilisateur(): ?Utilisateur
  151.     {
  152.         return $this->utilisateur;
  153.     }
  154.     public function setDate(?DateTime $date): Devise
  155.     {
  156.         $this->date $date;
  157.         return $this;
  158.     }
  159.     public function getDate(): ?DateTime
  160.     {
  161.         return $this->date;
  162.     }
  163.     public function setDateSuppression(?DateTime $dateSuppression): Devise
  164.     {
  165.         $this->dateSuppression $dateSuppression;
  166.         return $this;
  167.     }
  168.     public function getDateSuppression(): ?DateTime
  169.     {
  170.         return $this->dateSuppression;
  171.     }
  172.     public function setDateMaj(?DateTime $dateMaj): Devise
  173.     {
  174.         $this->dateMaj $dateMaj;
  175.         return $this;
  176.     }
  177.     public function getDateMaj(): ?DateTime
  178.     {
  179.         return $this->dateMaj;
  180.     }
  181.     public function setTauxChange(?float $tauxChange): Devise
  182.     {
  183.         $this->tauxChange $tauxChange;
  184.         return $this;
  185.     }
  186.     public function getTauxChange(): ?float
  187.     {
  188.         return $this->tauxChange;
  189.     }
  190.     public function addReglement(Acompte $reglement): Devise
  191.     {
  192.         $this->reglements[] = $reglement;
  193.         return $this;
  194.     }
  195.     public function removeReglement(Acompte $reglement)
  196.     {
  197.         $this->reglements->removeElement($reglement);
  198.     }
  199.     public function getReglements(): ArrayCollection
  200.     {
  201.         return $this->reglements;
  202.     }
  203.     public function addLcr(LCR $lcr): Devise
  204.     {
  205.         $this->lcrs[] = $lcr;
  206.         return $this;
  207.     }
  208.     public function removeLcr(LCR $lcr)
  209.     {
  210.         $this->lcrs->removeElement($lcr);
  211.     }
  212.     public function getLcrs(): ArrayCollection
  213.     {
  214.         return $this->lcrs;
  215.     }
  216.     public function setSymboleCompta(?string $symboleCompta): Devise
  217.     {
  218.         $this->symboleCompta $symboleCompta;
  219.         return $this;
  220.     }
  221.     public function getSymboleCompta(): ?string
  222.     {
  223.         return $this->symboleCompta;
  224.     }
  225.     
  226.     public function __toString() {
  227.         return $this->name;
  228.     }    
  229.     
  230. }