diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php
index db1e2633644..ed80f3d11ce 100644
--- a/htdocs/projet/fiche.php
+++ b/htdocs/projet/fiche.php
@@ -124,78 +124,9 @@ if ($action == 'create')
print '
| Réf | '.$projet->ref.' |
';
print '| Titre | '.$projet->title.' |
';
print '';
-
- $propales = $projet->get_propal_list();
-
- if (sizeof($propales)>0 && is_array($propales))
- {
- print_titre('Listes des propositions commerciales associées au projet');
- print '';
-
- 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;
- }
-
- print '| '.$i.' propales | ';
- print 'Total : '.price($total).' | ';
- 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 '';
if ($action == "edit")
@@ -215,8 +146,72 @@ if ($action == 'create')
print "
";
-}
+ if ($_GET["action"] == '')
+ {
+ $propales = $projet->get_propal_list();
+
+ if (sizeof($propales)>0 && is_array($propales))
+ {
+ print_titre('Listes des propositions commerciales associées au projet');
+ print '';
+
+ print '';
+ print '| Réf | Date | Prix |
';
+
+ 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).' |
';
+ $total = $total + $propale->price;
+ }
+
+ print '| '.$i.' propales | ';
+ print 'Total : '.price($total).' | ';
+ 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 |
';
+
+ 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).' |
';
+
+ $total = $total + $facture->total_ht;
+ }
+
+ print '| '.$i.' factures | ';
+ print 'Total : '.price($total).' | ';
+ print ''.MAIN_MONNAIE.' HT |
';
+ print "
";
+ }
+ }
+}
$db->close();
llxFooter("Dernière modification $Date$ révision $Revision$");