Update apercu.php

This commit is contained in:
Frédéric FRANCE 2014-11-27 21:03:51 +01:00
parent 950fad9227
commit 6483b34d0d

View File

@ -4,6 +4,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Frederic France <frederic.france@free.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -33,7 +34,6 @@ require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
$langs->load('orders'); $langs->load('orders');
$langs->load("bills"); $langs->load("bills");
$langs->load('compta'); $langs->load('compta');
$langs->load('sendings');
// Security check // Security check
$socid=0; $socid=0;
@ -44,18 +44,11 @@ $result=restrictedArea($user,'commande',$id,'');
/* /*
* View * View Mode
*/ */
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
/* *************************************************************************** */
/* */
/* Mode fiche */
/* */
/* *************************************************************************** */
if ($id > 0 || ! empty($ref)) if ($id > 0 || ! empty($ref))
{ {
$object = new Commande($db); $object = new Commande($db);
@ -72,21 +65,36 @@ if ($id > 0 || ! empty($ref))
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref // Ref
print '<tr><td width="18%">'.$langs->trans("Ref")."</td>"; print '<tr><td width="25%">'.$langs->trans("Ref")."</td>";
print '<td colspan="2">'.$object->ref.'</td></tr>'; print '<td colspan="5">'.$object->ref.'</td></tr>';
// Ref cde client // Ref cde client
print '<tr><td>'; print '<tr><td>'.$langs->trans('RefCustomer').'</td>';
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">'; print '<td colspan="5">'.$object->ref_client.'</td>';
print $langs->trans('RefCustomer').'</td><td align="left">'; print '</tr>';
print '</td>';
print '</tr></table>'; // Client
print '</td>'; print '<tr><td>'.$langs->trans("Customer").'</td>';
print '<td colspan="2">'; print '<td colspan="5">'.$soc->getNomUrl(1).'</td>';
print $object->ref_client; print '</tr>';
print '</td>';
$nbrow=8; // Statut
print '<td rowspan="'.$nbrow.'" valign="top">'; print '<tr><td>'.$langs->trans("Status").'</td>';
print '<td colspan="5">'.$object->getLibStatut(4).'</td>';
print '</tr>';
// Discount - left part
print '<tr><td>'.$langs->trans('Discounts').'</td>';
print '<td colspan="5">'.$object->remise_percent.'%</td>';
print '</tr>';
// Date - left part
print '<tr><td>'.$langs->trans("Date").'</td>';
print '<td colspan="3">'.dol_print_date($object->date,"daytext").'</td>';
// Right part with $rowspan lines
$rowspan=4;
print '<td rowspan="'.$rowspan.'" valign="top" width="50%">';
/* /*
* Documents * Documents
@ -149,27 +157,7 @@ if ($id > 0 || ! empty($ref))
} }
} }
print "</td></tr>"; print '</td></tr>';
// Client
print '<tr><td>'.$langs->trans("Customer").'</td>';
print '<td colspan="2">'.$soc->getNomUrl(1).'</td>';
print '</tr>';
// Statut
print '<tr><td>'.$langs->trans("Status").'</td>';
print '<td colspan="2">'.$object->getLibStatut(4).'</td>';
print '</tr>';
// Date
print '<tr><td>'.$langs->trans("Date").'</td>';
print '<td colspan="2">'.dol_print_date($object->date,"daytext").'</td>';
print '</tr>';
// Discount - left part
print '<tr><td class="nowrap">'.$langs->trans('GlobalDiscount').'</td>';
print '<td colspan="2">'.$object->remise_percent.'%</td>';
print '</tr>';
// Total HT - left part // Total HT - left part
print '<tr><td>'.$langs->trans('AmountHT').'</td>'; print '<tr><td>'.$langs->trans('AmountHT').'</td>';