Merge pull request #7817 from grandoc/new_branch_15_11_17

better handle of errors
This commit is contained in:
Laurent Destailleur 2017-11-17 13:09:35 +01:00 committed by GitHub
commit 7946f4a612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1520,13 +1520,13 @@ class ExpenseReport extends CommonObject
$this->error=$obj->error;
$this->errors=$obj->errors;
//dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error);
return "";
return -1;
}
}
else
{
print $langs->trans("Error")." ".$langs->trans("Error_EXPENSEREPORT_ADDON_NotDefined");
return "";
$this->error = "Error_EXPENSEREPORT_ADDON_NotDefined";
return -2;
}
}