fix quotation totals, RT#21103
authorIvan Kohler <ivan@freeside.biz>
Wed, 13 Mar 2013 05:53:10 +0000 (22:53 -0700)
committerIvan Kohler <ivan@freeside.biz>
Wed, 13 Mar 2013 05:53:10 +0000 (22:53 -0700)
FS/FS/quotation.pm
FS/FS/quotation_pkg.pm

index 6d36f19..47f13e6 100644 (file)
@@ -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
index b5823f4..efff968 100644 (file)
@@ -193,7 +193,8 @@ sub cust_bill_pkg_display {
     } elsif ( $type eq 'R' ) {
       return ($recur);
     } else {
-      return ($setup, $recur);
+      #return ($setup, $recur);
+      return ($self);
     }
 
   }