more flexible package suspend/unsuspend fees, #26828
[freeside.git] / FS / FS / cust_event.pm
index 78d4217..f299f93 100644 (file)
@@ -73,7 +73,7 @@ points to.  You can ask the object for a copy with the I<hash> method.
 
 sub table { 'cust_event'; }
 
-sub cust_linked { $_[0]->cust_main_custnum; } 
+sub cust_linked { $_[0]->cust_main_custnum || $_[0]->custnum } 
 sub cust_unlinked_msg {
   my $self = shift;
   "WARNING: can't find cust_main.custnum ". $self->custnum;
@@ -337,10 +337,6 @@ specified in HASHREF.  Valid parameters are
 
 =item ending
 
-=item payby
-
-=item 
-
 =back
 
 =cut
@@ -434,13 +430,9 @@ sub process_refax {
   process_re_X('fax', @_);
 }
 
-use Storable qw(thaw);
 use Data::Dumper;
-use MIME::Base64;
 sub process_re_X {
-  my( $method, $job ) = ( shift, shift );
-
-  my $param = thaw(decode_base64(shift));
+  my( $method, $job, $param ) = @_;
   warn Dumper($param) if $DEBUG;
 
   re_X(
@@ -485,9 +477,10 @@ sub re_X {
     my $modenum = $part_event->option('modenum') || '';
     my $invoice_from = $part_event->option('agent_invoice_from') || '';
     $cust_X->set('mode' => $modenum);
-    $cust_X->$method( { template      => $template,
-                        modenum       => $modenum,
-                        invoice_from  => $invoice_from } );
+    $cust_X->$method( { template => $template,
+                        modenum  => $modenum,
+                        from     => $invoice_from,
+                    } );
 
     if ( $job ) { #progressbar foo
       $num++;