Fix: Filter on late unpaid was wrong
This commit is contained in:
parent
66ece77b27
commit
4e8b22d23e
@ -2789,7 +2789,7 @@ class Facture extends CommonObject
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$now=gmmktime();
|
||||
$now=dol_now();
|
||||
|
||||
$this->nbtodo=$this->nbtodolate=0;
|
||||
$clause = " WHERE";
|
||||
|
||||
@ -187,11 +187,10 @@ $sql.= " AND f.type in (0,1) AND f.fk_statut = 1";
|
||||
$sql.= " AND f.paye = 0";
|
||||
if ($option == 'late')
|
||||
{
|
||||
$sql.=" AND f.date_lim_reglement < ".$db->idate(dol_now('tzref'));
|
||||
$sql.=" AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->client->warning_delay)."'";
|
||||
}
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql .= " AND s.rowid = ".$socid;
|
||||
|
||||
if ($_GET["filtre"])
|
||||
{
|
||||
$filtrearr = explode(",", $_GET["filtre"]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user