Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0

This commit is contained in:
Laurent Destailleur 2021-10-31 14:24:19 +01:00
commit 6d918ad1c7
5 changed files with 13 additions and 21 deletions

View File

@ -2822,15 +2822,6 @@ if (empty($reshook))
* View
*/
if (empty($object->id)) {
llxHeader();
$head = facture_prepare_head($object);
$langs->load('errors');
echo dol_get_fiche_head($head, 'compta', $langs->trans("InvoiceCustomer"), -1, 'bill'),
'<div class="error">' . $langs->trans("ErrorRecordNotFound") . '</div>';
llxFooter();
exit;
}
$form = new Form($db);
$formother = new FormOther($db);
@ -3759,6 +3750,15 @@ if ($action == 'create')
}
elseif ($id > 0 || !empty($ref))
{
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound");
echo ' <a href="javascript:history.go(-1)">'.$langs->trans('GoBack').'</div>';
llxFooter();
exit;
}
/*
* Show object in view mode
*/

View File

@ -120,10 +120,8 @@ elseif ($action == 'deletecontact' && $user->rights->facture->creer)
if (empty($object->id)) {
llxHeader();
$head = facture_prepare_head($object);
$langs->load('errors');
echo dol_get_fiche_head($head, 'contact', $langs->trans("InvoiceCustomer"), -1, 'bill'),
'<div class="error">' . $langs->trans("ErrorRecordNotFound") . '</div>';
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}

View File

@ -88,10 +88,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
if (empty($object->id)) {
llxHeader();
$head = facture_prepare_head($object);
$langs->load('errors');
echo dol_get_fiche_head($head, 'documents', $langs->trans("InvoiceCustomer"), -1, 'bill'),
'<div class="error">' . $langs->trans("ErrorRecordNotFound") . '</div>';
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}

View File

@ -45,10 +45,8 @@ $ref = GETPOST("ref", 'alpha');
if (empty($object->id)) {
llxHeader();
$head = facture_prepare_head($object);
$langs->load('errors');
echo dol_get_fiche_head($head, 'info', $langs->trans("InvoiceCustomer"), -1, 'bill'),
'<div class="error">' . $langs->trans("ErrorRecordNotFound") . '</div>';
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}

View File

@ -66,10 +66,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
if (empty($object->id)) {
llxHeader();
$head = facture_prepare_head($object);
$langs->load('errors');
echo dol_get_fiche_head($head, 'note', $langs->trans("InvoiceCustomer"), -1, 'bill'),
'<div class="error">' . $langs->trans("ErrorRecordNotFound") . '</div>';
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}