Properties

$id

$id : 

Type

$date_add

$date_add : string

Type

string — The creation date of the movement

$id_employee

$id_employee : integer

Type

integer — The employee id, responsible of the movement

$employee_firstname

$employee_firstname : string

Type

string — The first name of the employee responsible of the movement

$employee_lastname

$employee_lastname : string

Type

string — The last name of the employee responsible of the movement

$id_stock

$id_stock : integer

Type

integer — The stock id on wtich the movement is applied

$physical_quantity

$physical_quantity : integer

Type

integer — the quantity of product with is moved

$id_stock_mvt_reason

$id_stock_mvt_reason : integer

Type

integer — id of the movement reason assoiated to the movement

$id_order

$id_order : integer

Type

integer — Used when the movement is due to a customer order

$sign

$sign : integer

Type

integer — detrmine if the movement is a positive or negative operation

$id_supply_order

$id_supply_order : integer

Type

integer — Used when the movement is due to a supplier order

$last_wa

$last_wa : float

Type

float — Last value of the weighted-average method

$current_wa

$current_wa : float

Type

float — Current value of the weighted-average method

$price_te

$price_te : float

Type

float — The unit price without tax of the product associated to the movement

$referer

$referer : integer

Type

integer — Refers to an other id_stock_mvt : used for LIFO/FIFO implementation in StockManager

$date_upd

$date_upd : 

Type

$quantity

$quantity : integer

Type

integer

$definition

$definition : 

Type

$webserviceParameters

$webserviceParameters : 

Type

Methods

addMissingMvt()

addMissingMvt(  $id_employee) 

Parameters

$id_employee

getNegativeStockMvts()

getNegativeStockMvts(integer  $id_order, integer  $id_product, integer  $id_product_attribute, integer  $quantity, integer  $id_warehouse = null) : Array

Gets the negative (decrements the stock) stock mvts that correspond to the given order, for : the given product, in the given quantity.

Parameters

integer $id_order
integer $id_product
integer $id_product_attribute

Use 0 if the product does not have attributes

integer $quantity
integer $id_warehouse

Optional

Returns

Array —

mvts

getLastPositiveStockMvt()

getLastPositiveStockMvt(integer  $id_product, integer  $id_product_attribute) : boolean|array

For a given product, gets the last positive stock mvt

Parameters

integer $id_product
integer $id_product_attribute

Use 0 if the product does not have attributes

Returns

boolean|array