[freeside-commits] freeside/FS/FS cust_main.pm, 1.464.2.27, 1.464.2.28 cust_credit.pm, 1.38, 1.38.2.1 cust_event.pm, 1.7.2.2, 1.7.2.3

Ivan,,, ivan at wavetail.420.am
Tue Mar 30 05:09:23 PDT 2010


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

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	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.7.2.2
retrieving revision 1.7.2.3
diff -u -w -d -r1.7.2.2 -r1.7.2.3
--- cust_event.pm	4 Dec 2009 04:40:43 -0000	1.7.2.2
+++ cust_event.pm	30 Mar 2010 12:09:21 -0000	1.7.2.3
@@ -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.38
retrieving revision 1.38.2.1
diff -u -w -d -r1.38 -r1.38.2.1
--- cust_credit.pm	30 Jul 2009 06:42:31 -0000	1.38
+++ cust_credit.pm	30 Mar 2010 12:09:21 -0000	1.38.2.1
@@ -14,6 +14,7 @@
 use FS::part_pkg;
 use FS::reason_type;
 use FS::reason;
+use FS::cust_event;
 
 @ISA = qw( FS::cust_main_Mixin FS::Record );
 $me = '[ FS::cust_credit ]';
@@ -301,6 +302,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.464.2.27
retrieving revision 1.464.2.28
diff -u -w -d -r1.464.2.27 -r1.464.2.28
--- cust_main.pm	12 Mar 2010 21:29:16 -0000	1.464.2.27
+++ cust_main.pm	30 Mar 2010 12:09:15 -0000	1.464.2.28
@@ -7320,7 +7320,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
 
@@ -7382,8 +7382,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