diff --git a/htdocs/compta/commande.php b/htdocs/compta/commande.php index 2df2b6f607b..fc5ef9b17c1 100644 --- a/htdocs/compta/commande.php +++ b/htdocs/compta/commande.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003-2005 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -24,12 +24,12 @@ require("./pre.inc.php"); $user->getrights('commande'); $user->getrights('facture'); -if (!$user->rights->commande->lire) - accessforbidden(); -require("../project.class.php"); -require("../propal.class.php"); -require("../commande/commande.class.php"); +if (!$user->rights->commande->lire) accessforbidden(); + +require_once DOL_DOCUMENT_ROOT."/project.class.php"; +require_once DOL_DOCUMENT_ROOT."/propal.class.php"; +require_once DOL_DOCUMENT_ROOT."/commande/commande.class.php"; /* * Sécurité accés client @@ -50,7 +50,6 @@ if ($_GET["action"] == 'facturee') $commande->classer_facturee(); } - llxHeader(); $html = new Form($db); @@ -72,7 +71,6 @@ if ($_GET["id"] > 0) $author->id = $commande->user_author_id; $author->fetch(); - $head[0][0] = DOL_URL_ROOT.'/compta/commande.php?id='.$commande->id; $head[0][1] = "Commande : $commande->ref"; $h = 1; @@ -126,16 +124,14 @@ if ($_GET["id"] > 0) print $commande->remise_percent.' % '; + print ''; + print nl2br($commande->note)." \n"; print ''; print ''.$langs->trans("VAT").''.price($commande->total_tva).''; print ''.$conf->monnaie.''; print ''.$langs->trans("TotalTTC").''.price($commande->total_ttc).''; print ''.$conf->monnaie.''; - if ($commande->note) - { - print ''.$langs->trans("Note").' : '.nl2br($commande->note).""; - } print ""; @@ -143,7 +139,7 @@ if ($_GET["id"] > 0) * Lignes de commandes * */ - echo '
'; + echo '
'; $sql = "SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice"; $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as l WHERE l.fk_commande =".$commande->id." ORDER BY l.rowid"; @@ -315,13 +311,13 @@ if ($_GET["id"] > 0) if ($user->rights->facture->creer) { - print 'Facturer'; + print 'Facturer'; } if (!$commande->facturee && $num_fac_asso) { if ($user->rights->commande->creer) - print 'Classer comme facturée'; + print 'Classer comme facturée'; } print '';