New: odt templates usage for invoices are now visible

This commit is contained in:
Laurent Destailleur 2011-05-12 22:38:19 +00:00
parent 09b6849b36
commit 77031ca5a4
5 changed files with 24 additions and 9 deletions

View File

@ -437,6 +437,14 @@ foreach ($conf->file->dol_document_root as $dirroot)
if (is_resource($handle))
{
while (($file = readdir($handle))!==false)
{
$filelist[]=$file;
}
closedir($handle);
//sort($filelist);
//var_dump($filelist);
foreach($filelist as $file)
{
if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
{
@ -532,7 +540,6 @@ foreach ($conf->file->dol_document_root as $dirroot)
}
}
}
closedir($handle);
}
}
}

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2010 Laurent Destailleur <ely@users.sourceforge.net>
/* Copyright (C) 2010-2011 Laurent Destailleur <ely@users.sourceforge.net>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -41,7 +41,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
var $emetteur; // Objet societe qui emet
var $phpmin = array(5,2,0); // Minimum version of PHP required by module
var $version = 'development';
var $version = 'dolibarr';
/**
* \brief Constructor
@ -179,7 +180,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$texthelp=$langs->trans("ListOfDirectoriesForModelGenODT");
// Add list of substitution keys
$texthelp.='<br>'.$langs->trans("FollowingSubstitutionKeysCanBeUsed").'<br>';
$dummy=new User($db);
/*$dummy=new User($db);
$tmparray=$this->get_substitutionarray_user($dummy,$langs);
$nb=0;
foreach($tmparray as $key => $val)
@ -204,7 +205,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$texthelp.='{'.$key.'}<br>';
$nb++;
if ($nb >= 5) { $texthelp.='...<br>'; break; }
}
}*/
$texthelp.=$langs->trans("FullListOnOnlineDocumentation");
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help');

View File

@ -44,6 +44,9 @@ class pdf_crabe extends ModelePDFFactures
{
var $emetteur; // Objet societe qui emet
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
var $version = 'dolibarr';
/**
* Constructor
@ -1093,7 +1096,7 @@ class pdf_crabe extends ModelePDFFactures
// Add list of linked orders and proposals
// TODO mutualiser
$object->fetchObjectLinked();
foreach($object->linkedObjects as $objecttype => $objects)
{
if ($objecttype == 'propal')

View File

@ -44,6 +44,10 @@ class pdf_oursin extends ModelePDFFactures
var $emetteur; // Objet societe qui emet
var $marges=array("g"=>10,"h"=>5,"d"=>10,"b"=>15);
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
var $version = 'dolibarr';
/**
* \brief Constructeur
* \param db Database handler
@ -964,7 +968,7 @@ class pdf_oursin extends ModelePDFFactures
// Add list of linked orders and proposals
// TODO mutualiser
$object->fectObjectLinked();
foreach($object->linkedObjects as $objecttype => $objects)
{
if ($objecttype == 'propal')

View File

@ -115,7 +115,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
$texthelp=$langs->trans("ListOfDirectoriesForModelGenODT");
// Add list of substitution keys
$texthelp.='<br>'.$langs->trans("FollowingSubstitutionKeysCanBeUsed").'<br>';
$dummy=new User($db);
/*$dummy=new User($db);
$tmparray=$this->get_substitutionarray_user($dummy,$langs);
$nb=0;
foreach($tmparray as $key => $val)
@ -140,7 +140,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
$texthelp.='{'.$key.'}<br>';
$nb++;
if ($nb >= 5) { $texthelp.='...<br>'; break; }
}
}*/
$texthelp.=$langs->trans("FullListOnOnlineDocumentation");
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help');