src/Entity/ContaReceber.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Application\Sonata\UserBundle\Entity\User;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\UploadedFile;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\Repository\ContaReceberRepository")
  10.  */
  11. class ContaReceber implements CompanyDataRestrictable
  12. {
  13.     use BaseFranquia;
  14.     use LifeCycleTrait;
  15.     /**
  16.      * @ORM\Id()
  17.      * @ORM\GeneratedValue()
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\Cliente")
  23.      * @ORM\JoinColumn(nullable=true)
  24.      */
  25.     private $cliente;
  26.     /**
  27.      * @ORM\Column(type="date", nullable=true)
  28.      */
  29.     private $vencimento;
  30.     /**
  31.      * @ORM\Column(type="float")
  32.      */
  33.     private $valorBruto;
  34.     /**
  35.      * @ORM\Column(type="float", nullable=true)
  36.      */
  37.     private $valorLiquido;
  38.     /**
  39.      * @ORM\Column(type="date", nullable=true)
  40.      */
  41.     private $pagoEm;
  42.     /**
  43.      * @ORM\Column(type="date", nullable=true)
  44.      */
  45.     private $dataEmissaoNota;
  46.     /**
  47.      * @ORM\Column(type="string", length=45, nullable=true)
  48.      */
  49.     private $numeroNota;
  50.     ### IMAGENS
  51.     // Nota fiscal
  52.     /**
  53.      * @var UploadedFile
  54.      */
  55.     private $notaFiscalFile;
  56.     /**
  57.      * @ORM\Column(type="string", length=255, nullable=true)
  58.      */
  59.     private $notaFiscal;
  60.     /**
  61.      * @ORM\Column(type="string", length=255, nullable=true)
  62.      */
  63.     private $notaFiscalOriginal;
  64.     // Comprovante de pagamento
  65.     /**
  66.      * @var UploadedFile
  67.      */
  68.     private $comprovantePagamentoFile;
  69.     /**
  70.      * @ORM\Column(type="string", length=255, nullable=true)
  71.      */
  72.     private $comprovantePagamento;
  73.     /**
  74.      * @ORM\Column(type="string", length=255, nullable=true)
  75.      */
  76.     private $comprovantePagamentoOriginal;
  77.     /**
  78.      * @ORM\ManyToOne(targetEntity="App\Application\Sonata\UserBundle\Entity\User", inversedBy="clientes")
  79.      * @ORM\JoinColumn(nullable=false)
  80.      */
  81.     private $cadastradoPor;
  82.     /**
  83.      * @ORM\ManyToOne(targetEntity="App\Application\Sonata\UserBundle\Entity\User")
  84.      */
  85.     private $userUltimaAlteracao;
  86.     /**
  87.      * @ORM\Column(type="string", length=255, nullable=true)
  88.      */
  89.     private $descricao;
  90.     /**
  91.      * @ORM\ManyToOne(targetEntity="App\Entity\CentroCusto")
  92.      * @ORM\JoinColumn(nullable=true)
  93.      */
  94.     private $classificacao;
  95.     
  96.     /**
  97.      * @ORM\ManyToOne(targetEntity="App\Entity\BoletimMedicao")
  98.      */
  99.     private $boletimMedicao;
  100.     /**
  101.      * @ORM\OneToOne(targetEntity="App\Entity\ContaReceber", cascade={"persist", "remove"})
  102.      * @ORM\JoinColumn(onDelete="CASCADE")
  103.      */
  104.     private $fluxoCaixa;
  105.     /**
  106.      * @ORM\Column(type="string", length=45, nullable=true)
  107.      */
  108.     private $contaBancaria;
  109.     public function __toString()
  110.     {
  111.         return !empty($this->id) ? 'Conta a receber: ' $this->id 'Nova Conta Receber';
  112.     }
  113.     public function getId(): ?int
  114.     {
  115.         return $this->id;
  116.     }
  117.     public function getVencimento(): ?\DateTimeInterface
  118.     {
  119.         return $this->vencimento;
  120.     }
  121.     public function setVencimento(\DateTimeInterface $vencimento): self
  122.     {
  123.         $this->vencimento $vencimento;
  124.         return $this;
  125.     }
  126.     public function getPagoEm(): ?\DateTimeInterface
  127.     {
  128.         return $this->pagoEm;
  129.     }
  130.     public function setPagoEm(?\DateTimeInterface $pagoEm): self
  131.     {
  132.         $this->pagoEm $pagoEm;
  133.         return $this;
  134.     }
  135.     public function getDataEmissaoNota(): ?\DateTimeInterface
  136.     {
  137.         return $this->dataEmissaoNota;
  138.     }
  139.     public function setDataEmissaoNota(?\DateTimeInterface $dataEmissaoNota): self
  140.     {
  141.         $this->dataEmissaoNota $dataEmissaoNota;
  142.         return $this;
  143.     }
  144.     public function getNumeroNota(): ?string
  145.     {
  146.         return $this->numeroNota;
  147.     }
  148.     public function setNumeroNota(?string $numeroNota): self
  149.     {
  150.         $this->numeroNota $numeroNota;
  151.         return $this;
  152.     }
  153.     public function getCliente(): ?Cliente
  154.     {
  155.         return $this->cliente;
  156.     }
  157.     public function setCliente(?Cliente $cliente): self
  158.     {
  159.         $this->cliente $cliente;
  160.         return $this;
  161.     }
  162.     public function getValorBruto(): ?float
  163.     {
  164.         return $this->valorBruto;
  165.     }
  166.     public function setValorBruto(float $valorBruto): self
  167.     {
  168.         $this->valorBruto $valorBruto;
  169.         return $this;
  170.     }
  171.     public function getValorLiquido(): ?float
  172.     {
  173.         return $this->valorLiquido;
  174.     }
  175.     public function setValorLiquido(?float $valorLiquido): self
  176.     {
  177.         $this->valorLiquido $valorLiquido;
  178.         return $this;
  179.     }
  180.     public function getCadastradoPor(): ?User
  181.     {
  182.         return $this->cadastradoPor;
  183.     }
  184.     public function setCadastradoPor(?User $cadastradoPor): self
  185.     {
  186.         $this->cadastradoPor $cadastradoPor;
  187.         return $this;
  188.     }
  189.     public function getUserUltimaAlteracao(): ?User
  190.     {
  191.         return $this->userUltimaAlteracao;
  192.     }
  193.     public function setUserUltimaAlteracao(?User $userUltimaAlteracao): self
  194.     {
  195.         $this->userUltimaAlteracao $userUltimaAlteracao;
  196.         return $this;
  197.     }
  198. ### IMAGENS
  199.     ##### Nota Fiscal
  200.     public function getNotaFiscal(): ?string
  201.     {
  202.         return $this->notaFiscal;
  203.     }
  204.     public function setNotaFiscal(?string $notaFiscal): self
  205.     {
  206.         $this->notaFiscal $notaFiscal;
  207.         return $this;
  208.     }
  209.     public function getNotaFiscalOriginal(): ?string
  210.     {
  211.         return $this->notaFiscalOriginal;
  212.     }
  213.     public function setNotaFiscalOriginal(?string $notaOriginal): self
  214.     {
  215.         $this->notaFiscalOriginal $notaOriginal;
  216.         return $this;
  217.     }
  218.     /**
  219.      * @return UploadedFile
  220.      */
  221.     public function getNotaFiscalFile(): ?UploadedFile
  222.     {
  223.         return $this->notaFiscalFile;
  224.     }
  225.     /**
  226.      * @param UploadedFile $notaFiscalFile
  227.      * @return ContaReceber
  228.      */
  229.     public function setNotaFiscalFile(?UploadedFile $notaFiscalFile null): self
  230.     {
  231.         $this->notaFiscalFile $notaFiscalFile;
  232.         return $this;
  233.     }
  234.     ##### Comprovante
  235.     public function getComprovantePagamento(): ?string
  236.     {
  237.         return $this->comprovantePagamento;
  238.     }
  239.     public function setComprovantePagamento(?string $comprovantePagamento): self
  240.     {
  241.         $this->comprovantePagamento $comprovantePagamento;
  242.         return $this;
  243.     }
  244.     public function getComprovantePagamentoOriginal(): ?string
  245.     {
  246.         return $this->comprovantePagamentoOriginal;
  247.     }
  248.     public function setComprovantePagamentoOriginal(?string $comprovantePagamentoOriginal): self
  249.     {
  250.         $this->comprovantePagamentoOriginal $comprovantePagamentoOriginal;
  251.         return $this;
  252.     }
  253.     /**
  254.      * @return UploadedFile
  255.      */
  256.     public function getComprovantePagamentoFile(): ?UploadedFile
  257.     {
  258.         return $this->comprovantePagamentoFile;
  259.     }
  260.     /**
  261.      * @param UploadedFile $comprovantePagamentoFile
  262.      * @return ContaReceber
  263.      */
  264.     public function setComprovantePagamentoFile(?UploadedFile $comprovantePagamentoFile null): self
  265.     {
  266.         $this->comprovantePagamentoFile $comprovantePagamentoFile;
  267.         return $this;
  268.     }
  269.     public function getDescricao(): ?string
  270.     {
  271.         return $this->descricao;
  272.     }
  273.     public function setDescricao(?string $descricao): self
  274.     {
  275.         $this->descricao $descricao;
  276.         return $this;
  277.     }
  278.     public function getClassificacao(): ?CentroCusto
  279.     {
  280.         return $this->classificacao;
  281.     }
  282.     
  283.     public function getClassificacaoReceita(): ?CentroCusto
  284.     {
  285.         return $this->classificacao;
  286.     }
  287.     public function setClassificacao(?CentroCusto $classificacao): self
  288.     {
  289.         $this->classificacao $classificacao;
  290.         return $this;
  291.     }
  292.     public function getBoletimMedicao(): ?BoletimMedicao
  293.     {
  294.         return $this->boletimMedicao;
  295.     }
  296.     public function setBoletimMedicao(?BoletimMedicao $boletimMedicao): self
  297.     {
  298.         $this->boletimMedicao $boletimMedicao;
  299.         return $this;
  300.     }
  301.     public function getFluxoCaixa(): ?self
  302.     {
  303.         return $this->fluxoCaixa;
  304.     }
  305.     public function setFluxoCaixa(?self $fluxoCaixa): self
  306.     {
  307.         $this->fluxoCaixa $fluxoCaixa;
  308.         return $this;
  309.     }
  310.     public function getContaBancaria(): ?string
  311.     {
  312.         return $this->contaBancaria;
  313.     }
  314.     public function setContaBancaria(?string $contaBancaria): self
  315.     {
  316.         $this->contaBancaria $contaBancaria;
  317.         return $this;
  318.     }
  319. }