Skip to content

Commit

Permalink
Uniformize presentation of customer's invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Aug 31, 2016
1 parent a0591ac commit 3892f29
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 14 deletions.
8 changes: 5 additions & 3 deletions htdocs/compta/facture.php
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,9 @@

$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
Expand Down Expand Up @@ -2368,7 +2370,7 @@
}

// 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>';
Expand Down Expand Up @@ -3055,7 +3057,7 @@
// 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&amp;facid=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
Expand Down
8 changes: 5 additions & 3 deletions htdocs/compta/facture/apercu.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@

$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);

Expand Down Expand Up @@ -83,7 +85,7 @@
$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);
Expand Down Expand Up @@ -238,7 +240,7 @@
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
Expand Down
6 changes: 4 additions & 2 deletions htdocs/compta/facture/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@
* 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);
Expand Down Expand Up @@ -163,7 +165,7 @@
print '</td></tr>';

// Ref customer
print '<tr><td>';
print '<tr><td >';
print $langs->trans('RefCustomer');
print '</td>';
print '<td colspan="3">';
Expand Down
4 changes: 3 additions & 1 deletion htdocs/compta/facture/document.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
* 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);

Expand Down
4 changes: 3 additions & 1 deletion htdocs/compta/facture/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
* 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"]);
Expand Down
4 changes: 3 additions & 1 deletion htdocs/compta/facture/note.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
* 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);

Expand Down
6 changes: 4 additions & 2 deletions htdocs/compta/facture/prelevement.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@

$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);

Expand Down Expand Up @@ -290,7 +292,7 @@
// 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&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDate'),1).'</a></td>';
print '</tr></table>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/invoice.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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++;

Expand Down

0 comments on commit 3892f29

Please sign in to comment.