';
if (!empty($input['label'])) {
$more .= $input['label'] . '
';
}
@@ -6637,10 +6639,10 @@ public function load_cache_vatrates($country_code)
dol_syslog(__METHOD__, LOG_DEBUG);
$sql = "SELECT t.rowid, t.type_vat, t.code, t.taux, t.localtax1, t.localtax1_type, t.localtax2, t.localtax2_type, t.recuperableonly";
- $sql .= " FROM ".$this->db->prefix()."c_tva as t, ".$this->db->prefix()."c_country as c";
+ $sql .= " FROM " . $this->db->prefix() . "c_tva as t, " . $this->db->prefix() . "c_country as c";
$sql .= " WHERE t.fk_pays = c.rowid";
$sql .= " AND t.active > 0";
- $sql .= " AND t.entity IN (".getEntity('c_tva').")";
+ $sql .= " AND t.entity IN (" . getEntity('c_tva') . ")";
$sql .= " AND c.code IN (" . $this->db->sanitize($country_code, 1) . ")";
$sql .= " ORDER BY t.code ASC, t.taux ASC, t.recuperableonly ASC";
@@ -6690,7 +6692,7 @@ public function load_cache_vatrates($country_code)
$langs->load("errors");
$new_country_code = $reg[1];
$country_id = dol_getIdFromCode($this->db, $new_country_code, 'c_pays', 'code', 'rowid');
- $this->error .= '
'.$langs->trans("ErrorFixThisHere", DOL_URL_ROOT.'/admin/dict.php?id=10'.($country_id > 0 ? '&countryidforinsert='.$country_id : ''));
+ $this->error .= '
' . $langs->trans("ErrorFixThisHere", DOL_URL_ROOT . '/admin/dict.php?id=10' . ($country_id > 0 ? '&countryidforinsert=' . $country_id : ''));
}
$this->error .= '';
return -1;
@@ -7184,7 +7186,7 @@ public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empt
// Input area to enter date manually
$retstring .= '
';
- $retstring .= '
trans("FormatDateShortJavaInput")) . '\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript
@@ -7441,11 +7443,11 @@ public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empt
$tmplabeladddateof = $langs->trans("DateInvoice");
}
$reset_scripts = 'console.log(\'Click on now link\'); ';
- $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date($tmpadddateof, 'dayinputnoreduce').'\');';
- $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.$tmparray['mday'].'\');';
- $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.$tmparray['mon'].'\');';
- $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.$tmparray['year'].'\');';
- $retstring .= ' -
';
+ $reset_scripts .= 'jQuery(\'#' . $prefix . '\').val(\'' . dol_print_date($tmpadddateof, 'dayinputnoreduce') . '\');';
+ $reset_scripts .= 'jQuery(\'#' . $prefix . 'day\').val(\'' . $tmparray['mday'] . '\');';
+ $reset_scripts .= 'jQuery(\'#' . $prefix . 'month\').val(\'' . $tmparray['mon'] . '\');';
+ $reset_scripts .= 'jQuery(\'#' . $prefix . 'year\').val(\'' . $tmparray['year'] . '\');';
+ $retstring .= ' -
';
}
}
@@ -8395,8 +8397,8 @@ public function selectForForms($objectdesc, $htmlname, $preSelectedValue, $showe
);
if (!is_object($objecttmp)) {
- dol_syslog('selectForForms: Error bad setup of field objectdescorig=' . $objectdescorig.', objectfield='.$objectfield.', objectdesc='.$objectdesc, LOG_WARNING);
- return 'selectForForms: Error bad setup of field objectdescorig=' . $objectdescorig.', objectfield='.$objectfield.', objectdesc='.$objectdesc;
+ dol_syslog('selectForForms: Error bad setup of field objectdescorig=' . $objectdescorig . ', objectfield=' . $objectfield . ', objectdesc=' . $objectdesc, LOG_WARNING);
+ return 'selectForForms: Error bad setup of field objectdescorig=' . $objectdescorig . ', objectfield=' . $objectfield . ', objectdesc=' . $objectdesc;
}
'@phan-var-force CommonObject $objecttmp';
@@ -8440,7 +8442,7 @@ public function selectForForms($objectdesc, $htmlname, $preSelectedValue, $showe
// Set url and param to call to get json of the search results
$urlforajaxcall = DOL_URL_ROOT . '/core/ajax/selectobject.php';
- $urloption = 'htmlname=' . urlencode($htmlname) . '&outjson=1&objectdesc=' . urlencode($objectdescorig) . '&objectfield='.urlencode($objectfield) . ($sortfield ? '&sortfield=' . urlencode($sortfield) : '');
+ $urloption = 'htmlname=' . urlencode($htmlname) . '&outjson=1&objectdesc=' . urlencode($objectdescorig) . '&objectfield=' . urlencode($objectfield) . ($sortfield ? '&sortfield=' . urlencode($sortfield) : '');
// Activate the auto complete using ajax call.
$out .= ajax_autocompleter((string) $preSelectedValue, $htmlname, $urlforajaxcall, $urloption, getDolGlobalInt($confkeyforautocompletemode), 0);
@@ -8712,7 +8714,7 @@ public static function selectarray($htmlname, $array, $id = '', $show_empty = 0,
$idname = str_replace(array('[', ']'), array('', ''), $htmlname);
$out .= '
';
+ $out = '
';
$formattedarrayresult = array();
@@ -9088,7 +9091,7 @@ public static function multiselectarray($htmlname, $array, $selected = array(),
// We need a hidden field because when using the multiselect, if we unselect all, there is no
// variable submitted at all, so no way to make a difference between variable not submitted and variable
// submitted to nothing.
- $out .= '
';
+ $out .= '
';
// Output select component
$out .= '