FIX date order was -1D and desc with label repetition
This commit is contained in:
parent
c80e37edf6
commit
834873ab15
@ -658,11 +658,11 @@ if ($massaction == 'confirm_createbills') // Create bills from orders
|
|||||||
|
|
||||||
for ($i=0;$i<$num;$i++)
|
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 we build one invoice for several order, we must put the invoice of order on the line
|
||||||
if (! empty($createbills_onebythird))
|
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)
|
if ($lines[$i]->subprice < 0)
|
||||||
|
|||||||
@ -1788,6 +1788,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang
|
|||||||
$format=str_replace('%A', '__A__', $format);
|
$format=str_replace('%A', '__A__', $format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Analyze date
|
// Analyze date
|
||||||
$reg=array();
|
$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
|
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);
|
$ret=adodb_strftime($format, $timetouse, $to_gmt);
|
||||||
}
|
}
|
||||||
else $ret='Bad value '.$time.' for date';
|
else $ret='Bad value '.$time.' for date';
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preg_match('/__b__/i', $format))
|
if (preg_match('/__b__/i', $format))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user