New: Extrafields can be used as substitution key %EXTRA_XXX% into emails

texts for members.
This commit is contained in:
Laurent Destailleur 2014-04-25 14:39:34 +02:00
parent 03d73bce9c
commit 298da30200
3 changed files with 8 additions and 1 deletions

View File

@ -46,6 +46,7 @@ For users:
- New: Add option FACTURE_SENDBYEMAIL_FOR_ALL_STATUS to allow to send invoice by email
whatever is its status.
- New: Add filter date in bank writing list page.
- New: Extrafields can be used as substitution key %EXTRA_XXX% into emails texts for members.
- Fix: Project Task numbering customs rule works.
- Fix: Add actions events not implemented.
- Fix: Price min of composition is not supplier price min by quantity

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

View File

@ -169,7 +169,7 @@ class Adherent extends CommonObject
/**
* Make substitution
* Make substitution of tags into text with value of current object.
*
* @param string $text Text to make substitution to
* @return string Value of input text string with substitutions done
@ -230,6 +230,12 @@ class Adherent extends CommonObject
'%VILLE%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town,
'%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country,
);
// Add extrafields as substitution key %EXTRA_XXX%
foreach($this->array_options as $key => $val)
{
$keyshort=preg_replace('/^(options|extra)_/','',$key);
$substitutionarray['%EXTRA_'.$keyshort.'%']=$val;
}
complete_substitutions_array($substitutionarray, $langs);