CoolCMS API

StockMovementBatch extends StockMovementBatch
in package

Movement x batch pairing (precise `FIFO` `COGS`). Written by services via raw DBAL; the entity serves reads (movement `COGS` breakdown). Read-only FK columns kept as plain scalars — it does not belong to the draft object graph (no #[CollectionOf] on StockMovement).

Attributes
#[Entity]
#[Table]
$name: 'cms_mod_store_stock_movement_batches'
#[TableAlias]
'stockMovementBatch'

Table of Contents

Properties

$batchId  : int|null
$batchNumber  : string|null
$id  : int|null
$movementId  : int|null
$quantity  : string
$unitPriceBase  : string|null

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getBatchId()  : int|null
getBatchNumber()  : string|null
getId()  : int|null
getMovementId()  : int|null
getQuantity()  : string
getUnitPriceBase()  : string|null
isPersisted()  : bool
setBatchId()  : $this
setBatchNumber()  : $this
setId()  : $this
setMovementId()  : $this
setQuantity()  : $this
setUnitPriceBase()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$batchId

protected int|null $batchId = null
Attributes
#[Column]
$name: 'cms_mod_store_stock_batches_stock_batch_id'
$type: 'bigint'
$nullable: true
$options: ['unsigned' => true]

$batchNumber

protected string|null $batchNumber = null
Attributes
#[Column]
$name: 'batch_number'
$type: 'string'
$length: 60
$nullable: true

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'stock_movement_batch_id'
$type: 'bigint'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$movementId

protected int|null $movementId = null
Attributes
#[Column]
$name: 'cms_mod_store_stock_movements_stock_movement_id'
$type: 'bigint'
$options: ['unsigned' => true]

$quantity

protected string $quantity = '0.000'
Attributes
#[Column]
$name: 'quantity'
$type: 'decimal'
$precision: 10
$scale: 3

$unitPriceBase

protected string|null $unitPriceBase = null
Attributes
#[Column]
$name: 'unit_price_base'
$type: 'decimal'
$precision: 10
$scale: 3
$nullable: true

Methods

__construct()

public __construct([int|null $id = null ][, int|null $movementId = null ][, int|null $batchId = null ][, string $quantity = '0.000' ][, string|null $unitPriceBase = null ][, string|null $batchNumber = null ]) : mixed
Parameters
$id : int|null = null
$movementId : int|null = null
$batchId : int|null = null
$quantity : string = '0.000'
$unitPriceBase : string|null = null
$batchNumber : string|null = null

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getAllTraits()

Returns all traits the class uses, including those used by parent classes and nested traits.

public getAllTraits() : array<string, string>
Return values
array<string, string>

getBatchNumber()

public getBatchNumber() : string|null
Return values
string|null

getUnitPriceBase()

public getUnitPriceBase() : string|null
Return values
string|null

setBatchId()

public setBatchId(int|null $batchId) : $this
Parameters
$batchId : int|null
Return values
$this

setBatchNumber()

public setBatchNumber(string|null $batchNumber) : $this
Parameters
$batchNumber : string|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setMovementId()

public setMovementId(int|null $movementId) : $this
Parameters
$movementId : int|null
Return values
$this

setQuantity()

public setQuantity(string $quantity) : $this
Parameters
$quantity : string
Return values
$this

setUnitPriceBase()

public setUnitPriceBase(string|null $unitPriceBase) : $this
Parameters
$unitPriceBase : string|null
Return values
$this

getTraitsRecursive()

Walks the trait list recursively and collects nested traits too.

private static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
$traits : array<string, string>
Return values
array<string, string>
On this page

Search results