Skip to content
Snippets Groups Projects
Commit 036e81a0 authored by Jean-François Ferry's avatar Jean-François Ferry
Browse files

Use MAIN_DOC_USE_TIMING on proposals (ODT)

parent bfc15fb9
No related branches found
No related tags found
No related merge requests found
......@@ -275,16 +275,27 @@ class doc_generic_proposal_odt extends ModelePDFPropales
{
//print "srctemplatepath=".$srctemplatepath; // Src filename
$newfile=basename($srctemplatepath);
$newfiletmp=preg_replace('/\.odt/i','',$newfile);
$newfiletmp=preg_replace('/\.od(t|s)/i','',$newfile);
$newfiletmp=preg_replace('/template_/i','',$newfiletmp);
$newfiletmp=preg_replace('/modele_/i','',$newfiletmp);
$newfiletmp=$objectref.'_'.$newfiletmp;
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
$file=$dir.'/'.$newfiletmp.'.odt';
// Get extension (ods or odt)
$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;
}
else
{
$filename=$newfiletmp.'.'.$newfileformat;
}
$file=$dir.'/'.$filename;
//print "newdir=".$dir;
//print "newfile=".$newfile;
//print "file=".$file;
//print "conf->societe->dir_temp=".$conf->societe->dir_temp;
//print "conf->propal->dir_temp=".$conf->propal->dir_temp;
dol_mkdir($conf->propal->dir_temp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment