dolibarr  16.0.5
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
StockMovements Class Reference
Inheritance diagram for StockMovements:
Inheritance graph
[legend]
Collaboration diagram for StockMovements:
Collaboration graph
[legend]

Public Member Functions

 __construct ()
 Constructor.
 
 index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='')
 Get properties of a stock movement object. More...
 
- Public Member Functions inherited from DolibarrApi
 __construct ($db, $cachedir='', $refreshCache=false)
 Constructor. More...
 

Protected Member Functions

 _cleanObjectDatas ($object)
 Update stock movement. More...
 
- Protected Member Functions inherited from DolibarrApi
 _checkValForAPI ($field, $value, $object)
 Check and convert a string depending on its type/name. More...
 
 _checkFilters ($sqlfilters, &$error='')
 Return if a $sqlfilters parameter is valid. More...
 

Private Member Functions

 _validate ($data)
 Validate fields before create or update object. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from DolibarrApi
static _checkAccessToResource ($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid')
 Check access by user to a given resource. More...
 
static _forge_criteria_callback ($matches)
 Function to forge a SQL criteria from a Generic filter string. More...
 

Detailed Description

Definition at line 29 of file api_stockmovements.class.php.

Member Function Documentation

◆ _cleanObjectDatas()

StockMovements::_cleanObjectDatas (   $object)
protected

Update stock movement.

Parameters
int$idId of warehouse to update
array$request_dataDatas
Returns
int Delete stock movement
Parameters
int$idStock movement ID
Returns
array Clean sensible object datas
Parameters
MouvementStock$objectObject to clean
Returns
Object Object with cleaned properties

Reimplemented from DolibarrApi.

Definition at line 288 of file api_stockmovements.class.php.

◆ _validate()

StockMovements::_validate (   $data)
private

Validate fields before create or update object.

Parameters
array | null$dataData to validate
Returns
array
Exceptions
RestException

Definition at line 346 of file api_stockmovements.class.php.

◆ index()

StockMovements::index (   $sortfield = "t.rowid",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $sqlfilters = '' 
)

Get properties of a stock movement object.

Return an array with stock movement informations

Parameters
int$idID of movement
Returns
array|mixed data without useless information
Exceptions
RestExceptionGet a list of stock movement
Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitLimit for list
int$pagePage number
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.product_id:=:1) and (t.date_creation:<:'20160101')"
Returns
array Array of warehouse objects
Exceptions
RestException

Definition at line 96 of file api_stockmovements.class.php.


The documentation for this class was generated from the following file: