[freeside-commits] freeside/FS/FS cust_main.pm, 1.344, 1.345 cdr.pm, 1.12, 1.13

Ivan,,, ivan at wavetail.420.am
Thu Jun 5 12:24:34 PDT 2008


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

Modified Files:
	cust_main.pm cdr.pm 
Log Message:
voxlinesystems CDRs and quantity bs

Index: cdr.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cdr.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cdr.pm	4 Jun 2008 17:59:00 -0000	1.12
+++ cdr.pm	5 Jun 2008 19:24:32 -0000	1.13
@@ -422,7 +422,7 @@
   ],
   'voxlinesystems' => [
     sub { time2str('%D', shift->calldate_unix ) },   #DATE
-    sub { time2str('%T', shift->calldate_unix ) },   #TIME
+    sub { time2str('%r', shift->calldate_unix ) },   #TIME
     'userfield',                                     #USER
     'dst',                                           #NUMBER_DIALED
     sub { sprintf('%.2fm', shift->billsec / 60 ) },  #DURATION
@@ -729,9 +729,9 @@
     'enddate',                            #End (also a timestamp!)
     sub { my($cdr, $field) = @_; },       #End date
     sub { my($cdr, $field) = @_; },       #End time
-    'accountcode',                        #Calling customer XXX map to agent_custid??
+    'accountcode',                        #Calling customer... map to agent_custid??
     sub { my($cdr, $field) = @_; },       #Calling type
-    sub { shift->src('30000'); }, #XXX FAKE XXX 'src',                                #Calling number
+    'src',
     'userfield',                          #Calling name #?
     sub { my($cdr, $field) = @_; },       #Called type
     'dst',                                #Called number

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.344
retrieving revision 1.345
diff -u -d -r1.344 -r1.345
--- cust_main.pm	5 Jun 2008 10:36:42 -0000	1.344
+++ cust_main.pm	5 Jun 2008 19:24:32 -0000	1.345
@@ -4675,9 +4675,10 @@
 
 sub charge {
   my $self = shift;
-  my ( $amount, $pkg, $comment, $taxclass, $additional, $classnum );
+  my ( $amount, $quantity, $pkg, $comment, $taxclass, $additional, $classnum );
   if ( ref( $_[0] ) ) {
     $amount     = $_[0]->{amount};
+    $quantity   = exists($_[0]->{quantity}) ? $_[0]->{quantity} : 1;
     $pkg        = exists($_[0]->{pkg}) ? $_[0]->{pkg} : 'One-time charge';
     $comment    = exists($_[0]->{comment}) ? $_[0]->{comment}
                                            : '$'. sprintf("%.2f",$amount);
@@ -4686,6 +4687,7 @@
     $additional = $_[0]->{additional};
   }else{
     $amount     = shift;
+    $quantity   = 1;
     $pkg        = @_ ? shift : 'One-time charge';
     $comment    = @_ ? shift : '$'. sprintf("%.2f",$amount);
     $taxclass   = @_ ? shift : '';
@@ -4738,8 +4740,9 @@
   }
 
   my $cust_pkg = new FS::cust_pkg ( {
-    'custnum' => $self->custnum,
-    'pkgpart' => $pkgpart,
+    'custnum'  => $self->custnum,
+    'pkgpart'  => $pkgpart,
+    'quantity' => $quantity,
   } );
 
   $error = $cust_pkg->insert;



More information about the freeside-commits mailing list