From 3cdb2d45c203d7c2babd4c49d01f6abfa30c9a12 Mon Sep 17 00:00:00 2001
From: aspangaro <alexandre.spangaro@gmail.com>
Date: Mon, 1 Aug 2016 07:10:42 +0200
Subject: [PATCH] Uniformize presentation customer invoice

---
 htdocs/compta/facture.php             |  6 +++---
 htdocs/compta/facture/contact.php     | 11 ++++-------
 htdocs/compta/facture/document.php    | 11 ++++-------
 htdocs/compta/facture/info.php        |  2 +-
 htdocs/compta/facture/note.php        | 11 ++++-------
 htdocs/compta/facture/prelevement.php | 16 ++++++++--------
 6 files changed, 24 insertions(+), 33 deletions(-)

diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 5af6240fa9e..d6d7e7f0ed8 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -1887,7 +1887,7 @@ if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
 
 $now = dol_now();
 
-llxHeader('', $langs->trans('Bill'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
+llxHeader('', $langs->trans('InvoiceCustomer'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
 
 
 // Mode creation
@@ -2931,7 +2931,7 @@ else if ($id > 0 || ! empty($ref))
 	$linkback = '<a href="' . DOL_URL_ROOT . '/compta/facture/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
 
 	// Ref
-	print '<tr><td width="20%">' . $langs->trans('Ref') . '</td>';
+	print '<tr><td class="titlefield">' . $langs->trans('Ref') . '</td>';
 	print '<td colspan="5">';
 	$morehtmlright = '';
 	$discount = new DiscountAbsolute($db);
@@ -2946,7 +2946,7 @@ else if ($id > 0 || ! empty($ref))
 	print '</td></tr>';
 
 	// Ref customer
-	print '<tr><td width="20%">';
+	print '<tr><td>';
 	print '<table class="nobordernopadding" width="100%"><tr><td>';
 	print $langs->trans('RefCustomer');
 	print '</td>';
diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php
index c5a7cfcdab2..a7fa51ff5ae 100644
--- a/htdocs/compta/facture/contact.php
+++ b/htdocs/compta/facture/contact.php
@@ -114,7 +114,7 @@ else if ($action == 'deletecontact' && $user->rights->facture->creer)
  * View
  */
 
-llxHeader('', $langs->trans("Bill"), "Facture");
+llxHeader('', $langs->trans("InvoiceCustomer"));
 
 $form = new Form($db);
 $formcompany = new FormCompany($db);
@@ -146,7 +146,7 @@ if ($id > 0 || ! empty($ref))
 		$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
 
 		// Ref
-		print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
+		print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
 		print '<td colspan="3">';
 		$morehtmlref='';
 		$discount=new DiscountAbsolute($db);
@@ -163,13 +163,10 @@ if ($id > 0 || ! empty($ref))
 		print '</td></tr>';
 
 		// Ref customer
-		print '<tr><td width="20%">';
-        print '<table class="nobordernopadding" width="100%"><tr><td>';
+		print '<tr><td>';
         print $langs->trans('RefCustomer');
         print '</td>';
-        print '</tr></table>';
-        print '</td>';
-        print '<td colspan="5">';
+        print '<td colspan="3">';
         print $object->ref_client;
 		print '</td></tr>';
 
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index 9a2bf3fe433..b25d52c173b 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -82,7 +82,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
  * View
  */
 
-llxHeader();
+llxHeader('', $langs->trans("InvoiceCustomer"));
 
 $form = new Form($db);
 
@@ -113,7 +113,7 @@ if ($id > 0 || ! empty($ref))
 		$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
 
 		// Ref
-		print '<tr><td width="30%">'.$langs->trans('Ref').'</td>';
+		print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
 		print '<td colspan="3">';
 		$morehtmlref='';
 		$discount=new DiscountAbsolute($db);
@@ -130,13 +130,10 @@ if ($id > 0 || ! empty($ref))
 		print '</td></tr>';
 
 		// Ref customer
-		print '<tr><td width="20%">';
-		print '<table class="nobordernopadding" width="100%"><tr><td>';
+		print '<tr><td>';
 		print $langs->trans('RefCustomer');
 		print '</td>';
-		print '</tr></table>';
-		print '</td>';
-		print '<td colspan="5">';
+		print '<td colspan="3">';
 		print $object->ref_client;
 		print '</td></tr>';
 
diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php
index 24164b5709a..250848319f3 100644
--- a/htdocs/compta/facture/info.php
+++ b/htdocs/compta/facture/info.php
@@ -35,7 +35,7 @@ $langs->load("bills");
  * View
  */
 
-llxHeader();
+llxHeader('', $langs->trans("InvoiceCustomer"));
 
 $fac = new Facture($db);
 $fac->fetch($_GET["facid"]);
diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php
index 3562a235963..77d3817d911 100644
--- a/htdocs/compta/facture/note.php
+++ b/htdocs/compta/facture/note.php
@@ -60,7 +60,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php';	// Must be include,
  * View
  */
 
-llxHeader();
+llxHeader('', $langs->trans("InvoiceCustomer"));
 
 $form = new Form($db);
 
@@ -81,7 +81,7 @@ if ($id > 0 || ! empty($ref))
     $linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
 
 	// Ref
-	print '<tr><td width="25%">'.$langs->trans('Ref').'</td>';
+	print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
 	print '<td colspan="3">';
 	$morehtmlref='';
 	$discount=new DiscountAbsolute($db);
@@ -98,13 +98,10 @@ if ($id > 0 || ! empty($ref))
 	print '</td></tr>';
 
 	// Ref customer
-	print '<tr><td width="20%">';
-	print '<table class="nobordernopadding" width="100%"><tr><td>';
+	print '<tr><td>';
 	print $langs->trans('RefCustomer');
 	print '</td>';
-	print '</tr></table>';
-	print '</td>';
-	print '<td colspan="5">';
+	print '<td colspan="3">';
 	print $object->ref_client;
 	print '</td></tr>';
 
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index 0fa260bbe34..6cdb53953d1 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -106,7 +106,7 @@ if ($action == "delete")
 
 $now=dol_now();
 
-llxHeader('', $langs->trans("Bill"));
+llxHeader('', $langs->trans("InvoiceCustomer"));
 
 $form = new Form($db);
 
@@ -155,7 +155,7 @@ if ($object->id > 0)
 	$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
 
 	// Ref
-	print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="5">';
+	print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="3">';
 	$morehtmlref='';
 	$discount=new DiscountAbsolute($db);
 	$result=$discount->fetch(0,$object->id);
@@ -171,24 +171,24 @@ if ($object->id > 0)
 	print "</td></tr>";
 
 	// Ref customer
-	print '<tr><td width="20%">';
+	print '<tr><td>';
 	print '<table class="nobordernopadding" width="100%"><tr><td>';
 	print $langs->trans('RefCustomer');
 	print '</td>';
 	print '</tr></table>';
 	print '</td>';
-	print '<td colspan="5">';
+	print '<td colspan="3">';
 	print $object->ref_client;
 	print '</td></tr>';
 
 	// Third party
 	print '<tr><td>'.$langs->trans('Company').'</td>';
-	print '<td colspan="5">'.$object->thirdparty->getNomUrl(1,'compta');
+	print '<td colspan="3">'.$object->thirdparty->getNomUrl(1,'compta');
 	print ' &nbsp; (<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->socid.'">'.$langs->trans('OtherBills').'</a>)</td>';
 	print '</tr>';
 
 	// Type
-	print '<tr><td>'.$langs->trans('Type').'</td><td colspan="5">';
+	print '<tr><td>'.$langs->trans('Type').'</td><td colspan="3">';
 	print $object->getLibType();
 	if ($object->type == Facture::TYPE_REPLACEMENT)
 	{
@@ -229,7 +229,7 @@ if ($object->id > 0)
 	print '</td></tr>';
 
 	// Discounts
-	print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="5">';
+	print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">';
 	if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$object->thirdparty->remise_percent);
 	else print $langs->trans("CompanyHasNoRelativeDiscount");
 	print '. ';
@@ -443,7 +443,7 @@ if ($object->id > 0)
 	print '<tr><td>'.$langs->trans('Status').'</td>';
 	print '<td align="left" colspan="3">'.($object->getLibStatut(4,$totalpaye)).'</td></tr>';
 
-	print '<tr><td>'.$langs->trans("RIB").'</td><td colspan="5">';
+	print '<tr><td>'.$langs->trans("RIB").'</td><td colspan="3">';
 	print $object->thirdparty->display_rib();
 	print '</td></tr>';
 
-- 
GitLab