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 "| Réf | ";
- print 'Date | ';
- print 'Prix | ';
- print 'Statut | ';
- print '
';
+ print 'Réf | Date | Prix | ';
+ print 'Statut | ';
- for ($i = 0; $ifetch($propales[$i]);
-
- $var=!$var;
- print "";
- print "| id\">$propale->ref | \n";
-
- print ''.strftime("%d %B %Y",$propale->datep).' | ';
-
- print ''.price($propale->price).' | ';
- print ''.$propale->statut.' | ';
- print '
';
-
- $total = $total + $propale->price;
- }
+ for ($i = 0; $ifetch($propales[$i]);
+
+ $var=!$var;
+ print "";
+ print "| id\">$propale->ref | \n";
+
+ print ''.strftime("%d %B %Y",$propale->datep).' | ';
+
+ print ''.price($propale->price).' | ';
+ print ''.$propale->statut.' | ';
+ print '
';
+
+ $total = $total + $propale->price;
+ }
print '| '.$i.' propales | ';
print 'Total : '.price($total).' | ';
- print 'Euros HT |
';
+ print ''.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 '| Réf | Date | Prix | ';
+ print 'Statut |
';
+
+ for ($i = 0; $ifetch($factures[$i]);
+
+ $var=!$var;
+ print "";
+ print "| id\">$facture->ref | \n";
+ print ''.strftime("%d %B %Y",$facture->date).' | ';
+ print ''.price($facture->total_ht).' | ';
+ print ''.$facture->statut.' |
';
+
+ $total = $total + $facture->total_ht;
+ }
+
+ print '| '.$i.' factures | ';
+ print 'Total : '.price($total).' | ';
+ print ''.MAIN_MONNAIE.' HT |
';
print "
";
}
}
- print "";
+ print '';
if ($action == "edit")
{
@@ -172,14 +204,14 @@ if ($action == 'create')
}
else
{
- print "| Editer | ";
+ print "Editer | ";
}
print '- | ';
print '- | ';
print '- | ';
- print "Supprimer | ";
+ print "Supprimer | ";
print "
";