Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
3f8738ad2b
@ -784,6 +784,16 @@ class Translate
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_translations_for_substitutions() {
|
||||||
|
$substitutionarray = array();
|
||||||
|
|
||||||
|
foreach($this->tab_translate as $code => $label) {
|
||||||
|
$substitutionarray['lang_'.$code] = $label;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $substitutionarray;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
$this->option_modereg = 0; // Affiche mode reglement
|
$this->option_modereg = 0; // Affiche mode reglement
|
||||||
$this->option_condreg = 0; // Affiche conditions reglement
|
$this->option_condreg = 0; // Affiche conditions reglement
|
||||||
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
||||||
$this->option_multilang = 0; // Dispo en plusieurs langues
|
$this->option_multilang = 1; // Dispo en plusieurs langues
|
||||||
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
||||||
$this->option_credit_note = 0; // Support credit notes
|
$this->option_credit_note = 0; // Support credit notes
|
||||||
$this->option_freetext = 1; // Support add of a personalised text
|
$this->option_freetext = 1; // Support add of a personalised text
|
||||||
@ -534,6 +534,18 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
dol_syslog($this->error, LOG_WARNING);
|
dol_syslog($this->error, LOG_WARNING);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replace labels translated
|
||||||
|
$tmparray=$outputlangs->get_translations_for_substitutions();
|
||||||
|
foreach($tmparray as $key=>$value)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||||
|
}
|
||||||
|
catch(OdfException $e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Call the beforeODTSave hook
|
// Call the beforeODTSave hook
|
||||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||||||
$this->option_modereg = 0; // Affiche mode reglement
|
$this->option_modereg = 0; // Affiche mode reglement
|
||||||
$this->option_condreg = 0; // Affiche conditions reglement
|
$this->option_condreg = 0; // Affiche conditions reglement
|
||||||
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
||||||
$this->option_multilang = 0; // Dispo en plusieurs langues
|
$this->option_multilang = 1; // Dispo en plusieurs langues
|
||||||
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
||||||
$this->option_credit_note = 0; // Support credit notes
|
$this->option_credit_note = 0; // Support credit notes
|
||||||
$this->option_freetext = 1; // Support add of a personalised text
|
$this->option_freetext = 1; // Support add of a personalised text
|
||||||
@ -534,6 +534,18 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||||||
dol_syslog($this->error, LOG_WARNING);
|
dol_syslog($this->error, LOG_WARNING);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replace labels translated
|
||||||
|
$tmparray=$outputlangs->get_translations_for_substitutions();
|
||||||
|
foreach($tmparray as $key=>$value)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||||
|
}
|
||||||
|
catch(OdfException $e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Call the beforeODTSave hook
|
// Call the beforeODTSave hook
|
||||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
$this->option_modereg = 0; // Affiche mode reglement
|
$this->option_modereg = 0; // Affiche mode reglement
|
||||||
$this->option_condreg = 0; // Affiche conditions reglement
|
$this->option_condreg = 0; // Affiche conditions reglement
|
||||||
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
||||||
$this->option_multilang = 0; // Dispo en plusieurs langues
|
$this->option_multilang = 1; // Dispo en plusieurs langues
|
||||||
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
||||||
$this->option_credit_note = 0; // Support credit notes
|
$this->option_credit_note = 0; // Support credit notes
|
||||||
$this->option_freetext = 1; // Support add of a personalised text
|
$this->option_freetext = 1; // Support add of a personalised text
|
||||||
@ -514,6 +514,18 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
dol_syslog($this->error, LOG_WARNING);
|
dol_syslog($this->error, LOG_WARNING);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replace labels translated
|
||||||
|
$tmparray=$outputlangs->get_translations_for_substitutions();
|
||||||
|
foreach($tmparray as $key=>$value)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||||
|
}
|
||||||
|
catch(OdfException $e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Call the beforeODTSave hook
|
// Call the beforeODTSave hook
|
||||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
|
|||||||
@ -90,7 +90,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
$this->option_modereg = 0; // Affiche mode reglement
|
$this->option_modereg = 0; // Affiche mode reglement
|
||||||
$this->option_condreg = 0; // Affiche conditions reglement
|
$this->option_condreg = 0; // Affiche conditions reglement
|
||||||
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
||||||
$this->option_multilang = 0; // Dispo en plusieurs langues
|
$this->option_multilang = 1; // Dispo en plusieurs langues
|
||||||
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
||||||
$this->option_credit_note = 0; // Support credit notes
|
$this->option_credit_note = 0; // Support credit notes
|
||||||
$this->option_freetext = 1; // Support add of a personalised text
|
$this->option_freetext = 1; // Support add of a personalised text
|
||||||
@ -976,6 +976,18 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
dol_syslog($this->error, LOG_WARNING);
|
dol_syslog($this->error, LOG_WARNING);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replace labels translated
|
||||||
|
$tmparray=$outputlangs->get_translations_for_substitutions();
|
||||||
|
foreach($tmparray as $key=>$value)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||||
|
}
|
||||||
|
catch(OdfException $e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Call the beforeODTSave hook
|
// Call the beforeODTSave hook
|
||||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
$this->option_modereg = 0; // Affiche mode reglement
|
$this->option_modereg = 0; // Affiche mode reglement
|
||||||
$this->option_condreg = 0; // Affiche conditions reglement
|
$this->option_condreg = 0; // Affiche conditions reglement
|
||||||
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
||||||
$this->option_multilang = 0; // Dispo en plusieurs langues
|
$this->option_multilang = 1; // Dispo en plusieurs langues
|
||||||
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
$this->option_escompte = 0; // Affiche si il y a eu escompte
|
||||||
$this->option_credit_note = 0; // Support credit notes
|
$this->option_credit_note = 0; // Support credit notes
|
||||||
$this->option_freetext = 1; // Support add of a personalised text
|
$this->option_freetext = 1; // Support add of a personalised text
|
||||||
@ -487,6 +487,18 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
dol_syslog($this->error, LOG_WARNING);
|
dol_syslog($this->error, LOG_WARNING);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replace labels translated
|
||||||
|
$tmparray=$outputlangs->get_translations_for_substitutions();
|
||||||
|
foreach($tmparray as $key=>$value)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||||
|
}
|
||||||
|
catch(OdfException $e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Call the beforeODTSave hook
|
// Call the beforeODTSave hook
|
||||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
|
|||||||
@ -318,6 +318,18 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
// setVars failed, probably because key not found
|
// setVars failed, probably because key not found
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Replace labels translated
|
||||||
|
$tmparray=$outputlangs->get_translations_for_substitutions();
|
||||||
|
foreach($tmparray as $key=>$value)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||||
|
}
|
||||||
|
catch(OdfException $e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Call the beforeODTSave hook
|
// Call the beforeODTSave hook
|
||||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user