From 420bfd8301ba8f9b7950338a26014b844e073d2b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 18 Oct 2015 19:09:35 +0200 Subject: [PATCH] FIX Preview pages was not using correct style for ref --- htdocs/comm/propal/apercu.php | 13 ++++++++----- htdocs/commande/apercu.php | 11 ++++++++--- htdocs/compta/facture/apercu.php | 20 ++++++++++++++++---- htdocs/fichinter/apercu.php | 29 +++++++++++++++-------------- 4 files changed, 47 insertions(+), 26 deletions(-) diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index 837dc48c670..cdeacefafe1 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -47,8 +47,9 @@ $result = restrictedArea($user, 'propal', $id); * View Mode */ -llxHeader(); +$form = new Form($db); +llxHeader(); if ($id > 0 || ! empty($ref)) { @@ -68,10 +69,12 @@ if ($id > 0 || ! empty($ref)) */ print ''; - // Ref - print ''; - print ''; - print ''; + $linkback = '' . $langs->trans("BackToList") . ''; + + // Ref + print ''; // Ref client print ''; diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 5d65ba1a493..1ec3a0533cc 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -47,6 +47,8 @@ $result=restrictedArea($user,'commande',$id,''); * View Mode */ +$form = new Form($db); + llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); if ($id > 0 || ! empty($ref)) @@ -64,9 +66,12 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans('Ref').''.$object->ref.'
' . $langs->trans('Ref') . ''; + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print '
'.$langs->trans('RefCustomer').'
'; - // Ref - print '"; - print ''; + //$linkback = '' . $langs->trans("BackToList") . ''; + + // Ref + print ''; // Ref cde client print ''; diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index b649dd43c43..1172769e95a 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -29,6 +29,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -79,10 +80,21 @@ if ($id > 0 || ! empty($ref)) */ print '
'.$langs->trans("Ref")."'.$object->ref.'
' . $langs->trans('Ref') . ''; + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); + print '
'.$langs->trans('RefCustomer').'
'; - // Ref - print ''; - print ''; - print ''; + $linkback = '' . $langs->trans("BackToList") . ''; + + // Ref + print ''; // Ref customer print ''; diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php index 9e08fae27ab..04ed6b71e19 100644 --- a/htdocs/fichinter/apercu.php +++ b/htdocs/fichinter/apercu.php @@ -72,13 +72,21 @@ if ($id > 0 || ! empty($ref)) */ print '
'.$langs->trans('Ref').''.$object->ref.'
' . $langs->trans('Ref') . ''; + $morehtmlref = ''; + $discount = new DiscountAbsolute($db); + $result = $discount->fetch(0, $object->id); + if ($result > 0) { + $morehtmlref = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')'; + } + if ($result < 0) { + dol_print_error('', $discount->error); + } + print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print '
'.$langs->trans('RefCustomer').'
'; - // Ref - print '"; - print ''; + $linkback = ''.$langs->trans("BackToList").''; + + // Ref + print ''; - $nbrow=4; + $nbrow=3; + // Client + print ""; + print ''; print '"; - // Client - print ""; - print ''; - print ''; - // Statut print ''; - print "\n"; + print "\n"; print ''; // Date print ''; - print "\n"; + print "\n"; print ''; print '
'.$langs->trans("Ref")."'.$object->ref.'
'.$langs->trans("Ref").''; + print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); + print '
".$langs->trans("Customer")."'; + print ''.$soc->name.''; + print ''; - + /* * Documents */ @@ -141,21 +149,14 @@ if ($id > 0 || ! empty($ref)) print "
".$langs->trans("Customer")."'; - print ''.$soc->name.''; - print '
'.$langs->trans("Status").'".$object->getLibStatut(4)."".$object->getLibStatut(4)."
'.$langs->trans("Date").'".dol_print_date($object->datec,"daytext")."".dol_print_date($object->datec,"daytext")."
';