[freeside-commits] freeside/FS/FS cust_main.pm, 1.501, 1.502 cust_credit.pm, 1.40, 1.41 cust_event.pm, 1.9, 1.10

Ivan,,, ivan at wavetail.420.am
Tue Mar 30 05:07:50 PDT 2010


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

Modified Files:
	cust_main.pm cust_credit.pm cust_event.pm 
Log Message:
employee commission reporting, RT#6991

Index: cust_event.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_event.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- cust_event.pm	4 Dec 2009 04:40:28 -0000	1.9
+++ cust_event.pm	30 Mar 2010 12:07:48 -0000	1.10
@@ -1,18 +1,16 @@
 package FS::cust_event;
 
 use strict;
+use base qw( FS::cust_main_Mixin FS::Record );
 use vars qw( @ISA $DEBUG $me );
 use Carp qw( croak confess );
 use FS::Record qw( qsearch qsearchs dbdef );
-use FS::cust_main_Mixin;
 use FS::part_event;
 #for cust_X
 use FS::cust_main;
 use FS::cust_pkg;
 use FS::cust_bill;
 
- at ISA = qw(FS::cust_main_Mixin FS::Record);
-
 $DEBUG = 0;
 $me = '[FS::cust_event]';
 
@@ -230,7 +228,7 @@
   my $error;
   {
     local $SIG{__DIE__}; # don't want Mason __DIE__ handler active
-    $error = eval { $part_event->do_action($object); };
+    $error = eval { $part_event->do_action($object, $self); };
   }
 
   my $status = '';

Index: cust_credit.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_credit.pm,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -w -d -r1.40 -r1.41
--- cust_credit.pm	29 Mar 2010 00:23:07 -0000	1.40
+++ cust_credit.pm	30 Mar 2010 12:07:48 -0000	1.41
@@ -14,6 +14,7 @@
 use FS::part_pkg;
 use FS::reason_type;
 use FS::reason;
+use FS::cust_event;
 
 $me = '[ FS::cust_credit ]';
 $DEBUG = 0;
@@ -300,6 +301,7 @@
     || $self->ut_textn('addlinfo')
     || $self->ut_enum('closed', [ '', 'Y' ])
     || $self->ut_foreign_keyn('pkgnum', 'cust_pkg', 'pkgnum')
+    || $self->ut_foreign_keyn('eventnum', 'cust_event', 'eventnum')
   ;
   return $error if $error;
 

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.501
retrieving revision 1.502
diff -u -w -d -r1.501 -r1.502
--- cust_main.pm	29 Mar 2010 09:18:22 -0000	1.501
+++ cust_main.pm	30 Mar 2010 12:07:47 -0000	1.502
@@ -7447,7 +7447,7 @@
 
 Like referral_cust_main, except returns a flat list of all unsuspended (and
 uncancelled) packages for each customer.  The number of items in this list may
-be useful for comission calculations (perhaps after a C<grep { my $pkgpart = $_->pkgpart; grep { $_ == $pkgpart } @commission_worthy_pkgparts> } $cust_main-> ).
+be useful for commission calculations (perhaps after a C<grep { my $pkgpart = $_->pkgpart; grep { $_ == $pkgpart } @commission_worthy_pkgparts> } $cust_main-> ).
 
 =cut
 
@@ -7509,8 +7509,10 @@
     $cust_credit->set('reason', $reason)
   }
 
-  $cust_credit->addlinfo( delete $options{'addlinfo'} )
-    if exists($options{'addlinfo'});
+  for (qw( addlinfo eventnum )) {
+    $cust_credit->$_( delete $options{$_} )
+      if exists($options{$_});
+  }
 
   $cust_credit->insert(%options);
 



More information about the freeside-commits mailing list