From 313addec74cda8481ac48c6e984e23905e81adeb Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Tue, 27 Sep 2022 09:21:28 +0200 Subject: [PATCH 1/3] FIX - php V8 get number doc saphir --- htdocs/core/modules/propale/mod_propale_saphir.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index af7579fb142..72ca13f3a4c 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -144,7 +144,7 @@ class mod_propale_saphir extends ModeleNumRefPropales // Get entities $entity = getEntity('proposalnumber', 1, $propal); - $date = $propal->date; + $date = isset($propal->date)?$propal->date:dol_now(); $numFinal = get_next_value($db, $mask, 'propal', 'ref', '', $objsoc, $date, 'next', false, null, $entity); From ef662ef6e43412ef25513e3a72823191c0c3e5f0 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Wed, 28 Sep 2022 09:25:22 +0200 Subject: [PATCH 2/3] php V7 --- htdocs/core/modules/propale/mod_propale_saphir.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 72ca13f3a4c..39a9c9e6195 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -144,7 +144,7 @@ class mod_propale_saphir extends ModeleNumRefPropales // Get entities $entity = getEntity('proposalnumber', 1, $propal); - $date = isset($propal->date)?$propal->date:dol_now(); + $date = $propal->date ?? dol_now(); $numFinal = get_next_value($db, $mask, 'propal', 'ref', '', $objsoc, $date, 'next', false, null, $entity); From dd4d73fd69ca073b50af039bea470dcde5da4856 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Sep 2022 20:29:50 +0200 Subject: [PATCH 3/3] Update mod_propale_saphir.php --- htdocs/core/modules/propale/mod_propale_saphir.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 39a9c9e6195..3e6ec1507e5 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -144,7 +144,7 @@ class mod_propale_saphir extends ModeleNumRefPropales // Get entities $entity = getEntity('proposalnumber', 1, $propal); - $date = $propal->date ?? dol_now(); + $date = empty($propal->date) ? dol_now() : $propal->date; $numFinal = get_next_value($db, $mask, 'propal', 'ref', '', $objsoc, $date, 'next', false, null, $entity);