diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index b8a7d377904..3dfabdc124d 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -295,7 +295,9 @@ ComposedProductIncDecStock=Increase/Decrease stock on parent change ComposedProduct=Sub-product MinSupplierPrice=Minimum supplier price DynamicPriceConfiguration=Dynamic price configuration +DynamicPriceDesc=On product card, with this module enabled, you should be able to set mathematic functions to calculate Customer or Supplier prices. Such function can use all mathematic operators, some constants and variables. You can set here the variables you want to be able and if the variable need an automatic update, the external URL to use to ask Dolibarr to update automaticaly the value. GlobalVariables=Global variables +VariableToUpdate=Variable to update GlobalVariableUpdaters=Global variable updaters GlobalVariableUpdaterType0=JSON data GlobalVariableUpdaterHelp0=Parses JSON data from specified URL, VALUE specifies the location of relevant value, diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index 45086630c47..84ec54433cd 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -142,17 +142,20 @@ if (!empty($action) && empty($cancel)) { * View */ -//Header llxHeader("","",$langs->trans("CardProduct".$product->type)); + print load_fiche_titre($langs->trans("DynamicPriceConfiguration")); $form = new Form($db); +print $langs->trans("DynamicPriceDesc").'
'; +print '
'; + //Global variables table if ($action != 'create_updater' && $action != 'edit_updater') { print $langs->trans("GlobalVariables"); print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; //Space for buttons @@ -184,7 +187,7 @@ if ($action == 'create_variable' || $action == 'edit_variable') { print '
'.$langs->trans("Code").''.$langs->trans("Variable").''.$langs->trans("Description").''.$langs->trans("Value").' 
'; //Code print ''; - print ''; + print ''; print ''; print ''; //Description @@ -205,7 +208,7 @@ if ($action == 'create_variable' || $action == 'edit_variable') { print ''; print ''; print ''; -} else { +} else if ($action != 'create_updater') { //Action Buttons print '
'; print ''.$langs->trans("Add").''; @@ -219,7 +222,7 @@ if ($action != 'create_variable' && $action != 'edit_variable') { print $langs->trans("GlobalVariableUpdaters"); print '
'.$langs->trans("Code").''.$langs->trans("Variable").'
'; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -264,7 +267,7 @@ if ($action == 'create_updater' || $action == 'edit_updater') { print '
'.$langs->trans("Code").''.$langs->trans("VariableToUpdate").''.$langs->trans("Description").''.$langs->trans("Type").''.$langs->trans("Parameters").'
'; //Code print ''; - print '
'.$langs->trans("Code").''; + print ''.$langs->trans("VariableToUpdate").''; $globals_list = array(); foreach ($price_globals->listGlobalVariables() as $entry) { $globals_list[$entry->id]=$entry->code;