From 50184babb95a19ff01efb76696b3e3b60441af8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 1 Sep 2015 16:38:53 +0200 Subject: [PATCH 1/3] FIX [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask Close #2893 --- htdocs/compta/facture/class/facture.class.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index f5a7c27ecd1..72103f6ac5a 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -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 { From bd21cf5d68c764f989e1fbea8a5125d0ca6c8290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 3 Sep 2015 11:58:20 +0200 Subject: [PATCH 2/3] Updated changelog --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0291eeb3a21..a612e867ecb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 3.6.4 compared to 3.6.3 ***** +- Fix: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask + ***** ChangeLog for 3.6.3 compared to 3.6.2 ***** - Fix: ref_ext was not saved when recording a customer order from web service - Fix: amarok is a bugged theme making dolidroid failed. We switch to eldy automatically with dolidroid. @@ -43,6 +46,7 @@ English Dolibarr ChangeLog - Fix: Not showing product supplier reference when page break - Fix: [ bug #3341 ] Missing translation in /compta/paiement_charge.php - Fix: [ bug #3342 ] Taxes dictionary page does not accept localized decimals for localtax2 rate +- Fix: [ bug ***** ChangeLog for 3.6.2 compared to 3.6.1 ***** - Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice. From 7a115c9366ea56e2239738e4cc023d17d96d6876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 3 Sep 2015 11:59:46 +0200 Subject: [PATCH 3/3] Typo --- ChangeLog | 1 - 1 file changed, 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a612e867ecb..f83979aa8e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -46,7 +46,6 @@ English Dolibarr ChangeLog - Fix: Not showing product supplier reference when page break - Fix: [ bug #3341 ] Missing translation in /compta/paiement_charge.php - Fix: [ bug #3342 ] Taxes dictionary page does not accept localized decimals for localtax2 rate -- Fix: [ bug ***** ChangeLog for 3.6.2 compared to 3.6.1 ***** - Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.