diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index 13fce187438..a912d27451c 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -78,7 +78,7 @@ $html = new Form($db); if ($_GET["id"] > 0) { - $commande = New Commande($db); + $commande = new Commande($db); if ( $commande->fetch($_GET["id"]) > 0) { $soc = new Societe($db); @@ -111,56 +111,84 @@ if ($_GET["id"] > 0) $h++; } - dolibarr_fiche_head($head, $hselected, $soc->nom." / ".$langs->trans("Order")." : $commande->ref"); - - /* - * Commande - */ - print ''; - print '"; - print ''; - print ''; - print ''; - - print ""; - print ''; + dolibarr_fiche_head($head, $hselected, $langs->trans("Order").": $commande->ref"); - print '"; - - print ''; - print "\n"; - - print ''; - - // Ligne de 3 colonnes + /* + * Commande + */ + print '
'.$langs->trans("Order")."'.$commande->ref.''.$commande->statuts[$commande->statut].''; + $head[$h][0] = DOL_URL_ROOT.'/commande/info.php?id='.$commande->id; + $head[$h][1] = $langs->trans("Info"); + $h++; - if ($conf->projet->enabled) - { - $langs->load("projects"); - if ($commande->projet_id > 0) - { - print $langs->trans("Project").' : '; - $projet = New Project($db); - $projet->fetch($commande->projet_id); - print ''.$projet->title.''; - } - } - print ' 
".$langs->trans("Customer")."'; - print ''.$soc->nom.''.$langs->trans("Source").' : ' . $commande->sources[$commande->source] ; - if ($commande->source == 0) - { - /* Propale */ - $propal = new Propal($db); - $propal->fetch($commande->propale_id); - print ' -> '.$propal->ref.''; - } - print "
'.$langs->trans("Date").'".dolibarr_print_date($commande->date,"%A %d %B %Y")."'; - - print $langs->trans("Author").' : '.$author->fullname.'
'; + print '"; + print ''; + print '"; + + print ""; + print ''; + print ''; + + print ''; + print "\n"; + $nbrow=6; + if ($conf->projet->enabled) $nbrow++; + print ''; + + print ''; + print "\n"; + print ''; + + // Projet + if ($conf->projet->enabled) + { + $langs->load("projects"); + print '"; + } else { + print ''; + } + + // Lignes de 3 colonnes print ''; print ''; - print ''; - print ''; + print ''; print ''; print "\n"; } - $var=True; + + $var=true; while ($i < $num) { $objp = $db->fetch_object($result); + $var=!$var; print ""; if ($objp->fk_product > 0) @@ -241,7 +271,7 @@ if ($_GET["id"] > 0) /* - * Barre d'actions + * Boutons actions */ if (! $user->societe_id && ! $commande->facturee)
'.$langs->trans("Ref")."'.$commande->ref.''.$langs->trans("Source").' : ' . $commande->sources[$commande->source] ; + if ($commande->source == 0) + { + /* Propale */ + $propal = new Propal($db); + $propal->fetch($commande->propale_id); + print ' -> '.$propal->ref.''; + } + print "
".$langs->trans("Customer")."'; + print ''.$soc->nom.'
'.$langs->trans("Status").'".$commande->statuts[$commande->statut]."'.$langs->trans("Note").' :
'; + if ($commande->brouillon == 1 && $user->rights->commande->creer) + { + print '
'; + print ''; + print '
'; + print '
'; + print '
'; + } + else + { + print nl2br($commande->note); + } + print '
'.$langs->trans("Date").'".dolibarr_print_date($commande->date,"%A %d %B %Y")."
'; + print ''; + //if ($_GET["action"] != "classer") print ''; + print '
'; + print $langs->trans("Project"); + print 'id.'">'.img_edit($langs->trans("SetProject")).'
'; + print '
'; + if ($_GET["action"] == "classer") + { + $html->form_project($_SERVER["PHP_SELF"]."?id=$commande->id",$commande->fk_soc,$commande->projetid,"projetid"); + } + else + { + $html->form_project($_SERVER["PHP_SELF"]."?id=$commande->id",$commande->fk_soc,$commande->projetid,"none"); + } + print "  
'.$langs->trans("AmountHT").''.price($commande->total_ht).''.$langs->trans("Currency".$conf->monnaie).''.$langs->trans("Note").' :
'.nl2br($commande->note).'
'.$langs->trans("Currency".$conf->monnaie).'
'.$langs->trans("GlobalDiscount").''; print $commande->remise_percent.' % '; @@ -198,10 +226,12 @@ if ($_GET["id"] > 0) print '