This commit is contained in:
Laurent Destailleur 2011-06-13 17:09:57 +00:00
parent 685d7940e6
commit 8fcf634259
3 changed files with 17 additions and 7 deletions

View File

@ -40,7 +40,8 @@ class CommonDocGenerator
/** /**
* Define array with couple subtitution key => subtitution value * Define array with couple subtitution key => subtitution value
* *
* @param $mysoc * @param $user User
* @param $outputlangs Language object for output
*/ */
function get_substitutionarray_user($user,$outputlangs) function get_substitutionarray_user($user,$outputlangs)
{ {
@ -63,6 +64,7 @@ class CommonDocGenerator
* Define array with couple subtitution key => subtitution value * Define array with couple subtitution key => subtitution value
* *
* @param $mysoc * @param $mysoc
* @param $outputlangs Language object for output
*/ */
function get_substitutionarray_mysoc($mysoc,$outputlangs) function get_substitutionarray_mysoc($mysoc,$outputlangs)
{ {
@ -103,6 +105,7 @@ class CommonDocGenerator
* Define array with couple subtitution key => subtitution value * Define array with couple subtitution key => subtitution value
* *
* @param $object * @param $object
* @param $outputlangs Language object for output
*/ */
function get_substitutionarray_thirdparty($object,$outputlangs) function get_substitutionarray_thirdparty($object,$outputlangs)
{ {

View File

@ -386,7 +386,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
//print exit; //print exit;
// Make substitutions into odt // Make substitutions into odt of freetext
if ($newfreetext) if ($newfreetext)
{ {
try { try {
@ -396,6 +396,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
{ {
} }
} }
// Make substitutions into odt of user info
$tmparray=$this->get_substitutionarray_user($user,$outputlangs); $tmparray=$this->get_substitutionarray_user($user,$outputlangs);
//var_dump($tmparray); exit; //var_dump($tmparray); exit;
foreach($tmparray as $key=>$value) foreach($tmparray as $key=>$value)
@ -416,6 +417,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
{ {
} }
} }
// Make substitutions into odt of mysoc
$tmparray=$this->get_substitutionarray_mysoc($mysoc,$outputlangs); $tmparray=$this->get_substitutionarray_mysoc($mysoc,$outputlangs);
//var_dump($tmparray); exit; //var_dump($tmparray); exit;
foreach($tmparray as $key=>$value) foreach($tmparray as $key=>$value)
@ -436,6 +438,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
{ {
} }
} }
// Make substitutions into odt of thirdparty
$tmparray=$this->get_substitutionarray_thirdparty($socobject,$outputlangs); $tmparray=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
foreach($tmparray as $key=>$value) foreach($tmparray as $key=>$value)
{ {

View File

@ -1,5 +1,5 @@
<?php <?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 * 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 * it under the terms of the GNU General Public License as published by
@ -259,7 +259,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
//print $odfHandler->__toString()."\n"; //print $odfHandler->__toString()."\n";
// Make substitutions // Make substitutions into odt of user info
$tmparray=$this->get_substitutionarray_user($user,$outputlangs); $tmparray=$this->get_substitutionarray_user($user,$outputlangs);
//var_dump($tmparray); exit; //var_dump($tmparray); exit;
foreach($tmparray as $key=>$value) foreach($tmparray as $key=>$value)
@ -281,6 +281,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
{ {
} }
} }
// Make substitutions into odt of mysoc info
$tmparray=$this->get_substitutionarray_mysoc($mysoc,$outputlangs); $tmparray=$this->get_substitutionarray_mysoc($mysoc,$outputlangs);
//var_dump($tmparray); exit; //var_dump($tmparray); exit;
foreach($tmparray as $key=>$value) foreach($tmparray as $key=>$value)
@ -301,7 +302,10 @@ class doc_generic_odt extends ModeleThirdPartyDoc
{ {
} }
} }
// Make substitutions into odt of thirdparty + external modules
$tmparray=$this->get_substitutionarray_thirdparty($object,$outputlangs); $tmparray=$this->get_substitutionarray_thirdparty($object,$outputlangs);
complete_substitutions_array($tmparray, $langs, $object);
//var_dump($object->id); exit;
foreach($tmparray as $key=>$value) foreach($tmparray as $key=>$value)
{ {
try { try {