fix quotation totals, RT#21103
[freeside.git] / FS / FS / quotation.pm
index bf2711b..47f13e6 100644 (file)
@@ -176,6 +176,36 @@ sub _total {
 
 }
 
+#prevent things from falsely showing up as taxes, at least until we support
+# quoting tax amounts..
+sub _items_tax {
+  return ();
+}
+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