dolibarr  13.0.2
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
StockMovements Class Reference
+ Inheritance diagram for StockMovements:
+ Collaboration diagram for StockMovements:

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
 _cleanObjectDatas ($object)
 Executed method when API is called without parameter. More...
 
 _checkFilters ($sqlfilters)
 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 user access to a resource. More...
 
static _forge_criteria_callback ($matches)
 Function to forge a SQL criteria. More...
 

Detailed Description

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

Member Function Documentation

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

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

Referenced by index().

StockMovements::_validate (   $data)
private

Validate fields before create or update object.

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

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

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.

References DolibarrApi\_checkFilters(), _cleanObjectDatas(), and db.


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