ReceiveLine
in package
FinalYes
One line of a receipt.
Value object, not a DI service (the *DTO* folder is excluded from DI scanning).
unitPrice is a decimal string in currencyId (the delivery currency). When unitPrice
is null the line is a stock return: the created batch is priced at the stock item's current
average (falling back to the last price), and the item average is not recomputed from a
batch without a price. When currencyId is null the base currency is assumed.
batchNumber and expirationDate are optional per line.
Table of Contents
Properties
- $batchNumber : string|null
- $currencyId : int|null
- $expirationDate : string|null
- $quantity : string
- $stockItemId : int
- $unitPrice : string|null
Methods
- __construct() : mixed
Properties
$batchNumber read-only
public
string|null
$batchNumber
= null
$currencyId read-only
public
int|null
$currencyId
= null
$expirationDate read-only
public
string|null
$expirationDate
= null
$quantity read-only
public
string
$quantity
$stockItemId read-only
public
int
$stockItemId
$unitPrice read-only
public
string|null
$unitPrice
= null
Methods
__construct()
public
__construct(int $stockItemId, string $quantity[, string|null $unitPrice = null ][, int|null $currencyId = null ][, string|null $batchNumber = null ][, string|null $expirationDate = null ]) : mixed
Parameters
- $stockItemId : int
- $quantity : string
- $unitPrice : string|null = null
- $currencyId : int|null = null
- $batchNumber : string|null = null
- $expirationDate : string|null = null