turn off debugging
[freeside.git] / FS / FS / ClientAPI / PrepaidPhone.pm
index bcde292..c346179 100644 (file)
@@ -152,7 +152,7 @@ sub call_time {
   unless ( $rate_detail->min_charge > 0 ) {
     #XXX no charge??  return lots of seconds, a default, 0 or what?
     #return { 'error' => '0 rate for +$rate_countrycode $rate_phonenum; prepaid service not available" };
-    $return{'seconds'} = 1800; #half hour?!
+    #customer wants no default for now# $return{'seconds'} = 1800; #half hour?!
     return \%return;
   }
 
@@ -230,12 +230,17 @@ Customer balance.
 sub phonenum_balance {
   my $packet = shift;
 
+  warn "$me phonenum_balance called with countrycode ".$packet->{'countrycode'}.
+       " and phonenum ". $packet->{'phonenum'}. "\n"
+    if $DEBUG;
+
   my $svc_phone = qsearchs('svc_phone', {
     'countrycode' => ( $packet->{'countrycode'} || 1 ),
     'phonenum'    => $packet->{'phonenum'},
   });
 
   unless ( $svc_phone ) {
+    warn "$me no phone number found\n" if $DEBUG;
     return { 'custnum' => '',
              'balance' => 0,
            };
@@ -243,6 +248,10 @@ sub phonenum_balance {
 
   my $cust_pkg = $svc_phone->cust_svc->cust_pkg;
 
+  warn "$me returning ". $cust_pkg->cust_main->balance.
+       " balance for custnum ". $cust_pkg->custnum
+    if $DEBUG;
+
   return {
     'custnum' => $cust_pkg->custnum,
     'balance' => $cust_pkg->cust_main->balance,