add skip_dcontext_suffix to skip CDRs with dcontext ending in a definable string...
[freeside.git] / FS / FS / part_pkg / voip_inbound.pm
index 811329d..81f2765 100644 (file)
@@ -167,7 +167,7 @@ tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
 
 sub price_info {
     my $self = shift;
-    my $str = $self->SUPER::price_info;
+    my $str = $self->SUPER::price_info(@_);
     $str .= " plus usage" if $str;
     $str;
 }
@@ -214,11 +214,16 @@ sub calc_usage {
 #  my $downstream_cdr = '';
 
   my $included_min  = $self->option('min_included', 1) || 0;
+  $included_min *= ($cust_pkg->quantity || 1);
   my $use_duration  = $self->option('use_duration');
   my $output_format = $self->option('output_format', 1) || 'default';
 
   my $formatter = 
-    FS::detail_format->new($output_format, buffer => $details, inbound => 1);
+    FS::detail_format->new($output_format,
+      buffer => $details,
+      inbound => 1,
+      locale => $cust_pkg->cust_main->locale
+    );
 
   my $granularity   = length($self->option('sec_granularity'))
                         ? $self->option('sec_granularity')
@@ -399,6 +404,7 @@ sub is_free {
 
 #  This equates svc_phone records; perhaps svc_phone should have a field
 #  to indicate it represents a line
+#  #XXX no count_available_phones?
 sub calc_units {    
   my($self, $cust_pkg ) = @_;
   my $count =