src/MDS/VenuesBundle/Entity/ReservationInvoice.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\MDS\VenuesBundle\Entity;
  3. use App\Entity\DeliveryNote;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * ReservationInvoice
  7.  *
  8.  * @ORM\Table(name="reservation_invoice")
  9.  * @ORM\Entity(repositoryClass="App\MDS\VenuesBundle\Repository\ReservationInvoiceRepository")
  10.  */
  11. class ReservationInvoice
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var string
  23.      *
  24.      * @ORM\Column(name="master", type="string", length=255)
  25.      */
  26.     private $master 'master';
  27.     /**
  28.      * @var string
  29.      *
  30.      * @ORM\Column(name="number", type="string", length=255)
  31.      */
  32.     private $number;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(name="prefix", type="string", length=255, nullable=true)
  37.      */
  38.     private $prefix;
  39.     /**
  40.      * @var \DateTime
  41.      *
  42.      * @ORM\Column(name="dateAt", type="datetime")
  43.      */
  44.     private $dateAt;
  45.     /**
  46.      * @var string
  47.      *
  48.      * @ORM\Column(name="type", type="string", length=255)
  49.      */
  50.     private $type;
  51.     /**
  52.      * @var int
  53.      *
  54.      * @ORM\Column(name="reservationId", type="integer")
  55.      */
  56.     private $reservationId;
  57.     /**
  58.      * @var string
  59.      *
  60.      * @ORM\Column(name="totalNet", type="string", length=255)
  61.      */
  62.     private $totalNet;
  63.     /**
  64.      * @var string
  65.      *
  66.      * @ORM\Column(name="vat", type="text", nullable=true)
  67.      */
  68.     private $vat;
  69.     /**
  70.      * @var string
  71.      *
  72.      * @ORM\Column(name="total", type="string", length=255, nullable=true)
  73.      */
  74.     private $total;
  75.     /**
  76.      * @var string
  77.      *
  78.      * @ORM\Column(name="balance", type="string", length=255, nullable=true)
  79.      */
  80.     private $balance;
  81.     /**
  82.      * @var \DateTime
  83.      *
  84.      * @ORM\Column(name="createdAt", type="datetime")
  85.      */
  86.     private $createdAt;
  87.     /**
  88.      * @var int
  89.      *
  90.      * @ORM\Column(name="createdId", type="integer")
  91.      */
  92.     private $createdId;
  93.     /**
  94.      * @var \DateTime
  95.      *
  96.      * @ORM\Column(name="updatedAt", type="datetime")
  97.      */
  98.     private $updatedAt;
  99.     /**
  100.      * @var int
  101.      *
  102.      * @ORM\Column(name="updatedId", type="integer")
  103.      */
  104.     private $updatedId;
  105.     /**
  106.      * @var string
  107.      *
  108.      * @ORM\Column(name="client_name", type="string", length=255, nullable=true)
  109.      * Nombre del cliente
  110.      */
  111.     private $clientName;
  112.     /**
  113.      * @var string
  114.      *
  115.      * @ORM\Column(name="client_address", type="string", length=255, nullable=true)
  116.      * Direccion del cliente
  117.      */
  118.     private $clientAddress;
  119.     /**
  120.      * @var string
  121.      *
  122.      * @ORM\Column(name="client_document", type="string", length=255, nullable=true)
  123.      * NIF o CIF del cliente
  124.      */
  125.     private $clientDocument;
  126.     /**
  127.      * @var string
  128.      *
  129.      * @ORM\Column(name="client_type", type="string", length=255, nullable=true)
  130.      * Tipo de cliente (cliente o proveedor). Usado para emitir facturas de comision a los proveedores
  131.      */
  132.     private $clientType;
  133.     /**
  134.      * @ORM\OneToOne(targetEntity=DeliveryNote::class, mappedBy="reservationInvoice", cascade={"persist", "remove"})
  135.      */
  136.     private $deliveryNote;
  137.     /**
  138.      * @ORM\OneToOne(
  139.      *   targetEntity="App\MDS\VenuesBundle\Entity\ReservationProformaDeposit",
  140.      *   mappedBy="invoice"
  141.      * )
  142.      */
  143.     private $proformaDeposit;
  144.     /**
  145.      * Get id
  146.      *
  147.      * @return int
  148.      */
  149.     public function getId()
  150.     {
  151.         return $this->id;
  152.     }
  153.     /**
  154.      * Set number
  155.      *
  156.      * @param string $number
  157.      *
  158.      * @return ReservationInvoice
  159.      */
  160.     public function setNumber($number)
  161.     {
  162.         $this->number $number;
  163.         return $this;
  164.     }
  165.     /**
  166.      * Get number
  167.      *
  168.      * @return string
  169.      */
  170.     public function getNumber()
  171.     {
  172.         return $this->number;
  173.     }
  174.     /**
  175.      * Set prefix
  176.      *
  177.      * @param string $prefix
  178.      *
  179.      * @return ReservationInvoice
  180.      */
  181.     public function setPrefix($prefix)
  182.     {
  183.         $this->prefix $prefix;
  184.         return $this;
  185.     }
  186.     /**
  187.      * Get prefix
  188.      *
  189.      * @return string
  190.      */
  191.     public function getPrefix()
  192.     {
  193.         return $this->prefix;
  194.     }
  195.     /**
  196.      * Set dateAt
  197.      *
  198.      * @param \DateTime $dateAt
  199.      *
  200.      * @return ReservationInvoice
  201.      */
  202.     public function setDateAt($dateAt)
  203.     {
  204.         $this->dateAt $dateAt;
  205.         return $this;
  206.     }
  207.     /**
  208.      * Get dateAt
  209.      *
  210.      * @return \DateTime
  211.      */
  212.     public function getDateAt()
  213.     {
  214.         return $this->dateAt;
  215.     }
  216.     /**
  217.      * Set type
  218.      *
  219.      * @param string $type
  220.      *
  221.      * @return ReservationInvoice
  222.      */
  223.     public function setType($type)
  224.     {
  225.         $this->type $type;
  226.         return $this;
  227.     }
  228.     /**
  229.      * Get type
  230.      *
  231.      * @return string
  232.      */
  233.     public function getType()
  234.     {
  235.         return $this->type;
  236.     }
  237.     /**
  238.      * Set reservationId
  239.      *
  240.      * @param integer $reservationId
  241.      *
  242.      * @return ReservationInvoice
  243.      */
  244.     public function setReservationId($reservationId)
  245.     {
  246.         $this->reservationId $reservationId;
  247.         return $this;
  248.     }
  249.     /**
  250.      * Get reservationId
  251.      *
  252.      * @return int
  253.      */
  254.     public function getReservationId()
  255.     {
  256.         return $this->reservationId;
  257.     }
  258.     /**
  259.      * Set totalNet
  260.      *
  261.      * @param string $totalNet
  262.      *
  263.      * @return ReservationInvoice
  264.      */
  265.     public function setTotalNet($totalNet)
  266.     {
  267.         $this->totalNet $totalNet;
  268.         return $this;
  269.     }
  270.     /**
  271.      * Get totalNet
  272.      *
  273.      * @return string
  274.      */
  275.     public function getTotalNet()
  276.     {
  277.         return $this->totalNet;
  278.     }
  279.     /**
  280.      * Set vat
  281.      *
  282.      * @param string $vat
  283.      *
  284.      * @return ReservationInvoice
  285.      */
  286.     public function setVat($vat)
  287.     {
  288.         $this->vat $vat;
  289.         return $this;
  290.     }
  291.     /**
  292.      * Get vat
  293.      *
  294.      * @return string
  295.      */
  296.     public function getVat()
  297.     {
  298.         return $this->vat;
  299.     }
  300.     /**
  301.      * Set total
  302.      *
  303.      * @param string $total
  304.      *
  305.      * @return ReservationInvoice
  306.      */
  307.     public function setTotal($total)
  308.     {
  309.         $this->total $total;
  310.         return $this;
  311.     }
  312.     /**
  313.      * Get total
  314.      *
  315.      * @return string
  316.      */
  317.     public function getTotal()
  318.     {
  319.         return $this->total;
  320.     }
  321.     /**
  322.      * Set createdAt
  323.      *
  324.      * @param \DateTime $createdAt
  325.      *
  326.      * @return ReservationInvoice
  327.      */
  328.     public function setCreatedAt($createdAt)
  329.     {
  330.         $this->createdAt $createdAt;
  331.         return $this;
  332.     }
  333.     /**
  334.      * Get createdAt
  335.      *
  336.      * @return \DateTime
  337.      */
  338.     public function getCreatedAt()
  339.     {
  340.         return $this->createdAt;
  341.     }
  342.     /**
  343.      * Set createdId
  344.      *
  345.      * @param integer $createdId
  346.      *
  347.      * @return ReservationInvoice
  348.      */
  349.     public function setCreatedId($createdId)
  350.     {
  351.         $this->createdId $createdId;
  352.         return $this;
  353.     }
  354.     /**
  355.      * Get createdId
  356.      *
  357.      * @return int
  358.      */
  359.     public function getCreatedId()
  360.     {
  361.         return $this->createdId;
  362.     }
  363.     /**
  364.      * Set updatedAt
  365.      *
  366.      * @param \DateTime $updatedAt
  367.      *
  368.      * @return ReservationInvoice
  369.      */
  370.     public function setUpdatedAt($updatedAt)
  371.     {
  372.         $this->updatedAt $updatedAt;
  373.         return $this;
  374.     }
  375.     /**
  376.      * Get updatedAt
  377.      *
  378.      * @return \DateTime
  379.      */
  380.     public function getUpdatedAt()
  381.     {
  382.         return $this->updatedAt;
  383.     }
  384.     /**
  385.      * Set updatedId
  386.      *
  387.      * @param integer $updatedId
  388.      *
  389.      * @return ReservationInvoice
  390.      */
  391.     public function setUpdatedId($updatedId)
  392.     {
  393.         $this->updatedId $updatedId;
  394.         return $this;
  395.     }
  396.     /**
  397.      * Get updatedId
  398.      *
  399.      * @return int
  400.      */
  401.     public function getUpdatedId()
  402.     {
  403.         return $this->updatedId;
  404.     }
  405.     /**
  406.      * Set master
  407.      *
  408.      * @param string $master
  409.      *
  410.      * @return ReservationInvoice
  411.      */
  412.     public function setMaster($master)
  413.     {
  414.         $this->master $master;
  415.         return $this;
  416.     }
  417.     /**
  418.      * Get master
  419.      *
  420.      * @return string
  421.      */
  422.     public function getMaster()
  423.     {
  424.         return $this->master;
  425.     }
  426.     /**
  427.      * Set balance
  428.      *
  429.      * @param string $balance
  430.      *
  431.      * @return ReservationInvoice
  432.      */
  433.     public function setBalance($balance)
  434.     {
  435.         $this->balance $balance;
  436.         return $this;
  437.     }
  438.     /**
  439.      * Get balance
  440.      *
  441.      * @return string
  442.      */
  443.     public function getBalance()
  444.     {
  445.         return $this->balance;
  446.     }
  447.     /**
  448.      * Set clientName
  449.      *
  450.      * @param string $clientName
  451.      *
  452.      * @return ReservationInvoice
  453.      */
  454.     public function setClientName($clientName)
  455.     {
  456.         $this->clientName $clientName;
  457.         return $this;
  458.     }
  459.     /**
  460.      * Get clientName
  461.      *
  462.      * @return string
  463.      */
  464.     public function getClientName()
  465.     {
  466.         return $this->clientName;
  467.     }
  468.     /**
  469.      * Set clientAddress
  470.      *
  471.      * @param string $clientAddress
  472.      *
  473.      * @return ReservationInvoice
  474.      */
  475.     public function setClientAddress($clientAddress)
  476.     {
  477.         $this->clientAddress $clientAddress;
  478.         return $this;
  479.     }
  480.     /**
  481.      * Get clientAddress
  482.      *
  483.      * @return string
  484.      */
  485.     public function getClientAddress()
  486.     {
  487.         return $this->clientAddress;
  488.     }
  489.     /**
  490.      * Set clientDocument
  491.      *
  492.      * @param string $clientDocument
  493.      *
  494.      * @return ReservationInvoice
  495.      */
  496.     public function setClientDocument($clientDocument)
  497.     {
  498.         $this->clientDocument $clientDocument;
  499.         return $this;
  500.     }
  501.     /**
  502.      * Get clientDocument
  503.      *
  504.      * @return string
  505.      */
  506.     public function getClientDocument()
  507.     {
  508.         return $this->clientDocument;
  509.     }
  510.     /**
  511.      * Set clientType
  512.      *
  513.      * @param string $clientType
  514.      *
  515.      * @return ReservationInvoice
  516.      */
  517.     public function setClientType($clientType)
  518.     {
  519.         $this->clientType $clientType;
  520.         return $this;
  521.     }
  522.     /**
  523.      * Get clientType
  524.      *
  525.      * @return string
  526.      */
  527.     public function getClientType()
  528.     {
  529.         return $this->clientType;
  530.     }
  531.     public function getDeliveryNote(): ?DeliveryNote
  532.     {
  533.         return $this->deliveryNote;
  534.     }
  535.     public function setDeliveryNote(DeliveryNote $deliveryNote): self
  536.     {
  537.         // set the owning side of the relation if necessary
  538.         if ($deliveryNote->getReservationInvoice() !== $this) {
  539.             $deliveryNote->setReservationInvoice($this);
  540.         }
  541.         $this->deliveryNote $deliveryNote;
  542.         return $this;
  543.     }
  544.     public function getProformaDeposit(): ?ReservationProformaDeposit
  545.     {
  546.         return $this->proformaDeposit;
  547.     }
  548.     public function setProformaDeposit(?ReservationProformaDeposit $proformaDeposit): self
  549.     {
  550.         $this->proformaDeposit $proformaDeposit;
  551.         // Sincroniza el owning side
  552.         if ($proformaDeposit && $proformaDeposit->getInvoice() !== $this) {
  553.             $proformaDeposit->setInvoice($this);
  554.         }
  555.         return $this;
  556.     }
  557. }