From 238b139274821d384fcb41ce07cb73398823aa27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 26 Nov 2014 19:52:38 +0100 Subject: [PATCH 1/3] Update apercu.php --- htdocs/commande/apercu.php | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 839ca73d5b9..118b8e12475 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -77,16 +77,7 @@ if ($id > 0 || ! empty($ref)) // Ref print ''.$langs->trans("Ref").""; - print ''.$object->ref.''; - print ''.$langs->trans("Source").' : '.$object->getLabelSource(); - if ($object->source == 0) - { - // Propale - $propal = new Propal($db); - $propal->fetch($object->propale_id); - print ' -> '.$propal->ref.''; - } - print ""; + print ''.$object->ref.''; // Ref cde client print ''; @@ -183,15 +174,14 @@ if ($id > 0 || ! empty($ref)) // ligne 6 // partie Gauche - print ''.$langs->trans('GlobalDiscount').''; + print ''.$langs->trans('GlobalDiscount').''; print ''.$object->remise_percent.'%'; print ''; // ligne 7 // partie Gauche - print ''.$langs->trans('AmountHT').''; - print ''.price($object->total_ht).''; - print ''.$langs->trans("Currency".$conf->currency).''; + print ''.$langs->trans('AmountHT').''; + print '' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . ''; print ''; dol_fiche_end(); From 950fad92279d5dff4bfd1c795c3e6ced2e23afd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 27 Nov 2014 17:49:48 +0100 Subject: [PATCH 2/3] Update apercu.php --- htdocs/commande/apercu.php | 70 ++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 118b8e12475..f8e4b39aae9 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -22,18 +22,15 @@ /** * \file htdocs/commande/apercu.php * \ingroup commande - * \brief Page de l'onglet apercu d'une commande + * \brief Preview tab of order */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $langs->load('orders'); -$langs->load('propal'); $langs->load("bills"); $langs->load('compta'); $langs->load('sendings'); @@ -52,7 +49,6 @@ $result=restrictedArea($user,'commande',$id,''); llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); -$form = new Form($db); /* *************************************************************************** */ /* */ @@ -89,7 +85,7 @@ if ($id > 0 || ! empty($ref)) print ''; print $object->ref_client; print ''; - $nbrow=6; + $nbrow=8; print ''; /* @@ -110,16 +106,16 @@ if ($id > 0 || ! empty($ref)) $var=true; - // Si fichier PDF existe + // if PDF file exist if (file_exists($file)) { $encfile = urlencode($file); - print_titre($langs->trans("Documents")); - print ''; + print '
'; + print ''; print ""; - print ''; + print ''; print ''; print ''; print ''; @@ -130,7 +126,7 @@ if ($id > 0 || ! empty($ref)) { print ""; - print ''; + print ''; print ''; print ''; print ''; @@ -156,33 +152,41 @@ if ($id > 0 || ! empty($ref)) print ""; // Client - print ""; - print ''; + print ''; + print ''; print ''; // Statut print ''; - print "\n"; + print ''; print ''; // Date print ''; - print "\n"; - print ''; + print ''; + print ''; - // ligne 6 - // partie Gauche - print ''; - print ''; - print ''; + // Discount - left part + print ''; + print ''; + print ''; - // ligne 7 - // partie Gauche - print ''; - print ''; - print '
'.$langs->trans("Documents").'
".$langs->trans("Order")." PDF'.$object->ref.'.pdf'.$object->ref.'.pdf'.dol_print_size(dol_filesize($file)).''.dol_print_date(dol_filemtime($file),'dayhour').'
Commande detaillee'.$object->ref.'-detail.pdf'.$object->ref.'-detail.pdf'.dol_print_size(dol_filesize($filedetail)).''.dol_print_date(dol_filemtime($filedetail),'dayhour').'
".$langs->trans("Customer")."'; - print ''.$soc->getNomUrl(1).''; - print '
'.$langs->trans("Customer").''.$soc->getNomUrl(1).'
'.$langs->trans("Status").'".$object->getLibStatut(4)."'.$object->getLibStatut(4).'
'.$langs->trans("Date").'".dol_print_date($object->date,"daytext")."
'.dol_print_date($object->date,"daytext").'
'.$langs->trans('GlobalDiscount').''.$object->remise_percent.'%
'.$langs->trans('GlobalDiscount').''.$object->remise_percent.'%
'.$langs->trans('AmountHT').'' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '
'; + // Total HT - left part + print ''.$langs->trans('AmountHT').''; + print '' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . ''; + print ''; + + // Total VAT - left part + print ''.$langs->trans('AmountVAT').''; + print '' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . ''; + print ''; + + // Total TTC - left part + print ''.$langs->trans('AmountTTC').''; + print '' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . ''; + print ''; + + print ''; dol_fiche_end(); } @@ -193,10 +197,13 @@ if ($id > 0 || ! empty($ref)) } } +print ''; +print ''; +print '
'; +print '
'; // Si fichier png PDF d'1 page trouve if (file_exists($fileimage)) { - print ''; + print ''; } // Si fichier png PDF de plus d'1 page trouve elseif (file_exists($fileimagebis)) @@ -209,10 +216,13 @@ elseif (file_exists($fileimagebis)) if (file_exists($dir_output.$preview)) { - print '

'; + print '

'; } } } +print '

'; +print '
'; llxFooter(); From 6483b34d0d04690ac496be1655a7941d487d09bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 27 Nov 2014 21:03:51 +0100 Subject: [PATCH 3/3] Update apercu.php --- htdocs/commande/apercu.php | 88 ++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 50 deletions(-) diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index f8e4b39aae9..e6878eef179 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -3,7 +3,8 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2014 Frederic France * * 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 @@ -33,7 +34,6 @@ require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $langs->load('orders'); $langs->load("bills"); $langs->load('compta'); -$langs->load('sendings'); // Security check $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'); - -/* *************************************************************************** */ -/* */ -/* Mode fiche */ -/* */ -/* *************************************************************************** */ - if ($id > 0 || ! empty($ref)) { $object = new Commande($db); @@ -66,31 +59,46 @@ if ($id > 0 || ! empty($ref)) $soc->fetch($object->socid); - $head = commande_prepare_head($object); + $head = commande_prepare_head($object); dol_fiche_head($head, 'preview', $langs->trans("CustomerOrder"), 0, 'order'); - print ''; + print '
'; // Ref - print '"; - print ''; + print '"; + print ''; // Ref cde client - print ''; - print ''; - $nbrow=8; - print ''; + print ''; + print ''; - /* - * Documents - */ + // Client + print ''; + print ''; + print ''; + + // Statut + print ''; + print ''; + print ''; + + // Discount - left part + print ''; + print ''; + print ''; + + // Date - left part + print ''; + print ''; + + // Right part with $rowspan lines + $rowspan=4; + print '"; - - // Client - print ''; - print ''; - print ''; - - // Statut - print ''; - print ''; - print ''; - - // Date - print ''; - print ''; - print ''; - - // Discount - left part - print ''; - print ''; - print ''; + print ''; // Total HT - left part print ''; @@ -203,7 +191,7 @@ print '
'; // Si fichier png PDF d'1 page trouve if (file_exists($fileimage)) { - print ''; + print ''; } // Si fichier png PDF de plus d'1 page trouve elseif (file_exists($fileimagebis))
'.$langs->trans("Ref")."'.$object->ref.'
'.$langs->trans("Ref")."'.$object->ref.'
'; - print ''; - print '
'; - print $langs->trans('RefCustomer').''; - print '
'; - print '
'; - print $object->ref_client; - print ''; + print '
'.$langs->trans('RefCustomer').''.$object->ref_client.'
'.$langs->trans("Customer").''.$soc->getNomUrl(1).'
'.$langs->trans("Status").''.$object->getLibStatut(4).'
'.$langs->trans('Discounts').''.$object->remise_percent.'%
'.$langs->trans("Date").''.dol_print_date($object->date,"daytext").''; + + /* + * Documents + */ $objectref = dol_sanitizeFileName($object->ref); $dir_output = $conf->commande->dir_output . "/"; $filepath = $dir_output . $objectref . "/"; @@ -149,27 +157,7 @@ if ($id > 0 || ! empty($ref)) } } - print "
'.$langs->trans("Customer").''.$soc->getNomUrl(1).'
'.$langs->trans("Status").''.$object->getLibStatut(4).'
'.$langs->trans("Date").''.dol_print_date($object->date,"daytext").'
'.$langs->trans('GlobalDiscount').''.$object->remise_percent.'%
'.$langs->trans('AmountHT').'