X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FTemplate_Mixin.pm;h=ed6c8e09a45568b72ae8667bbbfb997ae2a59776;hb=35c18f29bc29dedfe2fa4ef037390d90b17f87ba;hp=9045291fc36ede40699c68ffd4cf4f1c8fdce3e5;hpb=8142815f404a02df9ba3f92ad8e703a7355c5bcd;p=freeside.git diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 9045291fc..ed6c8e09a 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -1266,7 +1266,7 @@ sub print_generic { ]; } - + if ( @items_tax ) { my $total = {}; $total->{'total_item'} = $self->mt('Sub-total'); @@ -1316,13 +1316,12 @@ sub print_generic { if ( $self->can('_items_total') ) { # quotations - $self->_items_total(\@total_items); + my @new_total_items = $self->_items_total; - foreach ( @total_items ) { + foreach ( @new_total_items ) { $_->{'total_item'} = &$embolden_function( $_->{'total_item'} ); - $_->{'total_amount'} = &$embolden_function( $other_money_char. - $_->{'total_amount'} - ); + $_->{'total_amount'} = &$embolden_function( $other_money_char.$_->{'total_amount'}); + push @total_items, $_; } } else { #normal invoice case @@ -1544,7 +1543,7 @@ sub print_generic { # invoice history "section" (not really a section) # not to be included in any subtotals, completely independent of # everything... - if ( $conf->exists('previous_invoice_history') ) { + if ( $conf->exists('previous_invoice_history') and $cust_main->isa('FS::cust_main') ) { my %history; my %monthorder; foreach my $cust_bill ( $cust_main->cust_bill ) { @@ -3094,6 +3093,7 @@ sub _items_cust_bill_pkg { ); if ( ref($cust_bill_pkg) eq 'FS::quotation_pkg' ) { + # XXX this should be pulled out into quotation_pkg warn "$me _items_cust_bill_pkg cust_bill_pkg is quotation_pkg\n" if $DEBUG > 1;