summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/TemplateItem_Mixin.pm2
-rw-r--r--FS/FS/quotation.pm21
-rw-r--r--FS/FS/quotation_pkg.pm3
3 files changed, 24 insertions, 2 deletions
diff --git a/FS/FS/TemplateItem_Mixin.pm b/FS/FS/TemplateItem_Mixin.pm
index f9ab51af6..324f05248 100644
--- a/FS/FS/TemplateItem_Mixin.pm
+++ b/FS/FS/TemplateItem_Mixin.pm
@@ -275,7 +275,7 @@ sub cust_bill_pkg_display {
my $order_by = $self->display_table_orderby || 'billpkgdisplaynum';
@result = qsearch ({ 'table' => $self->display_table,
- 'hashref' => { 'billpkgnum' => $self->billpkgnum },
+ 'hashref' => $hashref,
'order_by' => "ORDER BY $order_by",
});
}
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);
}
}