dolibarr
x.y.z
|
Class to parse product price expressions. More...
Public Member Functions | |
__construct ($db) | |
Constructor. More... | |
translatedError () | |
Returns translated error. More... | |
parseExpression ($product, $expression, $values) | |
Calculates price based on expression. More... | |
parseProduct ($product, $extra_values=array()) | |
Calculates product price based on product id and associated expression. More... | |
parseProductSupplier ($product_supplier, $extra_values=array()) | |
Calculates supplier product price based on product supplier price and associated expression. More... | |
testExpression ($product_id, $expression, $extra_values=array()) | |
Tests string expression for validity. More... | |
Class to parse product price expressions.
Definition at line 33 of file price_parser.class.php.
PriceParser::__construct | ( | $db | ) |
PriceParser::parseExpression | ( | $product, | |
$expression, | |||
$values | |||
) |
Calculates price based on expression.
Product | $product | The Product object to get information |
String | $expression | The expression to parse |
array | $values | Strings to replaces |
Definition at line 125 of file price_parser.class.php.
PriceParser::parseProduct | ( | $product, | |
$extra_values = array() |
|||
) |
Calculates product price based on product id and associated expression.
Product | $product | The Product object to get information |
array | $extra_values | Any aditional values for expression |
Definition at line 249 of file price_parser.class.php.
PriceParser::parseProductSupplier | ( | $product_supplier, | |
$extra_values = array() |
|||
) |
Calculates supplier product price based on product supplier price and associated expression.
ProductFournisseur | $product_supplier | The Product supplier object to get information |
array | $extra_values | Any aditional values for expression |
Definition at line 296 of file price_parser.class.php.
PriceParser::testExpression | ( | $product_id, | |
$expression, | |||
$extra_values = array() |
|||
) |
Tests string expression for validity.
int | $product_id | The Product id to get information |
string | $expression | The expression to parse |
array | $extra_values | Any aditional values for expression |
Definition at line 327 of file price_parser.class.php.
PriceParser::translatedError | ( | ) |
Returns translated error.
Definition at line 62 of file price_parser.class.php.