Provide a better explanation on how the module dynamic price works
This commit is contained in:
parent
94732b8ae9
commit
04114a5e1e
@ -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,
|
||||
|
||||
@ -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").'<br>';
|
||||
print '<br>';
|
||||
|
||||
//Global variables table
|
||||
if ($action != 'create_updater' && $action != 'edit_updater') {
|
||||
print $langs->trans("GlobalVariables");
|
||||
print '<table summary="listofattributes" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Code").'</td>';
|
||||
print '<td>'.$langs->trans("Variable").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print '<td width="80"> </td>'; //Space for buttons
|
||||
@ -184,7 +187,7 @@ if ($action == 'create_variable' || $action == 'edit_variable') {
|
||||
print '<br><table summary="listofattributes" class="border centpercent">';
|
||||
//Code
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans("Code").'</td>';
|
||||
print '<td class="fieldrequired">'.$langs->trans("Variable").'</td>';
|
||||
print '<td class="valeur"><input type="text" name="code" size="20" value="'.(empty($price_globals->code)?'':$price_globals->code).'"></td>';
|
||||
print '</tr>';
|
||||
//Description
|
||||
@ -205,7 +208,7 @@ if ($action == 'create_variable' || $action == 'edit_variable') {
|
||||
print '<input type="submit" class="button" name="cancel" id="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
} else {
|
||||
} else if ($action != 'create_updater') {
|
||||
//Action Buttons
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=create_variable">'.$langs->trans("Add").'</a>';
|
||||
@ -219,7 +222,7 @@ if ($action != 'create_variable' && $action != 'edit_variable') {
|
||||
print $langs->trans("GlobalVariableUpdaters");
|
||||
print '<table summary="listofattributes" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Code").'</td>';
|
||||
print '<td>'.$langs->trans("VariableToUpdate").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td>'.$langs->trans("Parameters").'</td>';
|
||||
@ -264,7 +267,7 @@ if ($action == 'create_updater' || $action == 'edit_updater') {
|
||||
print '<br><table summary="listofattributes" class="border centpercent">';
|
||||
//Code
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans("Code").'</td><td>';
|
||||
print '<td class="fieldrequired">'.$langs->trans("VariableToUpdate").'</td><td>';
|
||||
$globals_list = array();
|
||||
foreach ($price_globals->listGlobalVariables() as $entry) {
|
||||
$globals_list[$entry->id]=$entry->code;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user