Update info.php

This commit is contained in:
Laurent Destailleur 2021-12-16 17:04:25 +01:00 committed by GitHub
parent cc12baed57
commit dc1118a3df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,31 +38,30 @@ $langs->loadLangs(array('companies', 'bills'));
$id = GETPOST("facid", "int");
$ref = GETPOST("ref", 'alpha');
$object = new Facture($db);
$object->fetch($id, $ref);
/*
* View
*/
$object = new Facture($db);
$object->fetch($id, $ref);
$object->fetch_thirdparty();
$object->info($object->id);
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$form = new Form($db);
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);
if (empty($object->id)) {
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$object->fetch_thirdparty();
$object->info($object->id);
$head = facture_prepare_head($object);
print dol_get_fiche_head($head, 'info', $langs->trans("InvoiceCustomer"), -1, 'bill');