diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index 83bdc3b4715..e514515c6fb 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -26,6 +26,9 @@ \version $Revision$ */ + +// Code identique a /expedition/fiche.php + require("./pre.inc.php"); $user->getrights('commande'); @@ -62,7 +65,7 @@ if ($_POST["action"] == 'confirm_cloture' && $_POST["confirm"] == 'yes') /* */ /* *************************************************************************** */ -llxHeader('','Fiche commande',''); +llxHeader('',$langs->trans("OrderCard")); $html = new Form($db); @@ -104,6 +107,10 @@ if ($_GET["id"] > 0) $h++; } + $head[$h][0] = DOL_URL_ROOT.'/commande/info.php?id='.$commande->id; + $head[$h][1] = $langs->trans("Info"); + $h++; + dolibarr_fiche_head($head, $hselected, $langs->trans("Order").": $commande->ref"); /* @@ -116,6 +123,7 @@ if ($_GET["id"] > 0) print "
"; } + // Onglet expedition print ''; print ''; print '
'.$langs->trans("Customer").''; @@ -146,9 +154,8 @@ if ($_GET["id"] > 0) print '
'; - - /* - * Lignes de commandes + /** + * Lignes de commandes avec quantité livrées et reste à livrer * */ echo '
'; @@ -167,13 +174,13 @@ if ($_GET["id"] > 0) $i = 0; $total = 0; print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; if ($conf->stock->enabled) { - print ''; + print ''; } print "\n"; @@ -187,12 +194,13 @@ if ($_GET["id"] > 0) print ""; if ($objp->fk_product > 0) { - $product = new Product($db); $product->fetch($objp->fk_product); - print ''; + print ''; + print img_object($langs->trans("Product"),"product").' '.$product->ref.''; + print $product->libelle?' - '.$product->libelle:''; + print ''; } else { @@ -236,30 +244,50 @@ if ($_GET["id"] > 0) { print $langs->trans("None").'
'; } - + } else { dolibarr_print_error($db); } + print ''; + + /* - * - * - */ - if ($reste_a_livrer_total > 0 && $commande->brouillon == 0) + * Boutons Actions + */ + if ($user->societe_id == 0) { - print ''; + print '
'; + + if (! $conf->stock->enabled && $reste_a_livrer_total > 0 && $commande->brouillon == 0 && $user->rights->expedition->creer) + { + print ''.$langs->trans("NewSending").''; + } + + print "
"; + + } + + + /** + * Formulaire nouvelle expedition depuis un entrepot + */ + if ($conf->stock->enabled && $reste_a_livrer_total > 0 && $commande->brouillon == 0 && $user->rights->expedition->creer) + { + + print ''; print ''; + print ''; print ''; - print '
'.$langs->trans("Products").'Quan. CommandéeQuan. livréeReste à livrer'.$langs->trans("Description").''.$langs->trans("QtyOrdered").''.$langs->trans("QtyShipped").''.$langs->trans("KeepToShip").'Stock'.$langs->trans("Stock").'
'; - print ''.stripslashes(nl2br($objp->description)).'
'; + print '
'; $entrepot = new Entrepot($db); $langs->load("stocks"); - print ''; - - print ''; + print ''; + print ''; print ''; */ + print ''; + print "
'.$langs->trans("NewSending").'
'.$langs->trans("Warehouse").'
'.$langs->trans("Warehouse").''; $html->select_array("entrepot_id",$entrepot->list_array()); if (sizeof($entrepot->list_array()) <= 0) @@ -274,6 +302,10 @@ if ($_GET["id"] > 0) print '
'; + print ''; + print '

"; print "\n"; } @@ -312,7 +344,7 @@ if ($_GET["id"] > 0) $db->free($resql); } else { - dolibarr_print_date($db); + dolibarr_print_error($db); } } @@ -320,30 +352,6 @@ if ($_GET["id"] > 0) print ""; } - print ''; - - /* - * Boutons Actions - */ - if ($user->societe_id == 0) - { - print '
'; - - if ($user->rights->expedition->creer && $reste_a_livrer_total > 0 && $commande->brouillon == 0) - { - print ''.$langs->trans("CreateSending").''; - } - - if ($user->rights->commande->creer && $reste_a_livrer_total == 0 && $commande->statut < 3) - { - print ''.$langs->trans("Close").''; - } - - print "
"; - - } - - /* * Déjà livr */ @@ -371,7 +379,7 @@ if ($_GET["id"] > 0) while ($i < $num) { $objp = $db->fetch_object($resql); - print ""; + print ""; if ($objp->fk_product > 0) { print ''; @@ -390,7 +398,7 @@ if ($_GET["id"] > 0) } } else { - dolibarr_print_date($db); + dolibarr_print_error($db); } } else