From 0bd9ba5dc29965d3500ebb67f595dd7712f340b5 Mon Sep 17 00:00:00 2001 From: ywarnier Date: Wed, 28 Feb 2007 23:24:57 +0000 Subject: [PATCH] Fix supplementaire fk_statut --- htdocs/compta/stats/cumul.php | 4 ++-- htdocs/compta/stats/exercices.php | 4 ++-- htdocs/compta/stats/lib.inc.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/stats/cumul.php b/htdocs/compta/stats/cumul.php index 20d4c560657..c1d77292009 100644 --- a/htdocs/compta/stats/cumul.php +++ b/htdocs/compta/stats/cumul.php @@ -49,7 +49,7 @@ print '
'; $sql = "SELECT sum(f.total) as amount , date_format(f.datef,'%Y-%m') as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; -$sql .= " WHERE f.fk_statut = 1"; +$sql .= " WHERE f.fk_statut in (1,2)"; if ($conf->compta->mode != 'CREANCES-DETTES') { $sql .= " AND f.paye = 1"; @@ -66,7 +66,7 @@ print ''; $sql = "SELECT sum(f.total) as amount, year(f.datef) as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; -$sql .= " WHERE f.fk_statut = 1"; +$sql .= " WHERE f.fk_statut in (1,2)"; if ($conf->compta->mode != 'CREANCES-DETTES') { $sql .= " AND f.paye = 1"; } diff --git a/htdocs/compta/stats/exercices.php b/htdocs/compta/stats/exercices.php index 544359df820..4a624ad56d9 100644 --- a/htdocs/compta/stats/exercices.php +++ b/htdocs/compta/stats/exercices.php @@ -187,7 +187,7 @@ function ppt ($db, $year, $socid) $sql = "SELECT sum(f.total) as sum, round(date_format(f.datef, '%m')) as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; - $sql .= " WHERE f.fk_statut = 1"; + $sql .= " WHERE f.fk_statut in (1,2)"; $sql .= " AND date_format(f.datef,'%Y') = ".($year-1); if ($conf->compta->mode != 'CREANCES-DETTES') { @@ -205,7 +205,7 @@ function ppt ($db, $year, $socid) $sql = "SELECT sum(f.total) as sum, round(date_format(f.datef, '%m')) as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; - $sql .= " WHERE f.fk_statut = 1"; + $sql .= " WHERE f.fk_statut in (1,2)"; $sql .= " AND date_format(f.datef,'%Y') = $year "; if ($conf->compta->mode != 'CREANCES-DETTES') { $sql .= " AND f.paye = 1"; diff --git a/htdocs/compta/stats/lib.inc.php b/htdocs/compta/stats/lib.inc.php index 8fd3b1f8f4e..d2cf3980c5a 100644 --- a/htdocs/compta/stats/lib.inc.php +++ b/htdocs/compta/stats/lib.inc.php @@ -47,7 +47,7 @@ function get_ca ($db, $year, $socid) { $sql = "SELECT sum(f.amount) as sum FROM ".MAIN_DB_PREFIX."facture as f"; - $sql .= " WHERE f.fk_statut = 1"; + $sql .= " WHERE f.fk_statut in (1,2)"; if ($conf->compta->mode != 'CREANCES-DETTES') { $sql .= " AND f.paye = 1"; }