forked from Wavyzz/dolibarr
FIX The part added with hidden option MAIN_DOC_USE_TIMING was included
with a . instead of -. This make os think it is part of extension instead of file name.
This commit is contained in:
@@ -273,7 +273,9 @@ class doc_generic_askpricesupplier_odt extends ModelePDFAskPriceSupplier
|
||||
$newfileformat=substr($newfile, strrpos($newfile, '.')+1);
|
||||
if ( ! empty($conf->global->MAIN_DOC_USE_TIMING))
|
||||
{
|
||||
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.'.$newfileformat;
|
||||
$format=$conf->global->MAIN_DOC_USE_TIMING;
|
||||
if ($format == '1') $format='%Y%m%d%H%M%S';
|
||||
$filename=$newfiletmp.'-'.dol_print_date(dol_now(),$format).'.'.$newfileformat;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -239,7 +239,9 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
$newfileformat=substr($newfile, strrpos($newfile, '.')+1);
|
||||
if ( ! empty($conf->global->MAIN_DOC_USE_TIMING))
|
||||
{
|
||||
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.'.$newfileformat;
|
||||
$format=$conf->global->MAIN_DOC_USE_TIMING;
|
||||
if ($format == '1') $format='%Y%m%d%H%M%S';
|
||||
$filename=$newfiletmp.'-'.dol_print_date(dol_now(),$format).'.'.$newfileformat;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -239,7 +239,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
$newfileformat=substr($newfile, strrpos($newfile, '.')+1);
|
||||
if ( ! empty($conf->global->MAIN_DOC_USE_TIMING))
|
||||
{
|
||||
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.'.$newfileformat;
|
||||
$format=$conf->global->MAIN_DOC_USE_TIMING;
|
||||
if ($format == '1') $format='%Y%m%d%H%M%S';
|
||||
$filename=$newfiletmp.'-'.dol_print_date(dol_now(),$format).'.'.$newfileformat;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -240,7 +240,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$newfileformat=substr($newfile, strrpos($newfile, '.')+1);
|
||||
if ( ! empty($conf->global->MAIN_DOC_USE_TIMING))
|
||||
{
|
||||
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.'.$newfileformat;
|
||||
$format=$conf->global->MAIN_DOC_USE_TIMING;
|
||||
if ($format == '1') $format='%Y%m%d%H%M%S';
|
||||
$filename=$newfiletmp.'-'.dol_print_date(dol_now(),$format).'.'.$newfileformat;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -449,7 +449,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
$newfileformat=substr($newfile, strrpos($newfile, '.')+1);
|
||||
if ( ! empty($conf->global->MAIN_DOC_USE_TIMING))
|
||||
{
|
||||
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.'.$newfileformat;
|
||||
$format=$conf->global->MAIN_DOC_USE_TIMING;
|
||||
if ($format == '1') $format='%Y%m%d%H%M%S';
|
||||
$filename=$newfiletmp.'-'.dol_print_date(dol_now(),$format).'.'.$newfileformat;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -273,7 +273,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
$newfileformat=substr($newfile, strrpos($newfile, '.')+1);
|
||||
if ( ! empty($conf->global->MAIN_DOC_USE_TIMING))
|
||||
{
|
||||
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.'.$newfileformat;
|
||||
$format=$conf->global->MAIN_DOC_USE_TIMING;
|
||||
if ($format == '1') $format='%Y%m%d%H%M%S';
|
||||
$filename=$newfiletmp.'-'.dol_print_date(dol_now(),$format).'.'.$newfileformat;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -211,7 +211,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
$newfileformat=substr($newfile, strrpos($newfile, '.')+1);
|
||||
if ( ! empty($conf->global->MAIN_DOC_USE_TIMING))
|
||||
{
|
||||
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.'.$newfileformat;
|
||||
$format=$conf->global->MAIN_DOC_USE_TIMING;
|
||||
if ($format == '1') $format='%Y%m%d%H%M%S';
|
||||
$filename=$newfiletmp.'-'.dol_print_date(dol_now(),$format).'.'.$newfileformat;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user