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 ...@@ -2558,15 +2558,16 @@ class Facture extends CommonInvoice
$numref = ""; $numref = "";
$numref = $obj->getNextValue($soc,$this,$mode); $numref = $obj->getNextValue($soc,$this,$mode);
if ($numref != "") /**
{ * $numref can be empty in case we ask for the last value because if there is no invoice created with the
return $numref; * set up mask.
} */
else if ($mode != 'last' && !$numref) {
{
dol_print_error($db,"Facture::getNextNumRef ".$obj->error); dol_print_error($db,"Facture::getNextNumRef ".$obj->error);
return ""; return "";
} }
return $numref;
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment