summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-03-12 22:53:10 -0700
committerIvan Kohler <ivan@freeside.biz>2013-03-12 22:53:10 -0700
commit821f900c5a594cdf3cff082e5d527eade23f2e18 (patch)
treeb67c025b22ebbc26d5f01e89bc63c9bc981aa741
parent1bcdfeb83a6757101cfc1e3122e5c8d157ecb8fd (diff)
fix quotation totals, RT#21103
-rw-r--r--FS/FS/quotation.pm21
-rw-r--r--FS/FS/quotation_pkg.pm3
2 files changed, 23 insertions, 1 deletions
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);
}
}