Merge pull request #3637 from hregis/develop_origin
Fix: sql error, status is an integer
This commit is contained in:
commit
cfa6938e5e
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
@ -69,7 +69,7 @@ $search_refcustomer=GETPOST('search_refcustomer','alpha');
|
||||
$search_societe=GETPOST('search_societe','alpha');
|
||||
$search_montant_ht=GETPOST('search_montant_ht','alpha');
|
||||
$search_montant_ttc=GETPOST('search_montant_ttc','alpha');
|
||||
$search_status=GETPOST('search_status','alpha');
|
||||
$search_status=GETPOST('search_status','int');
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
@ -191,7 +191,7 @@ if ($search_refcustomer) $sql .= natural_search('f.ref_client', $search_refcusto
|
||||
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
|
||||
if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1);
|
||||
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
||||
if ($search_status >= 0 ) $sql.= " AND f.fk_statut = ".$db->escape($search_status);
|
||||
if ($search_status != '') $sql.= " AND f.fk_statut = ".$db->escape($search_status);
|
||||
if ($month > 0)
|
||||
{
|
||||
if ($year > 0 && empty($day))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user