[freeside-commits] freeside/FS/FS/part_pkg voip_cdr.pm, 1.126, 1.127 voip_inbound.pm, 1.14, 1.15

Ivan,,, ivan at wavetail.420.am
Thu Sep 22 15:03:17 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv1500/FS/FS/part_pkg

Modified Files:
	voip_cdr.pm voip_inbound.pm 
Log Message:
pass cust_bill_pkg_detail as hash, not a long ordered list.  duh.

Index: voip_cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_cdr.pm,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -w -d -r1.126 -r1.127
--- voip_cdr.pm	11 Aug 2011 23:05:57 -0000	1.126
+++ voip_cdr.pm	22 Sep 2011 22:03:15 -0000	1.127
@@ -768,33 +768,33 @@
 
           if ( scalar(@call_details) == 1 ) {
             $call_details =
-              [ 'C',
-                $call_details[0],
-                $charge,
-                $classnum,
-                $phonenum,
-                $cdr->accountcode,
-                $cdr->startdate,
-                $seconds,
-                $regionname,
-              ];
+              { format      => 'C',
+                detail      => $call_details[0],
+                amount      => $charge,
+                classnum    => $classnum,
+                phonenum    => $phonenum,
+                accountcode => $cdr->accountcode,
+                startdate   => $cdr->startdate,
+                duration    => $seconds,
+                regionname  => $regionname,
+              };
           } else { #only used for $rating_method eq 'upstream' now
             $csv->combine(@call_details);
             $call_details =
-              [ 'C',
-                $csv->string,
-                $charge,
-                $classnum,
-                $phonenum,
-                $cdr->accountcode,
-                $cdr->startdate,
-                $seconds,
-                $regionname,
-              ];
+              { format      => 'C',
+                detail      => $csv->string,
+                amount      => $charge,
+                classnum    => $classnum,
+                phonenum    => $phonenum,
+                accountcode => $cdr->accountcode,
+                startdate   => $cdr->startdate,
+                duration    => $seconds,
+                regionname  => $regionname,
+              };
           }
-          warn "  adding details on charge to invoice: [ ".
-              join(', ', @{$call_details} ). " ]"
-            if ( $DEBUG && ref($call_details) );
+          #warn "  adding details on charge to invoice: [ ".
+          #    join(', ', @{$call_details} ). " ]"
+          #  if ( $DEBUG && ref($call_details) );
           push @invoice_details_sort, [ $call_details, $cdr->calldate_unix ];
         }
 
@@ -821,14 +821,9 @@
 
   } # $cust_svc
 
-  unshift @$details, [ 'C',
-                       FS::cdr::invoice_header($output_format),
-                       '',
-                       '',
-                       '',
-                       '',
-                       '',
-                     ]
+  unshift @$details, { format => 'C',
+                       detail => FS::cdr::invoice_header($output_format),
+                     }
     if @$details && $rating_method ne 'upstream';
 
 #  if ( $spool_cdr && length($downstream_cdr) ) {

Index: voip_inbound.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/voip_inbound.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -w -d -r1.14 -r1.15
--- voip_inbound.pm	11 Aug 2011 23:05:57 -0000	1.14
+++ voip_inbound.pm	22 Sep 2011 22:03:15 -0000	1.15
@@ -279,16 +279,16 @@
                                           )
                                 );
         push @$details,
-            [ 'C',
-              $call_details[0],
-              $charge,
-              $cdr->calltypenum, #classnum
-              $self->phonenum,
-              $cdr->accountcode,
-              $cdr->startdate,
-              $seconds,
-              '', #regionname, not set for inbound calls
-            ];
+          { format      => 'C',
+            detail      => $call_details[0],
+            amount      => $charge,
+            classnum    => $cdr->calltypenum, #classnum
+            phonenum    => $self->phonenum,
+            accountcode => $cdr->accountcode,
+            startdate   => $cdr->startdate,
+            duration    => $seconds,
+            # regionname?? => '', #regionname, not set for inbound calls
+          };
      }
 
      my $error = $cdr->set_status_and_rated_price( 'done',
@@ -299,14 +299,9 @@
 
     } #$cdr
   } # $cust_svc
-  unshift @$details, [ 'C',
-                       FS::cdr::invoice_header($output_format),
-                       '',
-                       '',
-                       '',
-                       '',
-                       '',
-                     ]
+  unshift @$details, { format => 'C',
+                       detail => FS::cdr::invoice_header($output_format),
+                     }
     if @$details;
 
   $charges;



More information about the freeside-commits mailing list