X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fmsg_template.pm;h=614c90fc2fc6aaff78d4d41d22385b78a34a9ba2;hb=60b1ecc768ca172f115e6a82891b8a66f072a76e;hp=c183477fbe7ec9158fff41514d18f7499122b40c;hpb=f765ad6313abc1dc73bab4d3b617d2754cf85823;p=freeside.git diff --git a/FS/FS/msg_template.pm b/FS/FS/msg_template.pm index c183477fb..614c90fc2 100644 --- a/FS/FS/msg_template.pm +++ b/FS/FS/msg_template.pm @@ -262,6 +262,10 @@ The I field in the template takes precedence over this. Destination address. The default is to use the customer's invoicing_list addresses. Multiple addresses may be comma-separated. +=item substitutions + +A hash reference of additional substitutions + =back =cut @@ -324,8 +328,12 @@ sub prepare { } } } - $_ = encode_entities($_ || '') foreach values(%hash); + if ( $opt{substitutions} ) { + $hash{$_} = $opt{substitutions}->{$_} foreach keys %{$opt{substitutions}}; + } + + $_ = encode_entities($_ || '') foreach values(%hash); ### # clean up template