diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php
index a0f0c7540df..94a36dcba3c 100644
--- a/htdocs/multicurrency/multicurrency_rate.php
+++ b/htdocs/multicurrency/multicurrency_rate.php
@@ -211,7 +211,7 @@ if (empty($reshook))
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
$sall = "";
$search_date_sync = "";
- $search_date_sync_end="";
+ $search_date_sync_end="";
$search_rate = "";
$search_code = "";
$search_array_options = array();
@@ -293,9 +293,9 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'multicurrency_rate as cr ';
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."multicurrency AS m ON cr.fk_multicurrency = m.rowid";
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
if ($search_date_sync && $search_date_sync_end ){
- $sql .= " AND (cr.date_sync BETWEEN '".$db->idate($search_date_sync)."' AND '".$db->idate($search_date_sync_end)."')";
+ $sql .= " AND (cr.date_sync BETWEEN '".$db->idate($search_date_sync)."' AND '".$db->idate($search_date_sync_end)."')";
} elseif ($search_date_sync && !$search_date_sync_end) {
- $sql .= natural_search('cr.date_sync', $db->idate($search_date_sync));
+ $sql .= natural_search('cr.date_sync', $db->idate($search_date_sync));
}
if ($search_rate) $sql .= natural_search('cr.rate', $search_rate);
if ($search_code) $sql .= natural_search('m.code', $search_code);
@@ -349,9 +349,9 @@ if ($resql) {
}
if ($search_date_sync) $param = "&search_date_sync=".$search_date_sync;
- if ($search_date_sync_end) $param="&search_date_sync_end=".$search_date_sync_end;
+ if ($search_date_sync_end) $param="&search_date_sync_end=".$search_date_sync_end;
if ($search_rate) $param = "&search_rate=".urlencode($search_rate);
- if ($search_code != '') $param.="&search_code=".urlencode($search_code);
+ if ($search_code != '') $param.="&search_code=".urlencode($search_code);
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@@ -421,13 +421,13 @@ if ($resql) {
if (!empty($arrayfields['cr.date_sync']['checked'])) {
print '
';
print $form->selectDate(dol_print_date($search_date_sync, "%Y-%m-%d"), 'search_date_sync', 0, 0, 1);
- print $form->selectDate(dol_print_date($search_date_sync_end, "%Y-%m-%d"), 'search_date_sync_end', 0, 0, 1);
+ print $form->selectDate(dol_print_date($search_date_sync_end, "%Y-%m-%d"), 'search_date_sync_end', 0, 0, 1);
print ' ';
}
// code
if (!empty($arrayfields['m.code']['checked'])) {
print '';
- print $form->selectMultiCurrency($multicurrency_code, 'search_code', 1, " code != '".$conf->currency."'", true);
+ print $form->selectMultiCurrency($multicurrency_code, 'search_code', 1, " code != '".$conf->currency."'", true);
print ' ';
}
// rate
@@ -475,85 +475,85 @@ if ($resql) {
print '';
- // USER REQUEST UPDATE FOR THIS LINE
- if ($action == "updateRate" && $obj->rowid == $id_rate_selected) {
- // var_dump($obj);
- print ' ';
- print '' . $form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true) . ' ';
- print ' ';
+ // USER REQUEST UPDATE FOR THIS LINE
+ if ($action == "updateRate" && $obj->rowid == $id_rate_selected) {
+ // var_dump($obj);
+ print ' ';
+ print '' . $form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true) . ' ';
+ print ' ';
- print '';
- print ' ';
- print ' ';
- print ''.$langs->trans("Modify").' ';
- print ''.$langs->trans("Cancel").' ';
- print ' ';
- }
- else {
- // date_sync
- if (!empty($arrayfields['cr.date_sync']['checked']))
- {
- print '';
- print $obj->date_sync;
- print " \n";
- if (!$i) $totalarray['nbfield']++;
- }
-
- // code
- if (! empty($arrayfields['m.code']['checked']))
- {
- print '';
- print $obj->code." ".$obj->name;
- print " \n";
-
- if (! $i) $totalarray['nbfield']++;
- }
-
- // rate
- if (! empty($arrayfields['cr.rate']['checked']))
- {
- print '';
- print $obj->rate;
- print " \n";
- if (! $i) $totalarray['nbfield']++;
- }
-
-
- // Fields from hook
- $parameters = ['arrayfields' => $arrayfields, 'obj' => $obj];
- $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
-
- // Action
- print '';
- if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
- $selected = 0;
- if (in_array($obj->rowid, $arrayofselected)) {
- $selected = 1;
+ print ' ';
+ print ' ';
+ print ' ';
+ print ''.$langs->trans("Modify").' ';
+ print ''.$langs->trans("Cancel").' ';
+ print ' ';
+ }
+ else {
+ // date_sync
+ if (!empty($arrayfields['cr.date_sync']['checked']))
+ {
+ print '';
+ print $obj->date_sync;
+ print " \n";
+ if (!$i) $totalarray['nbfield']++;
}
- print 'rowid.'">'.img_picto('edit', 'edit').' ';
- print 'rowid.'">'.img_picto('delete', 'delete').' ';
- print ' ';
- }
- print '';
- if (!$i) {
- $totalarray['nbfield']++;
+
+ // code
+ if (! empty($arrayfields['m.code']['checked']))
+ {
+ print '';
+ print $obj->code." ".$obj->name;
+ print " \n";
+
+ if (! $i) $totalarray['nbfield']++;
+ }
+
+ // rate
+ if (! empty($arrayfields['cr.rate']['checked']))
+ {
+ print '';
+ print $obj->rate;
+ print " \n";
+ if (! $i) $totalarray['nbfield']++;
+ }
+
+
+ // Fields from hook
+ $parameters = ['arrayfields' => $arrayfields, 'obj' => $obj];
+ $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
+ print $hookmanager->resPrint;
+
+ // Action
+ print '';
+ if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
+ $selected = 0;
+ if (in_array($obj->rowid, $arrayofselected)) {
+ $selected = 1;
+ }
+ print 'rowid.'">'.img_picto('edit', 'edit').' ';
+ print 'rowid.'">'.img_picto('delete', 'delete').' ';
+ print ' ';
+ }
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+
+ print " \n";
+ $i++;
}
- print "\n";
- $i++;
+ $db->free($resql);
+
+ print "";
+ print "";
+
+ print '';
+ } else {
+ dol_print_error($db);
}
- $db->free($resql);
- print "";
- print "";
-
- print '';
-} else {
- dol_print_error($db);
-}
-
-
-llxFooter();
-$db->close();
+ llxFooter();
+ $db->close();