X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fmsg_template.pm;h=9c2b2844d78d19695a1f457e5bffbf860ddc842b;hb=f8c4741390077c1448d627949d19c9220cc8e610;hp=cb13696a58c35c53fd92adacbb2b9ae51fd64c4d;hpb=c112a7e56557acce5a54d3b57e4cdbab7c43ecc5;p=freeside.git diff --git a/FS/FS/msg_template.pm b/FS/FS/msg_template.pm index cb13696a5..9c2b2844d 100644 --- a/FS/FS/msg_template.pm +++ b/FS/FS/msg_template.pm @@ -660,6 +660,18 @@ sub substitutions { $cust_pay->paymask : $cust_pay->decrypt($cust_pay->payinfo) } ], ], + # for refund receipts + 'cust_refund' => [ + 'refundnum', + [ refund => sub { sprintf("%.2f", shift->refund) } ], + [ payby => sub { FS::payby->shortname(shift->payby) } ], + [ date => sub { time2str("%a %B %o, %Y", shift->_date) } ], + [ payinfo => sub { + my $cust_refund = shift; + ($cust_refund->payby eq 'CARD' || $cust_refund->payby eq 'CHEK') ? + $cust_refund->paymask : $cust_refund->decrypt($cust_refund->payinfo) + } ], + ], # for payment decline messages # try to support all cust_pay fields # 'error' is a special case, it contains the raw error from the gateway