Method |
Description |
|
__construct ( ) |
Creates a new stock entry. A stock entry tracks how many parts
were the stockLevel is the amount of items added/removed,
by which user and how much the user paid for it (for adding parts only!). |
|
checkPrice ( ) |
If the stock level is negative, we can't have a price. |
|
getComment ( ) : string |
Returns the comment. |
|
getCorrection ( ) : boolean |
Returns if the entry is a correction entry. |
|
getDateTime ( ) : DateTime |
Returns the date+time when the record was created. |
|
getPart ( ) : Part |
Returns the part assigned to this entry. |
|
getPrice ( ) : float |
Returns the price for this entry. The price is for a single item only. |
|
getStockLevel ( ) : integer |
Returns the stock level for this entry. |
|
getUser ( ) : User |
Returns the user for this entry. |
|
isRemoval ( ) : boolean |
Returns if the current stock entry is a removal. |
|
setComment ( string $comment ) |
Sets a comment. |
|
setCorrection ( $bCorrection ) |
Sets if the stock entry is a correction record. |
|
setPart ( Part $part = null ) |
Sets the part assigned to this entry. |
|
setPrice ( float $price ) |
Sets the price for the item stored. |
|
setStockLevel ( integer $stockLevel ) |
Sets the stock level for this entry. |
|
setUser ( User $user = null ) |
Sets the user assigned to this entry. |
|