Merge pull request #5682 from aspangaro/5.0-p8

Fix: Uniformize presentation of customer's invoice
This commit is contained in:
Juanjo Menent 2016-08-31 10:06:09 +02:00 committed by GitHub
commit 966c1f61a3
8 changed files with 28 additions and 14 deletions

View File

@ -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&amp;facid=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';

View File

@ -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

View File

@ -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">';

View File

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

View File

@ -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"]);

View File

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

View File

@ -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&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDate'),1).'</a></td>';
print '</tr></table>';

View File

@ -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++;