diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index b8c86ca26d3..d2c784409f5 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -22,6 +22,7 @@ require("./pre.inc.php"); require("./project.class.php"); require("../propal.class.php"); +require("../facture.class.php"); if ($HTTP_POST_VARS["action"] == 'update') { @@ -128,43 +129,74 @@ if ($action == 'create') if (sizeof($propales)>0 && is_array($propales)) { - print_titre('Listes des propales associées au projet'); print ''; print ''; - print ""; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; - for ($i = 0; $ifetch($propales[$i]); - - $var=!$var; - print ""; - print "\n"; - - print ''; - - print ''; - print ''; - print ''; - - $total = $total + $propale->price; - } + for ($i = 0; $ifetch($propales[$i]); + + $var=!$var; + print ""; + print "\n"; + + print ''; + + print ''; + print ''; + print ''; + + $total = $total + $propale->price; + } print ''; print ''; - print ''; + print '
RéfDatePrixStatut
RéfDatePrixStatut
id\">$propale->ref'.strftime("%d %B %Y",$propale->datep).''.price($propale->price).''.$propale->statut.'
id\">$propale->ref'.strftime("%d %B %Y",$propale->datep).''.price($propale->price).''.$propale->statut.'
'.$i.' propalesTotal : '.price($total).'Euros HT
'.MAIN_MONNAIE.' HT
'; + } + /* + * Factures + * + */ + $factures = $projet->get_facture_list(); + + if (sizeof($factures)>0 && is_array($factures)) + { + print_titre('Listes des factures associées au projet'); + print ''; + + print ''; + print ''; + print ''; + + for ($i = 0; $ifetch($factures[$i]); + + $var=!$var; + print ""; + print "\n"; + print ''; + print ''; + print ''; + + $total = $total + $facture->total_ht; + } + + print ''; + print ''; + print ''; print "
RéfDatePrixStatut
id\">$facture->ref'.strftime("%d %B %Y",$facture->date).''.price($facture->total_ht).''.$facture->statut.'
'.$i.' facturesTotal : '.price($total).''.MAIN_MONNAIE.' HT
"; } } - print "

"; + print '

'; if ($action == "edit") { @@ -172,14 +204,14 @@ if ($action == 'create') } else { - print ""; + print ""; } print ''; print ''; print ''; - print ""; + print ""; print "
EditerEditer---SupprimerSupprimer
";