summaryrefslogtreecommitdiff
path: root/FS/FS/Template_Mixin.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-03-06 12:07:41 -0800
committerMark Wells <mark@freeside.biz>2015-03-06 12:08:40 -0800
commite19085190e34fce90b15bd9ec0c8d98b4fc8cd9a (patch)
treeb13614e9a15743d103eb8b422d8bb3aa47f6e08b /FS/FS/Template_Mixin.pm
parent3d104934825b8330437006b7a745c22b563d215a (diff)
estimate tax on quotations, #32489
Diffstat (limited to 'FS/FS/Template_Mixin.pm')
-rw-r--r--FS/FS/Template_Mixin.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 50659d17e..fe50e4a98 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -1267,7 +1267,7 @@ sub print_generic {
];
}
-
+
if ( @items_tax ) {
my $total = {};
$total->{'total_item'} = $self->mt('Sub-total');
@@ -1317,13 +1317,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
@@ -1545,7 +1544,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 ) {
@@ -3095,6 +3094,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;