<?php

namespace RxConnexionBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use RxConnexionBundle\Entity\Base\BaseEntity;

/**
 * @ORM\Entity(repositoryClass="RxConnexionBundle\Repository\ItemTaxCodeRepository")
 * @ORM\Table(name="item_tax_code")
 */

class ItemTaxCodeEntity extends BaseEntity
{
    /**
     * @ORM\Column(name="percent", type="decimal", precision=12, scale=2)
     */
    protected $percent;

    /**
     * @ORM\ManyToOne(targetEntity="ItemEntity", inversedBy="itemTaxCodes")
     * @ORM\JoinColumn(name="item_id", referencedColumnName="id")
     */
    protected $item;

    /**
     * @ORM\ManyToOne(targetEntity="RxConnexionBundle\Entity\HealthFacilityEntity", inversedBy="itemTaxCodes")
     * @ORM\JoinColumn(name="health_facility_id", referencedColumnName="id")
     */
    protected $healthFacility;


    /*--------------------------------------------------------------------------------------------------------*/
    /*					User Defined Setters and Getters													  */
    /*--------------------------------------------------------------------------------------------------------*/


    /*--------------------------------------------------------------------------------------------------------*/
    /*					Setters and Getters																	  */
    /*--------------------------------------------------------------------------------------------------------*/



    /**
     * Set percent
     *
     * @param string $percent
     *
     * @return ItemTaxCodeEntity
     */
    public function setPercent($percent)
    {
        $this->percent = $percent;

        return $this;
    }

    /**
     * Get percent
     *
     * @return string
     */
    public function getPercent()
    {
        return $this->percent;
    }

    /**
     * Set item
     *
     * @param \RxConnexionBundle\Entity\ItemEntity $item
     *
     * @return ItemTaxCodeEntity
     */
    public function setItem(\RxConnexionBundle\Entity\ItemEntity $item = null)
    {
        $this->item = $item;

        return $this;
    }

    /**
     * Get item
     *
     * @return \RxConnexionBundle\Entity\ItemEntity
     */
    public function getItem()
    {
        return $this->item;
    }

    /**
     * Set branch
     *
     * @param \RxConnexionBundle\Entity\BranchEntity $branch
     *
     * @return ItemTaxCodeEntity
     */
    public function setBranch(\RxConnexionBundle\Entity\BranchEntity $branch = null)
    {
        $this->branch = $branch;

        return $this;
    }

    /**
     * Get branch
     *
     * @return \RxConnexionBundle\Entity\BranchEntity
     */
    public function getBranch()
    {
        return $this->branch;
    }

    /**
     * Set healthFacility
     *
     * @param \RxConnexionBundle\Entity\HealthFacilityEntity $healthFacility
     *
     * @return ItemTaxCodeEntity
     */
    public function setHealthFacility(\RxConnexionBundle\Entity\HealthFacilityEntity $healthFacility = null)
    {
        $this->healthFacility = $healthFacility;

        return $this;
    }

    /**
     * Get healthFacility
     *
     * @return \RxConnexionBundle\Entity\HealthFacilityEntity
     */
    public function getHealthFacility()
    {
        return $this->healthFacility;
    }
}
