From 3892f295c752bd01b74a9363e7a55a03cf2c6321 Mon Sep 17 00:00:00 2001 From: aspangaro <alexandre.spangaro@gmail.com> Date: Wed, 31 Aug 2016 06:27:35 +0200 Subject: [PATCH] Uniformize presentation of customer's invoice --- htdocs/compta/facture.php | 8 +++++--- htdocs/compta/facture/apercu.php | 8 +++++--- htdocs/compta/facture/contact.php | 6 ++++-- htdocs/compta/facture/document.php | 4 +++- htdocs/compta/facture/info.php | 4 +++- htdocs/compta/facture/note.php | 4 +++- htdocs/compta/facture/prelevement.php | 6 ++++-- htdocs/core/lib/invoice.lib.php | 2 +- 8 files changed, 28 insertions(+), 14 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index a3ead34c8fc..b821769e666 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1880,7 +1880,9 @@ if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } $now = dol_now(); -llxHeader('', $langs->trans('InvoiceCustomer'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes'); +$title = $langs->trans('InvoiceCustomer') . " - " . $langs->trans('Card'); +$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; +llxHeader('', $title, $helpurl); // Mode creation @@ -2368,7 +2370,7 @@ if ($action == 'create') } // Date invoice - print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">'; + print '<tr><td class="fieldrequired">' . $langs->trans('DateInvoice') . '</td><td colspan="2">'; $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); print $form->select_date($datefacture?$datefacture:$dateinvoice, '', '', '', '', "add", 1, 1, 1); print '</td></tr>'; @@ -3055,7 +3057,7 @@ else if ($id > 0 || ! empty($ref)) // Date invoice print '<tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'; - print $langs->trans('Date'); + print $langs->trans('DateInvoice'); print '</td>'; if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editinvoicedate&facid=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>'; diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 1172769e95a..8300545cb22 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -50,7 +50,9 @@ $result = restrictedArea($user, 'facture', $id); $now=dol_now(); -llxHeader('',$langs->trans("Bill"),'Facture'); +$title = $langs->trans('InvoiceCustomer') . " - " . $langs->trans('Preview'); +$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; +llxHeader('', $title, $helpurl); $form = new Form($db); @@ -83,7 +85,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>' . $langs->trans('Ref') . '</td><td colspan="5">'; + print '<tr><td class="titlefield">' . $langs->trans('Ref') . '</td><td colspan="5">'; $morehtmlref = ''; $discount = new DiscountAbsolute($db); $result = $discount->fetch(0, $object->id); @@ -238,7 +240,7 @@ if ($id > 0 || ! empty($ref)) print '</tr>'; // Dates - print '<tr><td>'.$langs->trans("Date").'</td>'; + print '<tr><td>'.$langs->trans("DateInvoice").'</td>'; print '<td>'.dol_print_date($object->date,"daytext").'</td>'; // Right part with $rowspan lines diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index a7fa51ff5ae..ebc90fca6c5 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -114,7 +114,9 @@ else if ($action == 'deletecontact' && $user->rights->facture->creer) * View */ -llxHeader('', $langs->trans("InvoiceCustomer")); +$title = $langs->trans('InvoiceCustomer') . " - " . $langs->trans('ContactsAddresses'); +$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; +llxHeader('', $title, $helpurl); $form = new Form($db); $formcompany = new FormCompany($db); @@ -163,7 +165,7 @@ if ($id > 0 || ! empty($ref)) print '</td></tr>'; // Ref customer - print '<tr><td>'; + print '<tr><td >'; print $langs->trans('RefCustomer'); print '</td>'; print '<td colspan="3">'; diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index b25d52c173b..9a15b7875d8 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -82,7 +82,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; * View */ -llxHeader('', $langs->trans("InvoiceCustomer")); +$title = $langs->trans('InvoiceCustomer') . " - " . $langs->trans('Documents'); +$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; +llxHeader('', $title, $helpurl); $form = new Form($db); diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 250848319f3..39334e7ccb6 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -35,7 +35,9 @@ $langs->load("bills"); * View */ -llxHeader('', $langs->trans("InvoiceCustomer")); +$title = $langs->trans('InvoiceCustomer') . " - " . $langs->trans('Info'); +$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; +llxHeader('', $title, $helpurl); $fac = new Facture($db); $fac->fetch($_GET["facid"]); diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 77d3817d911..4b4b68a7cf4 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -60,7 +60,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, * View */ -llxHeader('', $langs->trans("InvoiceCustomer")); +$title = $langs->trans('InvoiceCustomer') . " - " . $langs->trans('Notes'); +$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; +llxHeader('', $title, $helpurl); $form = new Form($db); diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 74a41dee31c..87a27166ae8 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -106,7 +106,9 @@ if ($action == "delete") $now=dol_now(); -llxHeader('', $langs->trans("InvoiceCustomer")); +$title = $langs->trans('InvoiceCustomer') . " - " . $langs->trans('StandingOrders'); +$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; +llxHeader('', $title, $helpurl); $form = new Form($db); @@ -290,7 +292,7 @@ if ($object->id > 0) // Date invoice print '<tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'; - print $langs->trans('Date'); + print $langs->trans('DateInvoice'); print '</td>'; if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editinvoicedate&id='.$object->id.'">'.img_edit($langs->trans('SetDate'),1).'</a></td>'; print '</tr></table>'; diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index f947caf5609..f48a248ab14 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -39,7 +39,7 @@ function facture_prepare_head($object) $head = array(); $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$object->id; - $head[$h][1] = $langs->trans('CardBill'); + $head[$h][1] = $langs->trans('Card'); $head[$h][2] = 'compta'; $h++; -- GitLab