PHP Class Sonata\InvoiceBundle\Entity\BaseInvoiceElement

Inheritance: implements Sonata\Component\Invoice\InvoiceElementInterface
Show file Open project: sonata-project/ecommerce

Protected Properties

Property Type Description
$description string
$designation string
$invoice Sonata\Component\Invoice\InvoiceInterface
$orderElement OrderElement
$price float
$quantity integer
$total float
$unitPriceExcl float
$unitPriceInc float
$vatRate float

Public Methods

Method Description
getDescription ( ) : string Get description.
getDesignation ( ) : string Get designation.
getInvoice ( ) : integer Get invoiceId.
getOrderElement ( ) : Sonata\Component\Order\OrderElementInterface Get orderElement.
getPrice ( $vat = false )
getQuantity ( )
getTotal ( boolean $vat = true ) : float Get total.
getUnitPrice ( $vat = false )
getUnitPriceExcl ( )
getUnitPriceInc ( )
getVatAmount ( ) : float Returns VAT element amount.
getVatRate ( )
setDescription ( $description ) Set description.
setDesignation ( string $designation ) Set designation.
setInvoice ( Sonata\Component\Invoice\InvoiceInterface $invoice ) Set invoiceId.
setOrderElement ( Sonata\Component\Order\OrderElementInterface $orderElement ) Set orderElement.
setPrice ( $price )
setQuantity ( $quantity )
setTotal ( float $total ) Set total.
setUnitPriceExcl ( $unitPriceExcl )
setUnitPriceInc ( $unitPriceInc )
setVatRate ( $vatRate )

Method Details

getDescription() public method

Get description.
public getDescription ( ) : string
return string $description

getDesignation() public method

Get designation.
public getDesignation ( ) : string
return string $designation

getInvoice() public method

Get invoiceId.
public getInvoice ( ) : integer
return integer $invoiceId

getOrderElement() public method

Get orderElement.
public getOrderElement ( ) : Sonata\Component\Order\OrderElementInterface
return Sonata\Component\Order\OrderElementInterface $orderElement

getPrice() public method

public getPrice ( $vat = false )

getQuantity() public method

public getQuantity ( )

getTotal() public method

Get total.
public getTotal ( boolean $vat = true ) : float
$vat boolean
return float $total

getUnitPrice() public method

public getUnitPrice ( $vat = false )

getUnitPriceExcl() public method

public getUnitPriceExcl ( )

getUnitPriceInc() public method

public getUnitPriceInc ( )

getVatAmount() public method

Returns VAT element amount.
public getVatAmount ( ) : float
return float

getVatRate() public method

public getVatRate ( )

setDescription() public method

string $description
public setDescription ( $description )

setDesignation() public method

Set designation.
public setDesignation ( string $designation )
$designation string

setInvoice() public method

Set invoiceId.
public setInvoice ( Sonata\Component\Invoice\InvoiceInterface $invoice )
$invoice Sonata\Component\Invoice\InvoiceInterface

setOrderElement() public method

Set orderElement.
public setOrderElement ( Sonata\Component\Order\OrderElementInterface $orderElement )
$orderElement Sonata\Component\Order\OrderElementInterface

setPrice() public method

public setPrice ( $price )

setQuantity() public method

public setQuantity ( $quantity )

setTotal() public method

Set total.
public setTotal ( float $total )
$total float

setUnitPriceExcl() public method

public setUnitPriceExcl ( $unitPriceExcl )

setUnitPriceInc() public method

public setUnitPriceInc ( $unitPriceInc )

setVatRate() public method

public setVatRate ( $vatRate )

Property Details

$description protected property

protected string $description
return string

$designation protected property

protected string $designation
return string

$invoice protected property

protected InvoiceInterface,Sonata\Component\Invoice $invoice
return Sonata\Component\Invoice\InvoiceInterface

$orderElement protected property

protected OrderElement $orderElement
return OrderElement

$price protected property

protected float $price
return float

$quantity protected property

protected int $quantity
return integer

$total protected property

protected float $total
return float

$unitPriceExcl protected property

protected float $unitPriceExcl
return float

$unitPriceInc protected property

protected float $unitPriceInc
return float

$vatRate protected property

protected float $vatRate
return float