summaryrefslogtreecommitdiff
path: root/FS/FS/Template_Mixin.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-01-16 20:40:20 -0800
committerMark Wells <mark@freeside.biz>2014-01-16 20:40:20 -0800
commitf16b7061d422461897e2a929fd47e2a7eecbaa64 (patch)
treefb0bb2da46df19db3bc52ce2c1f61f5c8b56d1c4 /FS/FS/Template_Mixin.pm
parent667092dd41cd5ffffbaa9fa0bb93b998aed565bd (diff)
when sending statements as payment receipts, ensure the payment appears on the statement, #24850
Diffstat (limited to 'FS/FS/Template_Mixin.pm')
-rw-r--r--FS/FS/Template_Mixin.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 2d9be618f..990f31fbc 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -1223,7 +1223,9 @@ sub print_generic {
# credits
my $credittotal = 0;
- foreach my $credit ( $self->_items_credits('trim_len'=>60) ) {
+ foreach my $credit (
+ $self->_items_credits( 'template' => $template, 'trim_len' => 60 )
+ ) {
my $total;
$total->{'total_item'} = &$escape_function($credit->{'description'});
@@ -1249,13 +1251,17 @@ sub print_generic {
$invoice_data{'credittotal'} = sprintf('%.2f', $credittotal);
#credits (again)
- foreach my $credit ( $self->_items_credits('trim_len'=>32) ) {
+ foreach my $credit (
+ $self->_items_credits( 'template' => $template, 'trim_len'=>32 )
+ ) {
push @buf, [ $credit->{'description'}, $money_char.$credit->{'amount'} ];
}
# payments
my $paymenttotal = 0;
- foreach my $payment ( $self->_items_payments ) {
+ foreach my $payment (
+ $self->_items_payments( 'template' => $template )
+ ) {
my $total = {};
$total->{'total_item'} = &$escape_function($payment->{'description'});
$paymenttotal += $payment->{'amount'};