Fix #yogosha5877
This commit is contained in:
parent
24a4c09613
commit
9f03054fc4
@ -791,7 +791,7 @@ if ($resql) {
|
||||
$nbmax = 12; // We show last 12 receipts (so we can have more than one year)
|
||||
$liste = "";
|
||||
$sql = "SELECT DISTINCT num_releve FROM ".MAIN_DB_PREFIX."bank";
|
||||
$sql .= " WHERE fk_account=".$object->id." AND num_releve IS NOT NULL";
|
||||
$sql .= " WHERE fk_account = ".((int) $object->id)." AND num_releve IS NOT NULL";
|
||||
$sql .= $db->order("num_releve", "DESC");
|
||||
$sql .= $db->plimit($nbmax + 1);
|
||||
print '<br>';
|
||||
@ -967,7 +967,7 @@ if ($resql) {
|
||||
$moreforfilter = '';
|
||||
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('DateOperationShort').' :';
|
||||
$moreforfilter .= $langs->trans('DateOperationShort').' ';
|
||||
$moreforfilter .= ($conf->browser->layout == 'phone' ? '<br>' : ' ');
|
||||
$moreforfilter .= '<div class="nowrap inline-block">';
|
||||
$moreforfilter .= $form->selectDate($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')).'</div>';
|
||||
@ -976,7 +976,7 @@ if ($resql) {
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('DateValueShort').' : ';
|
||||
$moreforfilter .= $langs->trans('DateValueShort').' ';
|
||||
$moreforfilter .= ($conf->browser->layout == 'phone' ? '<br>' : ' ');
|
||||
$moreforfilter .= '<div class="nowrap inline-block">';
|
||||
$moreforfilter .= $form->selectDate($search_dv_start, 'search_start_dv', 0, 0, 1, "search_form", 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')).'</div>';
|
||||
@ -1329,21 +1329,22 @@ if ($resql) {
|
||||
|
||||
// Description
|
||||
if (!empty($arrayfields['b.label']['checked'])) {
|
||||
print "<td>";
|
||||
|
||||
//print "<a href=\"line.php?rowid=".$objp->rowid."&account=".$objp->fk_account."\">";
|
||||
$labeltoshow = '';
|
||||
$titletoshow = '';
|
||||
$reg = array();
|
||||
preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthee on tente recherche de traduction
|
||||
if ($reg[1] && $langs->trans($reg[1]) != $reg[1]) {
|
||||
print $langs->trans($reg[1]);
|
||||
$labeltoshow = $langs->trans($reg[1]);
|
||||
} else {
|
||||
if ($objp->label == '(payment_salary)') {
|
||||
print dol_trunc($langs->trans("SalaryPayment", 40));
|
||||
$labeltoshow = dol_trunc($langs->trans("SalaryPayment", 40));
|
||||
} else {
|
||||
print dol_trunc($objp->label, 40);
|
||||
$labeltoshow = dol_escape_htmltag($objp->label);
|
||||
$titletoshow = $objp->label;
|
||||
}
|
||||
}
|
||||
//print "</a> ";
|
||||
print '<td class="tdoverflowmax300"'.($titletoshow ? ' title="'.dol_escape_htmltag($titletoshow).'"' : '').'>';
|
||||
print $labeltoshow; // Already escaped
|
||||
|
||||
// Add links after description
|
||||
$cachebankaccount = array();
|
||||
@ -1498,7 +1499,7 @@ if ($resql) {
|
||||
|
||||
// Num cheque
|
||||
if (!empty($arrayfields['b.num_chq']['checked'])) {
|
||||
print '<td class="nowrap" align="center">'.($objp->num_chq ? $objp->num_chq : "")."</td>\n";
|
||||
print '<td class="nowrap" align="center">'.($objp->num_chq ? dol_escape_htmltag($objp->num_chq) : "")."</td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -509,9 +509,9 @@ class Account extends CommonObject
|
||||
}
|
||||
|
||||
// Clean parameters
|
||||
$label =
|
||||
$emetteur = trim($emetteur);
|
||||
$banque = trim($banque);
|
||||
$label = trim($label);
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
|
||||
@ -249,6 +249,10 @@ class BankAccounts extends DolibarrApi
|
||||
$typeto = 'LIQ';
|
||||
}
|
||||
|
||||
// Clean data
|
||||
$description = checkVal($description, 'alphanohtml');
|
||||
|
||||
|
||||
/**
|
||||
* Creating bank line records
|
||||
*/
|
||||
@ -295,7 +299,9 @@ class BankAccounts extends DolibarrApi
|
||||
return array(
|
||||
'success' => array(
|
||||
'code' => 201,
|
||||
'message' => 'Internal wire transfer created successfully.'
|
||||
'message' => 'Internal wire transfer created successfully.',
|
||||
'bank_id_from' => $bank_line_id_from,
|
||||
'bank_id_to' => $bank_line_id_to,
|
||||
)
|
||||
);
|
||||
} else {
|
||||
|
||||
@ -686,11 +686,11 @@ function GETPOSTINT($paramname, $method = 0, $filter = null, $options = null, $n
|
||||
/**
|
||||
* Return a value after checking on a rule.
|
||||
*
|
||||
* @param string $out Value to get/check
|
||||
* @param string $check Type of check
|
||||
* @param string $out Value to check/clear.
|
||||
* @param string $check Type of check/sanitizing
|
||||
* @param int $filter Filter to apply when $check is set to 'custom'. (See http://php.net/manual/en/filter.filters.php for détails)
|
||||
* @param mixed $options Options to pass to filter_var when $check is set to 'custom'
|
||||
* @return string|array Value found (string or array), or '' if check fails
|
||||
* @return string|array Value sanitized (string or array). It may be '' if format check fails.
|
||||
*/
|
||||
function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options = null)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user