[ bug #85 ] Facture sur modèle ODT

This commit is contained in:
Laurent Destailleur 2011-10-18 03:23:28 +02:00
parent 39df11d2ba
commit 58a4d397e6
2 changed files with 3 additions and 1 deletions

View File

@ -291,7 +291,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
if (file_exists($dir))
{
//print "srctemplatepath=".$srctemplatepath; // Src filename
$newfile=basename($srctemplatepath);
$newfile=$objectref;
$newfiletmp=preg_replace('/\.odt/i','',$newfile);
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
$file=$dir.'/'.$newfiletmp.'.odt';

View File

@ -211,6 +211,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc
//print "srctemplatepath=".$srctemplatepath; // Src filename
$newfile=basename($srctemplatepath);
$newfiletmp=preg_replace('/\.odt/i','',$newfile);
$newfiletmp=preg_replace('/template_/i','',$newfiletmp);
$newfiletmp=preg_replace('/modele_/i','',$newfiletmp);
$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
//print "newdir=".$dir;
//print "newfile=".$newfile;