Merge pull request #19236 from marc-dll/11.0_FIX_invoice_creation_blocked
FIX: URGENT: impossible to create an invoice
This commit is contained in:
commit
ff696e0dad
@ -2756,15 +2756,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);
|
||||
@ -3679,6 +3670,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
|
||||
*/
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -87,10 +87,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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user