API reference / Quittio \ Core \ Data \ Lines
Price
final readonly class in quittio/core · uses Immutable
Quittio\Core\Data\Lines\Price · Source
Price details (BG-29). Prices may have more than two decimals.
Note: BT-148 "item gross price" is the list price before the price discount, not a price including VAT. Prices including VAT are an input for the gross price mode ($priceInclVat) and are converted by the calculator.
Properties#
| Property | Type | Description |
|---|---|---|
$baseQuantity readonly | ?Brick\Math\BigDecimal | |
$baseQuantityUnit readonly | UnitCode|RawCode|null | |
$discount readonly | ?Brick\Math\BigDecimal | |
$grossPrice readonly | ?Brick\Math\BigDecimal | |
$netPrice readonly | ?Brick\Math\BigDecimal | |
$priceInclVat readonly | ?Brick\Math\BigDecimal |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->isGrossMode() | |
->with() | Returns a copy with the given properties replaced. |
__construct()#
public function __construct(
?BigDecimal $netPrice,
?BigDecimal $discount = null,
?BigDecimal $grossPrice = null,
?BigDecimal $baseQuantity = null,
UnitCode|RawCode|null $baseQuantityUnit = null,
?BigDecimal $priceInclVat = null,
)| Parameter | Type | Description |
|---|---|---|
$netPrice | ?Brick\Math\BigDecimal | |
$discount | ?Brick\Math\BigDecimal = null | |
$grossPrice | ?Brick\Math\BigDecimal = null | |
$baseQuantity | ?Brick\Math\BigDecimal = null | |
$baseQuantityUnit | UnitCode|RawCode|null = null | |
$priceInclVat | ?Brick\Math\BigDecimal = null |
isGrossMode()#
public function isGrossMode(): bool- Returns
bool
with()#
public function with(array<string, mixed> $changes): staticReturns a copy with the given properties replaced.
| Parameter | Type | Description |
|---|---|---|
$changes | array<string, mixed> |
- Returns
static