src/Entity/HtInvoice.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\HtInvoiceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=HtInvoiceRepository::class)
  9.  */
  10. class HtInvoice
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="integer")
  20.      * Número identificador de la factura
  21.      */
  22.     private $idNum;
  23.     /**
  24.      * @ORM\Column(type="string", length=3, nullable=true)
  25.      * Prefijo para la línea de facturación
  26.      */
  27.     private $prefix;
  28.     /**
  29.      * @ORM\Column(type="datetime_immutable")
  30.      */
  31.     private $dateAt;
  32.     /**
  33.      * @ORM\Column(type="string", length=50)
  34.      */
  35.     private $type;
  36.     /**
  37.      * @ORM\Column(type="float")
  38.      */
  39.     private $totalNet;
  40.     /**
  41.      * @ORM\Column(type="string", length=255)
  42.      */
  43.     private $vatTotalGroup;
  44.     /**
  45.      * @ORM\Column(type="float")
  46.      */
  47.     private $total;
  48.     /**
  49.      * @ORM\Column(type="string", length=255)
  50.      */
  51.     private $clientName;
  52.     /**
  53.      * @ORM\Column(type="string", length=255)
  54.      */
  55.     private $clientAddress;
  56.     /**
  57.      * @ORM\Column(type="string", length=50)
  58.      */
  59.     private $clientDocument;
  60.     /**
  61.      * @ORM\Column(type="string", length=50)
  62.      */
  63.     private $clientType;
  64.     /**
  65.      * @ORM\Column(type="float")
  66.      */
  67.     private $benefit;
  68.     /**
  69.      * @ORM\OneToMany(targetEntity=HtInvoiceItems::class, mappedBy="invoice", orphanRemoval=true)
  70.      */
  71.     private $htInvoiceItems;
  72.     /**
  73.      * @ORM\ManyToOne(targetEntity=HtFile::class, inversedBy="htInvoices")
  74.      * @ORM\JoinColumn(nullable=false)
  75.      */
  76.     private $htFile;
  77.     /**
  78.      * @ORM\Column(type="string", length=20, nullable=true)
  79.      * Id en la tabla de la factura que rectifica.
  80.      */
  81.     private $invoiceToRec;
  82.     public function __construct()
  83.     {
  84.         $this->htInvoiceItems = new ArrayCollection();
  85.     }
  86.     public function getId(): ?int
  87.     {
  88.         return $this->id;
  89.     }
  90.     public function getIdNum(): ?int
  91.     {
  92.         return $this->idNum;
  93.     }
  94.     public function setIdNum(int $idNum): self
  95.     {
  96.         $this->idNum $idNum;
  97.         return $this;
  98.     }
  99.     public function getPrefix(): ?string
  100.     {
  101.         return $this->prefix;
  102.     }
  103.     public function setPrefix(?string $prefix): self
  104.     {
  105.         $this->prefix $prefix;
  106.         return $this;
  107.     }
  108.     public function getDateAt(): ?\DateTimeImmutable
  109.     {
  110.         return $this->dateAt;
  111.     }
  112.     public function setDateAt(\DateTimeImmutable $dateAt): self
  113.     {
  114.         $this->dateAt $dateAt;
  115.         return $this;
  116.     }
  117.     public function getType(): ?string
  118.     {
  119.         return $this->type;
  120.     }
  121.     public function setType(string $type): self
  122.     {
  123.         $this->type $type;
  124.         return $this;
  125.     }
  126.     public function getTotalNet(): ?float
  127.     {
  128.         return $this->totalNet;
  129.     }
  130.     public function setTotalNet(float $totalNet): self
  131.     {
  132.         $this->totalNet $totalNet;
  133.         return $this;
  134.     }
  135. //    public function getVatTotalGroup(): ?array
  136. //    {
  137. //        return $this->vatTotalGroup;
  138. //    }
  139. //
  140. //    public function setVatTotalGroup(array $vatTotalGroup): self
  141. //    {
  142. //        $this->vatTotalGroup = $vatTotalGroup;
  143. //
  144. //        return $this;
  145. //    }
  146.     public function getVatTotalGroup(): ?string
  147.     {
  148.         return $this->vatTotalGroup;
  149.     }
  150.     public function setVatTotalGroup(string $vatTotalGroup): self
  151.     {
  152.         $this->vatTotalGroup $vatTotalGroup;
  153.         return $this;
  154.     }
  155.     public function getTotal(): ?float
  156.     {
  157.         return $this->total;
  158.     }
  159.     public function setTotal(float $total): self
  160.     {
  161.         $this->total $total;
  162.         return $this;
  163.     }
  164.     public function getClientName(): ?string
  165.     {
  166.         return $this->clientName;
  167.     }
  168.     public function setClientName(string $clientName): self
  169.     {
  170.         $this->clientName $clientName;
  171.         return $this;
  172.     }
  173.     public function getClientAddress(): ?string
  174.     {
  175.         return $this->clientAddress;
  176.     }
  177.     public function setClientAddress(string $clientAddress): self
  178.     {
  179.         $this->clientAddress $clientAddress;
  180.         return $this;
  181.     }
  182.     public function getClientDocument(): ?string
  183.     {
  184.         return $this->clientDocument;
  185.     }
  186.     public function setClientDocument(string $clientDocument): self
  187.     {
  188.         $this->clientDocument $clientDocument;
  189.         return $this;
  190.     }
  191.     public function getClientType(): ?string
  192.     {
  193.         return $this->clientType;
  194.     }
  195.     public function setClientType(string $clientType): self
  196.     {
  197.         $this->clientType $clientType;
  198.         return $this;
  199.     }
  200.     public function getBenefit(): ?float
  201.     {
  202.         return $this->benefit;
  203.     }
  204.     public function setBenefit(float $benefit): self
  205.     {
  206.         $this->benefit $benefit;
  207.         return $this;
  208.     }
  209.     /**
  210.      * @return Collection<int, HtInvoiceItems>
  211.      */
  212.     public function getHtInvoiceItems(): Collection
  213.     {
  214.         return $this->htInvoiceItems;
  215.     }
  216.     public function addHtInvoiceItem(HtInvoiceItems $htInvoiceItem): self
  217.     {
  218.         if (!$this->htInvoiceItems->contains($htInvoiceItem)) {
  219.             $this->htInvoiceItems[] = $htInvoiceItem;
  220.             $htInvoiceItem->setInvoice($this);
  221.         }
  222.         return $this;
  223.     }
  224.     public function removeHtInvoiceItem(HtInvoiceItems $htInvoiceItem): self
  225.     {
  226.         if ($this->htInvoiceItems->removeElement($htInvoiceItem)) {
  227.             // set the owning side to null (unless already changed)
  228.             if ($htInvoiceItem->getInvoice() === $this) {
  229.                 $htInvoiceItem->setInvoice(null);
  230.             }
  231.         }
  232.         return $this;
  233.     }
  234.     public function getHtFile(): ?HtFile
  235.     {
  236.         return $this->htFile;
  237.     }
  238.     public function setHtFile(?HtFile $htFile): self
  239.     {
  240.         $this->htFile $htFile;
  241.         return $this;
  242.     }
  243.     public function getInvoiceToRec(): ?string
  244.     {
  245.         return $this->invoiceToRec;
  246.     }
  247.     public function setInvoiceToRec(?string $invoiceToRec): self
  248.     {
  249.         $this->invoiceToRec $invoiceToRec;
  250.         return $this;
  251.     }
  252. }