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);