Ejemplo n.º 1
0
require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/order.lib.php';
if (!$user->rights->commande->lire) {
    accessforbidden();
}
$langs->load("orders");
$langs->load("sendings");
// Security check
$socid = 0;
$comid = GETPOST("id", 'int');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'commande', $comid, '');
/*
 * View
 */
llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
$commande = new Commande($db);
$commande->fetch($comid);
$commande->info($comid);
$soc = new Societe($db);
$soc->fetch($commande->socid);
$head = commande_prepare_head($commande);
dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), 0, 'order');
print '<table width="100%"><tr><td>';
dol_print_object_info($commande);
print '</td></tr></table>';
print '</div>';
$db->close();
llxFooter();
Ejemplo n.º 2
0
require_once DOL_DOCUMENT_ROOT . "/commande/class/commande.class.php";
require_once DOL_DOCUMENT_ROOT . "/core/lib/order.lib.php";
if (!$user->rights->commande->lire) {
    accessforbidden();
}
$langs->load("orders");
$langs->load("sendings");
// Security check
$socid = 0;
$comid = isset($_GET["id"]) ? $_GET["id"] : '';
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'commande', $comid, '');
/*
 * View
 */
llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
$commande = new Commande($db);
$commande->fetch($_GET["id"]);
$commande->info($_GET["id"]);
$soc = new Societe($db);
$soc->fetch($commande->socid);
$head = commande_prepare_head($commande);
dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), 0, 'order');
print '<table width="100%"><tr><td>';
dol_print_object_info($commande);
print '</td></tr></table>';
print '</div>';
$db->close();
llxFooter();