<?php

namespace VGM\WOBundle\Entity;

/**
 * InvoiceReference
 */
class InvoiceReference
{
    /**
     * @var integer
     */
    private $id;
    /**
     * @var string
     */
    private $number;
    /**
     * @var string
     */
    private $status;
    /**
     * @var \DateTime
     */
    private $date;
    /**
     * @var float
     */
    private $amount = 0;
    /**
     * @var integer
     */
    private $items = 1;
    /**
     * @var \DateTime
     */
    private $created_at;
    /**
     * @var \VGM\WOBundle\Entity\Client
     */
    private $bill_to;
    /**
     * @var \VGM\WOBundle\Entity\SaleType
     */
    private $purpose;
    /**
     * @var \VGM\WOBundle\Entity\WorkOrder
     */
    private $workorder;
    /**
     * @var \VGM\WOBundle\Entity\WorkOrderStockAssociation
     */
    private $wostock;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set number
     *
     * @param string $number
     *
     * @return InvoiceReference
     */
    public function setNumber($number)
    {
        $this->number = $number;

        return $this;
    }
    /**
     * Get number
     *
     * @return string
     */
    public function getNumber()
    {
        return $this->number;
    }
    /**
     * Set status
     *
     * @param string $status
     *
     * @return InvoiceReference
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }
    /**
     * Get status
     *
     * @return string
     */
    public function getStatus()
    {
        return $this->status;
    }
    /**
     * Set date
     *
     * @param \DateTime $date
     *
     * @return InvoiceReference
     */
    public function setDate($date)
    {
        $this->date = $date;

        return $this;
    }
    /**
     * Get date
     *
     * @return \DateTime
     */
    public function getDate()
    {
        return $this->date;
    }
    /**
     * Set amount
     *
     * @param float $amount
     *
     * @return InvoiceReference
     */
    public function setAmount($amount)
    {
        $this->amount = $amount;

        return $this;
    }
    /**
     * Get amount
     *
     * @return float
     */
    public function getAmount()
    {
        return $this->amount;
    }
    /**
     * Set billTo
     *
     * @param \VGM\WOBundle\Entity\Client $billTo
     *
     * @return InvoiceReference
     */
    public function setBillTo(\VGM\WOBundle\Entity\Client $billTo = null)
    {
        $this->bill_to = $billTo;

        return $this;
    }
    /**
     * Get billTo
     *
     * @return \VGM\WOBundle\Entity\Client
     */
    public function getBillTo()
    {
        return $this->bill_to;
    }
    /**
     * Set purpose
     *
     * @param \VGM\WOBundle\Entity\SaleType $purpose
     *
     * @return InvoiceReference
     */
    public function setPurpose(\VGM\WOBundle\Entity\SaleType $purpose = null)
    {
        $this->purpose = $purpose;

        return $this;
    }
    /**
     * Get purpose
     *
     * @return \VGM\WOBundle\Entity\SaleType
     */
    public function getPurpose()
    {
        return $this->purpose;
    }
    /**
     * Set workorder
     *
     * @param \VGM\WOBundle\Entity\WorkOrder $workorder
     *
     * @return InvoiceReference
     */
    public function setWorkorder(\VGM\WOBundle\Entity\WorkOrder $workorder = null)
    {
        $this->workorder = $workorder;

        return $this;
    }
    /**
     * Get workorder
     *
     * @return \VGM\WOBundle\Entity\WorkOrder
     */
    public function getWorkorder()
    {
        return $this->workorder;
    }
    /**
     * Set items
     *
     * @param integer $items
     *
     * @return InvoiceReference
     */
    public function setItems($items)
    {
        $this->items = $items;

        return $this;
    }
    /**
     * Get items
     *
     * @return integer
     */
    public function getItems()
    {
        return $this->items;
    }
    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     *
     * @return InvoiceReference
     */
    public function setCreatedAt($createdAt)
    {
        $this->created_at = $createdAt;

        return $this;
    }
    /**
     * Get createdAt
     *
     * @return \DateTime
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }
    /**
     * Set wostock
     *
     * @param \VGM\WOBundle\Entity\WorkOrderStockAssociation $wostock
     *
     * @return InvoiceReference
     */
    public function setWostock(\VGM\WOBundle\Entity\WorkOrderStockAssociation $wostock = null)
    {
        $this->wostock = $wostock;

        return $this;
    }
    /**
     * Get wostock
     *
     * @return \VGM\WOBundle\Entity\WorkOrderStockAssociation
     */
    public function getWostock()
    {
        return $this->wostock;
    }
    /**
     * @var integer
     */
    private $order_number = 1;
    /**
     * Set orderNumber
     *
     * @param integer $orderNumber
     *
     * @return InvoiceReference
     */
    public function setOrderNumber($orderNumber)
    {
        $this->order_number = $orderNumber;

        return $this;
    }
    /**
     * Get orderNumber
     *
     * @return integer
     */
    public function getOrderNumber()
    {
        return $this->order_number;
    }

    /**
     * @ORM\PrePersist
     */
    public function setCreatedAtValue()
    {
        $this->setCreatedAt(new \DateTime());
    }
}
