Merge pull request #560 from FHenry/develop
Fix [ bug #658 ] Seacrh on bank do not work for description
This commit is contained in:
commit
a9e9b761cc
@ -117,11 +117,6 @@ if (is_numeric($credit)) {
|
|||||||
$si++;
|
$si++;
|
||||||
$sqlw[$si] .= " b.amount = " . $credit;
|
$sqlw[$si] .= " b.amount = " . $credit;
|
||||||
}
|
}
|
||||||
// Search criteria description
|
|
||||||
if ($description) {
|
|
||||||
$si++;
|
|
||||||
$sqlw[$si] .= " b.label like '%" . $description . "%'";
|
|
||||||
}
|
|
||||||
// Other search criteria
|
// Other search criteria
|
||||||
for ($i = 1 ; $i <= $si; $i++) {
|
for ($i = 1 ; $i <= $si; $i++) {
|
||||||
$sql .= " AND " . $sqlw[$i];
|
$sql .= " AND " . $sqlw[$i];
|
||||||
@ -195,6 +190,18 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
$printline=false;
|
||||||
|
//Search Description
|
||||||
|
if ($description) {
|
||||||
|
preg_match('/\((.+)\)/i',$objp->label,$reg); // Si texte entoure de parenthee on tente recherche de traduction
|
||||||
|
if ($reg[1]) {
|
||||||
|
if ($langs->transnoentities($reg[1])==$description) {
|
||||||
|
$printline=true;
|
||||||
|
}
|
||||||
|
}elseif ($objp->label==$description) {$printline=true;}
|
||||||
|
}else {$printline=true;}
|
||||||
|
|
||||||
|
if ($printline) {
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
@ -263,7 +270,7 @@ if ($resql)
|
|||||||
print $bankaccountstatic->getNomUrl(1);
|
print $bankaccountstatic->getNomUrl(1);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user