|
dolibarr
13.0.2
|
Class of dictionary of nature of product (used by imports) More...
Public Member Functions | |
| __construct ($db) | |
| Constructor. More... | |
| create ($user, $notrigger=0) | |
| Create object into database. More... | |
| fetch ($id, $code= '') | |
| Load object in memory from database. More... | |
| fetchAll ($sortorder= '', $sortfield= '', $limit=0, $offset=0, array $filter=array(), $filtermode= 'AND') | |
| Load list of objects in memory from the database. More... | |
| update ($user=null, $notrigger=0) | |
| Update object into database. More... | |
| delete ($user, $notrigger=0) | |
| Delete object in database. More... | |
| getProductNatureFromCode ($code, $mode= 'code') | |
| Get unit from code. More... | |
Class of dictionary of nature of product (used by imports)
Definition at line 29 of file cproductnature.class.php.
| CProductNature::__construct | ( | $db | ) |
Constructor.
| DoliDb | $db | Database handler |
Definition at line 87 of file cproductnature.class.php.
References db.
| CProductNature::create | ( | $user, | |
$notrigger = 0 |
|||
| ) |
Create object into database.
Definition at line 100 of file cproductnature.class.php.
References $resql, code, db, and dol_syslog().
| CProductNature::delete | ( | $user, | |
$notrigger = 0 |
|||
| ) |
Delete object in database.
Definition at line 299 of file cproductnature.class.php.
References $resql, db, and dol_syslog().
| CProductNature::fetch | ( | $id, | |
$code = '' |
|||
| ) |
Load object in memory from database.
| int | $id | Id of CUnit object to fetch (rowid) |
| string | $code | Code |
Definition at line 142 of file cproductnature.class.php.
| CProductNature::fetchAll | ( | $sortorder = '', |
|
$sortfield = '', |
|||
$limit = 0, |
|||
$offset = 0, |
|||
| array | $filter = array(), |
||
$filtermode = 'AND' |
|||
| ) |
Load list of objects in memory from the database.
| string | $sortorder | Sort Order |
| string | $sortfield | Sort field |
| int | $limit | limit |
| int | $offset | Offset |
| array | $filter | Filter array. Example array('field'=>'valueforlike', 'customurl'=>...) |
| string | $filtermode | Filter mode (AND or OR) |
Definition at line 192 of file cproductnature.class.php.
References $resql, db, and dol_syslog().
| CProductNature::getProductNatureFromCode | ( | $code, | |
$mode = 'code' |
|||
| ) |
Get unit from code.
| int | $code | code of unit |
| string | $mode | 0= id , short_label=Use short label as value, code=use code |
Definition at line 330 of file cproductnature.class.php.
References db, and dol_getIdFromCode().
| CProductNature::update | ( | $user = null, |
|
$notrigger = 0 |
|||
| ) |
Update object into database.
Definition at line 264 of file cproductnature.class.php.
References $resql, code, db, and dol_syslog().