add debugging
[freeside.git] / FS / FS / part_pkg / voip_cdr.pm
index 0634cdc..64ea20a 100644 (file)
@@ -43,7 +43,7 @@ tie my %temporalities, 'Tie::IxHash',
                          'default' => 0,
                        },
 
-    #probably useful for other usage-charging price plans
+    #false laziness w/flat.pm
     'recur_temporality' => { 'name' => 'Charge recurring fee for period',
                              'type' => 'select',
                              'select_options' => \%temporalities,
@@ -169,7 +169,7 @@ sub calc_recur {
   my $last_bill = $cust_pkg->get('last_bill'); #->last_bill falls back to setup
 
   return 0
-    if $self->option('recur_temporality') eq 'preceding' && $last_bill == 0;
+    if $self->option('recur_temporality', 1) eq 'preceding' && $last_bill == 0;
 
   my $ratenum = $cust_pkg->part_pkg->option('ratenum');
 
@@ -269,6 +269,8 @@ sub calc_recur {
             $number = $cdr->dst;
           }
 
+          warn "parsing call $to_or_from $number\n" if $DEBUG;
+
           #remove non-phone# stuff and whitespace
           $number =~ s/\s//g;
 #          my $proto = '';