diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 3a429bf1128..e5734547a95 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -658,11 +658,11 @@ if ($massaction == 'confirm_createbills') // Create bills from orders for ($i=0;$i<$num;$i++) { - $desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle); + $desc=($lines[$i]->desc?$lines[$i]->desc:''); // If we build one invoice for several order, we must put the invoice of order on the line if (! empty($createbills_onebythird)) { - $desc=dol_concatdesc($desc, $langs->trans("Order").' '.$cmd->ref.' - '.dol_print_date($cmd->date, 'day', $langs)); + $desc=dol_concatdesc($desc, $langs->trans("Order").' '.$cmd->ref.' - '.dol_print_date($cmd->date, 'day')); } if ($lines[$i]->subprice < 0) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8b2a31874ca..25a5ab85973 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1788,6 +1788,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang $format=str_replace('%A', '__A__', $format); } + // Analyze date $reg=array(); if (preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000 @@ -1821,6 +1822,8 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang $ret=adodb_strftime($format, $timetouse, $to_gmt); } else $ret='Bad value '.$time.' for date'; + + } if (preg_match('/__b__/i', $format))