<?php

namespace OfficeBrain\Bundle\QuoteBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * QuoteProductAdditionalCharges
 *
 * @ORM\Table("tbl_quote_product_additional_charges", options={"type"="InnoDB","charset"="utf8","collate"="utf8_unicode_ci"})
 * @ORM\Entity(repositoryClass="OfficeBrain\Bundle\QuoteBundle\Entity\QuoteProductAdditionalChargesRepository")
 */
class QuoteProductAdditionalCharges
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="bigint",length=20 ,options={"unsigned"=true})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer
     * @ORM\ManyToOne(targetEntity="QuoteItemLine", inversedBy="quoteProductAdditionalCharges")  
     * @ORM\JoinColumn(name="quote_item_line_id",referencedColumnName="id")
     *
     */
    private $quoteItemLineId;

    /**
     * @var string
     *
     * @ORM\Column(name="charges_type", type="string", length=255, nullable=true)
     */
    private $chargesType;

    /**
     * @var integer
     *
     * @ORM\Column(name="quantity", type="bigint",length=20 ,options={"unsigned"=true})
     */
    private $quantity;
    
    /**
     * @var string
     *
     * @ORM\Column(name="unit_charge", type="decimal",precision=11, scale=2, options={"default" = 0})
     */
    private $unitCharge;
    
    /**
     * @var string
     *
     * @ORM\Column(name="charges_amount", type="decimal",precision=11, scale=2, options={"default" = 0})
     */
    private $chargesAmount;
    
     /**
     * @var string
     *
     * @ORM\Column(name="erp_id", type="bigint", length=20, nullable=true)
     */
    private $erpId;
    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set chargesType
     *
     * @param string $chargesType
     *
     * @return QuoteProductAdditionalCharges
     */
    public function setChargesType($chargesType)
    {
        $this->chargesType = $chargesType;

        return $this;
    }

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

    /**
     * Set quantity
     *
     * @param integer $quantity
     *
     * @return QuoteProductAdditionalCharges
     */
    public function setQuantity($quantity)
    {
        $this->quantity = $quantity;

        return $this;
    }

    /**
     * Get quantity
     *
     * @return integer
     */
    public function getQuantity()
    {
        return $this->quantity;
    }

    /**
     * Set unitCharge
     *
     * @param string $unitCharge
     *
     * @return QuoteProductAdditionalCharges
     */
    public function setUnitCharge($unitCharge)
    {
        $this->unitCharge = $unitCharge;

        return $this;
    }

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

    /**
     * Set chargesAmount
     *
     * @param string $chargesAmount
     *
     * @return QuoteProductAdditionalCharges
     */
    public function setChargesAmount($chargesAmount)
    {
        $this->chargesAmount = $chargesAmount;

        return $this;
    }

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

    /**
     * Set quoteItemLineId
     *
     * @param \OfficeBrain\Bundle\QuoteBundle\Entity\QuoteItemLine $quoteItemLineId
     *
     * @return QuoteProductAdditionalCharges
     */
    public function setQuoteItemLineId(\OfficeBrain\Bundle\QuoteBundle\Entity\QuoteItemLine $quoteItemLineId = null)
    {
        $this->quoteItemLineId = $quoteItemLineId;

        return $this;
    }

/**
     * Get erpId
     *
     * @return integer
     */
    public function getErpId()
    {
        return $this->erpId;
    }

    /**
     * Set erpId
     * @return erpId
     */
    public function setErpId($erpId)
    {
        $this->erpId = $erpId;

        return $this;
    }
    /**
     * Get quoteItemLineId
     *
     * @return \OfficeBrain\Bundle\QuoteBundle\Entity\QuoteItemLine
     */
    public function getQuoteItemLineId()
    {
        return $this->quoteItemLineId;
    }
    
    public function setfieldMethod($fieldName, $fieldValue) {
    
    	$this->$fieldName = $fieldValue;
    
    	return  $this->$fieldName;
    }
}
