RowPrice
in package
Implement row price object
This class provides general interfaces to handle row prices.
Tags
Table of Contents
- $_sum : array<string|int, mixed>|null
- Externally patched summary based on headlines
- $article : Article|null
- Buffer for article
- $head : array<string|int, mixed>|null
- A headline?
- $is_discount : bool
- $name : array<string|int, mixed>
- Buffer for name
- $row : array<string|int, mixed>
- Get the data storage
- $row_index : int
- $tax_rate_map : array<string|int, mixed>
- __construct() : mixed
- RowPrice constructor.
- Amount() : float
- Get amount Get the stored amount value
- Article() : Article|null
- Article object getter
- Extra() : string|null
- Get the row price extra data
- Headline() : array<string|int, mixed>|null|string
- Include a headline on the fly
- Id() : string
- Get the row id
- IsDiscount() : bool
- Name() : string|null
- Get the name of the row
- RowData() : mixed
- RowIndex() : int
- Sum() : array<string|int, mixed>|null
- Intermediate sum
- TaxRate() : float|int
- Get tax rate
- TaxType() : string
- Get the tax type
- Unit() : string
- ValueGross() : float|int|string
- Get the gross price
- ValueNet() : int|float|string
- Get the net price
- ValueTax() : float|int|string
- Get the tax price
Properties
$_sum
Externally patched summary based on headlines
private
array<string|int, mixed>|null
$_sum
= null
$article
Buffer for article
private
Article|null
$article
= null
$head
A headline?
private
array<string|int, mixed>|null
$head
$is_discount
private
bool
$is_discount
$name
Buffer for name
private
array<string|int, mixed>
$name
= array()
$row
Get the data storage
private
array<string|int, mixed>
$row
$row_index
private
int
$row_index
$tax_rate_map
private
array<string|int, mixed>
$tax_rate_map
= ['reduced' => 7, 'regular' => 19, 'none' => 0]
Methods
__construct()
RowPrice constructor.
public
__construct(array<string|int, mixed> $row[, BillServiceParent|null $service = null ][, Project|null $project = null ][, array<string|int, mixed>|null $head = null ], int $row_index[, bool $is_discount = false ]) : mixed
Parameters
- $row : array<string|int, mixed>
-
A row price object
- $service : BillServiceParent|null = null
-
A service object
- $project : Project|null = null
-
A project object
- $head : array<string|int, mixed>|null = null
-
Header row?
- $row_index : int
-
The index
- $is_discount : bool = false
Return values
mixed —Amount()
Get amount Get the stored amount value
public
Amount() : float
Return values
float —The entry amount
Article()
Article object getter
public
Article() : Article|null
Return values
Article|null —Extra()
Get the row price extra data
public
Extra() : string|null
Return values
string|null —Headline()
Include a headline on the fly
public
Headline([string|null $field = null ]) : array<string|int, mixed>|null|string
Parameters
- $field : string|null = null
Return values
array<string|int, mixed>|null|string —Id()
Get the row id
public
Id() : string
Return values
string —IsDiscount()
public
IsDiscount() : bool
Return values
bool —Name()
Get the name of the row
public
Name([string $lang = FAA_DEFAULT_LANGUAGE ]) : string|null
Parameters
- $lang : string = FAA_DEFAULT_LANGUAGE
Return values
string|null —RowData()
public
RowData(string $key) : mixed
Parameters
- $key : string
Return values
mixed —RowIndex()
public
RowIndex() : int
Return values
int —Sum()
Intermediate sum
public
Sum([array<string|int, mixed>|string|null $set = null ]) : array<string|int, mixed>|null
Parameters
- $set : array<string|int, mixed>|string|null = null
Return values
array<string|int, mixed>|null —TaxRate()
Get tax rate
public
TaxRate() : float|int
Return values
float|int —TaxType()
Get the tax type
public
TaxType() : string
Return values
string —Unit()
public
Unit() : string
Return values
string —ValueGross()
Get the gross price
public
ValueGross([bool $format = false ]) : float|int|string
Parameters
- $format : bool = false
Return values
float|int|string —ValueNet()
Get the net price
public
ValueNet([bool $format = false ][, bool $multiply = false ]) : int|float|string
Parameters
- $format : bool = false
- $multiply : bool = false
Return values
int|float|string —ValueTax()
Get the tax price
public
ValueTax([bool $format = false ]) : float|int|string
Parameters
- $format : bool = false