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)
  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.     /**
  83.      * @ORM\OneToOne(targetEntity=DeliveryNote::class, mappedBy="htInvoice")
  84.      */
  85.     private $deliveryNote;
  86.     public function __construct()
  87.     {
  88.         $this->htInvoiceItems = new ArrayCollection();
  89.     }
  90.     public function getId(): ?int
  91.     {
  92.         return $this->id;
  93.     }
  94.     public function getIdNum(): ?int
  95.     {
  96.         return $this->idNum;
  97.     }
  98.     public function setIdNum(int $idNum): self
  99.     {
  100.         $this->idNum $idNum;
  101.         return $this;
  102.     }
  103.     public function getPrefix(): ?string
  104.     {
  105.         return $this->prefix;
  106.     }
  107.     public function setPrefix(?string $prefix): self
  108.     {
  109.         $this->prefix $prefix;
  110.         return $this;
  111.     }
  112.     public function getDateAt(): ?\DateTimeImmutable
  113.     {
  114.         return $this->dateAt;
  115.     }
  116.     public function setDateAt(\DateTimeImmutable $dateAt): self
  117.     {
  118.         $this->dateAt $dateAt;
  119.         return $this;
  120.     }
  121.     public function getType(): ?string
  122.     {
  123.         return $this->type;
  124.     }
  125.     public function setType(string $type): self
  126.     {
  127.         $this->type $type;
  128.         return $this;
  129.     }
  130.     public function getTotalNet(): ?float
  131.     {
  132.         return $this->totalNet;
  133.     }
  134.     public function setTotalNet(float $totalNet): self
  135.     {
  136.         $this->totalNet $totalNet;
  137.         return $this;
  138.     }
  139. //    public function getVatTotalGroup(): ?array
  140. //    {
  141. //        return $this->vatTotalGroup;
  142. //    }
  143. //
  144. //    public function setVatTotalGroup(array $vatTotalGroup): self
  145. //    {
  146. //        $this->vatTotalGroup = $vatTotalGroup;
  147. //
  148. //        return $this;
  149. //    }
  150.     public function getVatTotalGroup(): ?string
  151.     {
  152.         return $this->vatTotalGroup;
  153.     }
  154.     public function setVatTotalGroup(string $vatTotalGroup): self
  155.     {
  156.         $this->vatTotalGroup $vatTotalGroup;
  157.         return $this;
  158.     }
  159.     public function getTotal(): ?float
  160.     {
  161.         return $this->total;
  162.     }
  163.     public function setTotal(float $total): self
  164.     {
  165.         $this->total $total;
  166.         return $this;
  167.     }
  168.     public function getClientName(): ?string
  169.     {
  170.         return $this->clientName;
  171.     }
  172.     public function setClientName(string $clientName): self
  173.     {
  174.         $this->clientName $clientName;
  175.         return $this;
  176.     }
  177.     public function getClientAddress(): ?string
  178.     {
  179.         return $this->clientAddress;
  180.     }
  181.     public function setClientAddress(string $clientAddress): self
  182.     {
  183.         $this->clientAddress $clientAddress;
  184.         return $this;
  185.     }
  186.     public function getClientDocument(): ?string
  187.     {
  188.         return $this->clientDocument;
  189.     }
  190.     public function setClientDocument(string $clientDocument): self
  191.     {
  192.         $this->clientDocument $clientDocument;
  193.         return $this;
  194.     }
  195.     public function getClientType(): ?string
  196.     {
  197.         return $this->clientType;
  198.     }
  199.     public function setClientType(string $clientType): self
  200.     {
  201.         $this->clientType $clientType;
  202.         return $this;
  203.     }
  204.     public function getBenefit(): ?float
  205.     {
  206.         return $this->benefit;
  207.     }
  208.     public function setBenefit(float $benefit): self
  209.     {
  210.         $this->benefit $benefit;
  211.         return $this;
  212.     }
  213.     /**
  214.      * @return Collection<int, HtInvoiceItems>
  215.      */
  216.     public function getHtInvoiceItems(): Collection
  217.     {
  218.         return $this->htInvoiceItems;
  219.     }
  220.     public function addHtInvoiceItem(HtInvoiceItems $htInvoiceItem): self
  221.     {
  222.         if (!$this->htInvoiceItems->contains($htInvoiceItem)) {
  223.             $this->htInvoiceItems[] = $htInvoiceItem;
  224.             $htInvoiceItem->setInvoice($this);
  225.         }
  226.         return $this;
  227.     }
  228.     public function removeHtInvoiceItem(HtInvoiceItems $htInvoiceItem): self
  229.     {
  230.         if ($this->htInvoiceItems->removeElement($htInvoiceItem)) {
  231.             // set the owning side to null (unless already changed)
  232.             if ($htInvoiceItem->getInvoice() === $this) {
  233.                 $htInvoiceItem->setInvoice(null);
  234.             }
  235.         }
  236.         return $this;
  237.     }
  238.     public function getHtFile(): ?HtFile
  239.     {
  240.         return $this->htFile;
  241.     }
  242.     public function setHtFile(?HtFile $htFile): self
  243.     {
  244.         $this->htFile $htFile;
  245.         return $this;
  246.     }
  247.     public function getInvoiceToRec(): ?string
  248.     {
  249.         return $this->invoiceToRec;
  250.     }   
  251.     public function setInvoiceToRec(?string $invoiceToRec): self
  252.     {
  253.         $this->invoiceToRec $invoiceToRec;
  254.         return $this;
  255.     }
  256.     public function getDeliveryNote(): ?DeliveryNote
  257.     {
  258.         return $this->deliveryNote;
  259.     }
  260.     public function setDeliveryNote(?DeliveryNote $deliveryNote): self
  261.     {
  262.         $this->deliveryNote $deliveryNote;
  263.         return $this;
  264.     }
  265. }