PriceExpression
class PriceExpression (View source)
Class for accessing price expression table
Properties
| DoliDB | $db | ||
| string | $error | ||
| string[] | $errors | ||
| int | $id | ||
| string | $title | ||
| string | $expression | ||
| string | $table_element |
Methods
Constructor
Load object in memory from the database
List all price expressions
Returns any existing rowid with specified title
Initialise object with example values Id must be 0 if object instance is a specimen
Details
__construct($db)
Constructor
@param DoliDB $db Database handler
create(User $user, int $notrigger = 0)
Create object into database
@param User $user User that creates
int
fetch($id)
Load object in memory from the database
@param int $id Id object
list_price_expression()
List all price expressions
@return PriceExpression[]|int Array of price expressions, <0 if ko
int
find_title($title)
Returns any existing rowid with specified title
@param string $title Title of expression
update(User $user, int $notrigger = 0)
Update object into database
@param User $user User that modifies
delete(User $user, $notrigger = 0)
Delete object in database
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen
@return int