PHP 클래스 PartKeepr\StockBundle\Entity\StockEntry

상속: extends PartKeepr\CoreBundle\Entity\BaseEntity
파일 보기 프로젝트 열기: partkeepr/PartKeepr 1 사용 예제들

공개 메소드들

메소드 설명
__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.

비공개 메소드들

메소드 설명
setDateTime ( DateTime $dateTime ) Sets the date+time.

메소드 상세

__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!).
public __construct ( )

checkPrice() 공개 메소드

If the stock level is negative, we can't have a price.
public checkPrice ( )

getComment() 공개 메소드

Returns the comment.
public getComment ( ) : string
리턴 string The comment

getCorrection() 공개 메소드

Returns if the entry is a correction entry.
public getCorrection ( ) : boolean
리턴 boolean True if the entry is a correction entry, false otherwise

getDateTime() 공개 메소드

Returns the date+time when the record was created.
public getDateTime ( ) : DateTime
리턴 DateTime The date+time when the record was created

getPart() 공개 메소드

Returns the part assigned to this entry.
public getPart ( ) : Part
리턴 PartKeepr\PartBundle\Entity\Part $part The part

getPrice() 공개 메소드

Returns the price for this entry. The price is for a single item only.
public getPrice ( ) : float
리턴 float The price for this entry.

getStockLevel() 공개 메소드

Returns the stock level for this entry.
public getStockLevel ( ) : integer
리턴 integer The stock level

getUser() 공개 메소드

Returns the user for this entry.
public getUser ( ) : User
리턴 PartKeepr\AuthBundle\Entity\User the user

isRemoval() 공개 메소드

Returns if the current stock entry is a removal.
public isRemoval ( ) : boolean
리턴 boolean True if the entry is a removal, false otherwise

setComment() 공개 메소드

Sets a comment.
public setComment ( string $comment )
$comment string

setCorrection() 공개 메소드

Sets if the stock entry is a correction record.
public setCorrection ( $bCorrection )
$bCorrection boolean True if the record is a correction record, false otherwise

setPart() 공개 메소드

Sets the part assigned to this entry.
public setPart ( Part $part = null )
$part PartKeepr\PartBundle\Entity\Part The part to set

setPrice() 공개 메소드

Please note that the price is for a single item only, and can be null.
public setPrice ( float $price )
$price float The price to set

setStockLevel() 공개 메소드

Negative values means part removal, positive values means part adding.
public setStockLevel ( integer $stockLevel )
$stockLevel integer The stock level

setUser() 공개 메소드

Sets the user assigned to this entry.
public setUser ( User $user = null )
$user PartKeepr\AuthBundle\Entity\User The user The user to set