From: Ivan Kohler Date: Wed, 13 Mar 2013 05:53:10 +0000 (-0700) Subject: fix quotation totals, RT#21103 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=821f900c5a594cdf3cff082e5d527eade23f2e18 fix quotation totals, RT#21103 --- diff --git a/FS/FS/quotation.pm b/FS/FS/quotation.pm index 6d36f19d9..47f13e6dc 100644 --- a/FS/FS/quotation.pm +++ b/FS/FS/quotation.pm @@ -185,6 +185,27 @@ sub _items_nontax { shift->cust_bill_pkg; } +sub _items_total { + my( $self, $total_items ) = @_; + + if ( $self->total_setup > 0 ) { + push @$total_items, { + 'total_item' => $self->mt( $self->total_recur > 0 ? 'Total Setup' : 'Total' ), + 'total_amount' => $self->total_setup, + }; + } + + #could/should add up the different recurring frequencies on lines of their own + # but this will cover the 95% cases for now + if ( $self->total_recur > 0 ) { + push @$total_items, { + 'total_item' => $self->mt('Total Recurring'), + 'total_amount' => $self->total_recur, + }; + } + +} + =item enable_previous =cut diff --git a/FS/FS/quotation_pkg.pm b/FS/FS/quotation_pkg.pm index b5823f450..efff9683f 100644 --- a/FS/FS/quotation_pkg.pm +++ b/FS/FS/quotation_pkg.pm @@ -193,7 +193,8 @@ sub cust_bill_pkg_display { } elsif ( $type eq 'R' ) { return ($recur); } else { - return ($setup, $recur); + #return ($setup, $recur); + return ($self); } }