Provide better diagnostics when the cust_main owning this domain does not
[freeside.git] / FS / FS / cust_event.pm
index 355bc25..6df2faa 100644 (file)
@@ -190,7 +190,7 @@ sub test_conditions {
   my $part_event = $self->part_event;
   my $object = $self->cust_X;
   my @conditions = $part_event->part_event_condition;
-  %opt{'cust_event'} = $self;
+  $opt{'cust_event'} = $self;
 
   #no unsatisfied conditions
   #! grep ! $_->condition( $object, %opt ), @conditions;
@@ -344,12 +344,13 @@ sub process_re_X {
 
 }
 
+#this needs some updating based on the 1.7 cust_bill_event.pm still, i think
 sub re_X {
   my($method, $beginning, $ending, $failed, $job) = @_;
 
   my $from = 'LEFT JOIN part_event USING ( eventpart )';
 
-              # yuck!  hardcoed *AND* sequential scans!
+              # yuck!  hardcoded *AND* sequential scans!
   my $where = " WHERE action LIKE 'cust_bill_send%'".
               "   AND cust_event._date >= $beginning".
               "   AND cust_event._date <= $ending";
@@ -366,10 +367,9 @@ sub re_X {
   my( $num, $last, $min_sec ) = (0, time, 5); #progresbar foo
   foreach my $cust_event ( @cust_event ) {
 
-    # XXX 
-    $cust_event->cust_bill->$method(
+    $cust_event->cust_X->$method(
       $cust_event->part_event->templatename
-      || $cust_event->cust_main->agent_template
+      || $cust_event->cust_X->agent_template
     );
 
     if ( $job ) { #progressbar foo