From 821f900c5a594cdf3cff082e5d527eade23f2e18 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 12 Mar 2013 22:53:10 -0700 Subject: [PATCH] fix quotation totals, RT#21103 --- FS/FS/quotation.pm | 21 +++++++++++++++++++++ FS/FS/quotation_pkg.pm | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) 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); } } -- 2.11.0