employee commission reporting, RT#6991
[freeside.git] / FS / FS / part_event / Action / pkg_employee_credit.pm
index 94fc5f3..e4913a2 100644 (file)
@@ -9,7 +9,7 @@ sub description { 'Credit the ordering employee a specific amount'; }
 
 #a little false laziness w/pkg_referral_credit
 sub do_action {
-  my( $self, $cust_pkg ) = @_;
+  my( $self, $cust_pkg, $cust_event ) = @_;
 
   my $cust_main = $self->cust_main($cust_pkg);
 
@@ -31,8 +31,9 @@ sub do_action {
   my $error = $employee_cust_main->credit(
     $amount, 
     \$reasonnum,
-    'addlinfo' =>
-      'for customer #'. $cust_main->display_custnum. ': '.$cust_main->name,
+    'eventnum' => $cust_event->eventnum,
+    'addlinfo' => 'for customer #'. $cust_main->display_custnum.
+                               ': '.$cust_main->name,
   );
   die "Error crediting customer ". $employee_cust_main->custnum.
       " for employee commission: $error"