From f4d652fdd972acafe661793d5398037eaa1f04bb Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 25 May 2004 14:16:03 +0000 Subject: [PATCH] Mise aux normes graphiques --- htdocs/compta/commande.php | 89 +++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/htdocs/compta/commande.php b/htdocs/compta/commande.php index 6b94aca7be4..137671844ae 100644 --- a/htdocs/compta/commande.php +++ b/htdocs/compta/commande.php @@ -69,8 +69,14 @@ if ($_GET["id"] > 0) $author = new User($db); $author->id = $commande->user_author_id; $author->fetch(); - - print_titre("Commande : ".$commande->ref); + + + $head[0][0] = DOL_URL_ROOT.'/comm/propal.php?propalid='.$propal->id; + $head[0][1] = "Commande : $commande->ref"; + $h = 1; + $a = 0; + + dolibarr_fiche_head($head, $a); /* * Commande @@ -198,34 +204,6 @@ if ($_GET["id"] > 0) print $db->error(); } print ''; - /* - * Barre d'actions - */ - - if ($user->societe_id == 0 && !$commande->facturee) - { - print '

'; - - print ''; - print ''; - print ''; - if (!$commande->facturee) - { - print ''; - } - else - { - print ''; - } - print ''; - - print "
'; - print 'Facturer'; - print '--'; - print 'Classer comme facturée'; - print '--
"; - } - print "

\n"; /* * Documents générés @@ -253,16 +231,19 @@ if ($_GET["id"] > 0) */ print ""; } - /* - * Factures associees - */ - $sql = "SELECT f.facnumber, f.total,".$db->pdate("f.datef")." as df, f.rowid as facid, f.fk_user_author, f.paye"; - $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."co_fa as fp WHERE fp.fk_facture = f.rowid AND fp.fk_commande = ".$commande->id; + /* + * Factures associees + */ + $sql = "SELECT f.facnumber, f.total,".$db->pdate("f.datef")." as df, f.rowid as facid, f.fk_user_author, f.paye"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."co_fa as fp WHERE fp.fk_facture = f.rowid AND fp.fk_commande = ".$commande->id; + + if ($db->query($sql) ) + { + $num_fac_asso = $db->num_rows(); + $i = 0; $total = 0; - if ($db->query($sql) ) + if ($num_fac_asso > 0) { - $num_fac_asso = $db->num_rows(); - $i = 0; $total = 0; print "
"; if ($num_fac_asso > 1) { @@ -307,18 +288,38 @@ if ($_GET["id"] > 0) } print "Total : $total Euros HT\n"; print ""; - $db->free(); - } - else - { - print $db->error(); } + $db->free(); + } + else + { + print $db->error(); + } /* * * */ - + print ''; + /* + * Barre d'actions + */ + if ($user->societe_id == 0 && !$commande->facturee) + { + print "

\n"; + + print 'Facturer'; + + if (!$commande->facturee && $num_fac_asso) + { + + print 'Classer comme facturée'; + + } + print '
'; + } + + } else {