Skip to content
Snippets Groups Projects
Commit 50184bab authored by Marcos García de La Fuente's avatar Marcos García de La Fuente
Browse files

FIX [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask

Close #2893
parent 2faa5d72
No related branches found
No related tags found
No related merge requests found
......@@ -2558,15 +2558,16 @@ class Facture extends CommonInvoice
$numref = "";
$numref = $obj->getNextValue($soc,$this,$mode);
if ($numref != "")
{
return $numref;
}
else
{
/**
* $numref can be empty in case we ask for the last value because if there is no invoice created with the
* set up mask.
*/
if ($mode != 'last' && !$numref) {
dol_print_error($db,"Facture::getNextNumRef ".$obj->error);
return "";
}
return $numref;
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment