diff --git a/htdocs/compta/stats/comp.php b/htdocs/compta/stats/comp.php index ecc2b65f807..94027dfd0ce 100644 --- a/htdocs/compta/stats/comp.php +++ b/htdocs/compta/stats/comp.php @@ -38,8 +38,8 @@ function propals ($db, $year, $month) { $result = $db->query($sql); $num = $db->num_rows(); $i = 0; - print ""; - print ""; + print "
Propal
"; + print ""; $oldstatut = -1; $subtotal = 0; @@ -55,28 +55,28 @@ function propals ($db, $year, $month) { } $subtotal = 0; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; $var=True; } $var=!$var; - print ""; + print ""; - print "\n"; + print "\n"; - print "\n"; + print "\n"; - print "\n"; + print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; $total = $total + $objp->price; $subtotal = $subtotal + $objp->price; @@ -88,7 +88,7 @@ function propals ($db, $year, $month) { print ""; print ""; print ""; - print "
Propal
SocieteRéfDatePrixStatut
SocieteRéfDatePrixStatut
idp\">$objp->nomidp\">$objp->nompropalid\">$objp->refpropalid\">$objp->ref".strftime("%d %B %Y",$objp->dp)."".dolibarr_print_date($objp->dp)."".price($objp->price)."$objp->statut
".price($objp->price)."$objp->statut
Total : ".price($total)."Euros HT
"; + print ""; $db->free(); } @@ -115,39 +115,39 @@ function factures ($db, $year, $month, $paye) { if ($num > 0) { $i = 0; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; + print "
Factures
SocieteNumDateMontantPayé
"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; $var=True; while ($i < $num) { $objp = $db->fetch_object( $i); $var=!$var; - print ""; - print "\n"; - print "\n"; + print ""; + print "\n"; + print "\n"; if ($objp->df > 0 ) { - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; } - print "\n"; + print "\n"; $payes[1] = "oui"; $payes[0] = "non"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; $total = $total + $objp->total; @@ -155,7 +155,7 @@ function factures ($db, $year, $month, $paye) { } print ""; - print "
Factures
SocieteNumDateMontantPayé
idp\">$objp->nomfacid\">$objp->facnumber
idp\">$objp->nomfacid\">$objp->facnumber".strftime("%d %B %Y",$objp->df)."".dolibarr_print_date($objp->df)."!!!!!!".price($objp->total)."".price($objp->total)."".$payes[$objp->paye]."
".$payes[$objp->paye]."
"; print "Total : ".price($total)."
"; + print ""; $db->free(); } } @@ -174,8 +174,8 @@ function pt ($db, $sql, $year) { $num = $db->num_rows(); $i = 0; $total = 0 ; print ''; - print ""; - print ""; + print ""; + print ""; print "\n"; $var=True; $month = 1 ; @@ -186,20 +186,20 @@ function pt ($db, $sql, $year) { if ($obj->dm > $month ) { for ($b = $month ; $b < $obj->dm ; $b++) { - print ""; - print "\n"; - print "\n"; - print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; $var=!$var; $ca[$b] = 0; } } if ($obj->sum > 0) { - print ""; + print ""; print "\n"; - print "\n"; + print strftime("%B",mktime(12,0,0,$obj->dm, 1, $year))."\n"; + print "\n"; print "\n"; $month = $obj->dm + 1; @@ -218,10 +218,10 @@ function pt ($db, $sql, $year) { if ($beg <= 12 ) { for ($b = $beg + 1 ; $b < 13 ; $b++) { $var=!$var; - print ""; - print "\n"; - print "\n"; - print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; $ca[$b] = 0; } } @@ -241,7 +241,7 @@ function ppt ($db, $year, $socidp) global $bc,$conf; print "
Mois
MoisMontant
".strftime("%B",mktime(12,0,0,$b, 1, $year))."0
".strftime("%B",mktime(12,0,0,$b, 1, $year))."0
dm\">"; - print strftime("%B",mktime(12,0,0,$obj->dm, 1, $year))."".price($obj->sum)."".price($obj->sum)."
".strftime("%B",mktime(12,0,0,$b, 1, $year))."0
".strftime("%B",mktime(12,0,0,$b, 1, $year))."0
"; - print '"; @@ -281,10 +281,10 @@ function ppt ($db, $year, $socidp) print "
'; + print '
'; print "CA Prévisionnel basé sur les propal $year"; print "CA Réalisé $year"; print ''; - print ""; - print ""; - print ""; - print "\n"; + print ""; + print ""; + print ""; + print "\n"; $var = 1 ; for ($b = 1 ; $b <= 12 ; $b++) @@ -293,10 +293,10 @@ function ppt ($db, $year, $socidp) $delta = $ca[$b] - $prev[$b]; $deltat = $deltat + $delta ; - print ""; - print "\n"; - print "\n"; - print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; } $ayear = $year - 1; @@ -327,8 +327,10 @@ if ($user->societe_id > 0) $socidp = $user->societe_id; } +$cyear = isset($_GET["year"])?$_GET["year"]:0; +if (! $cyear) { $cyear = strftime ("%Y", time()); } -$cyear = strftime ("%Y", time()); +print_fiche_titre("Chiffre d'Affaire transformé (prévu-réalisé)",($cyear?"".img_previous()." Année $cyear ".img_next()."":"")); ppt($db, $cyear, $socidp);
MoisMontant
MoisMontant
".strftime("%B",mktime(12,0,0,$b, 1, $year))."".price($delta)."
".strftime("%B",mktime(12,0,0,$b, 1, $year))."".price($delta)."