Must exclude draft and abandon into default filter.

This commit is contained in:
Laurent Destailleur 2015-04-06 19:22:58 +02:00
parent 877e60c76f
commit 2550c6b0af

View File

@ -448,7 +448,7 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid=pf.fk_fac
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " AND f.type IN (0,1,3,5)";
//$sql.= " AND f.fk_statut = 1";
if ($filter == 'paye:0') $sql.= " AND f.fk_statut = 1";
//$sql.= " AND f.paye = 0";
if ($option == 'late') $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;