Fix report error only if return code < 0
This commit is contained in:
parent
205b7f2e95
commit
f955f3f4ee
@ -91,7 +91,7 @@ if ($action == 'presend')
|
|||||||
if ((! $file || ! is_readable($file)) && method_exists($object, 'generateDocument'))
|
if ((! $file || ! is_readable($file)) && method_exists($object, 'generateDocument'))
|
||||||
{
|
{
|
||||||
$result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
$result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
if ($result <= 0) {
|
if ($result < 0) {
|
||||||
dol_print_error($db, $object->error, $object->errors);
|
dol_print_error($db, $object->error, $object->errors);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user