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 ''; - print ''; - - for ($i = 0; $ifetch($propales[$i]); - - $var=!$var; - print ""; - print "\n"; - - print ''; - - print ''; - print ''; - print ''; - - $total = $total + $propale->price; - } - - print ''; - print ''; - print '
RéfDatePrixStatut
id\">$propale->ref'.strftime("%d %B %Y",$propale->datep).''.price($propale->price).''.$propale->statut.'
'.$i.' propalesTotal : '.price($total).''.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 '

'; 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 ''; + + for ($i = 0; $ifetch($propales[$i]); + + $var=!$var; + print ""; + print "\n"; + + print ''; + + print ''; + $total = $total + $propale->price; + } + + print ''; + print ''; + print '
RéfDatePrix
id\">$propale->ref'.strftime("%d %B %Y",$propale->datep).''.price($propale->price).'
'.$i.' propalesTotal : '.price($total).''.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 ''; + + for ($i = 0; $ifetch($factures[$i]); + + $var=!$var; + print ""; + print "\n"; + print ''; + print ''; + + $total = $total + $facture->total_ht; + } + + print ''; + print ''; + print ''; + print "
RéfDatePrix
id\">$facture->ref'.strftime("%d %B %Y",$facture->date).''.price($facture->total_ht).'
'.$i.' facturesTotal : '.price($total).''.MAIN_MONNAIE.' HT
"; + } + } +} $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$");