X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=802e2bfbde839dd3126d6a7fa1a69784abefd63b;hp=f31e455ba7dc5971009de7b79a2b5f56a15ebeed;hb=101cc49024f693a837e2ff74a89a300b7ecb8976;hpb=a78922d1673c7f79658d3b51353b4f63102bc7c8 diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index f31e455ba..802e2bfbd 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -683,7 +683,7 @@ sub _agent_invoice_from { sub _agent_plandata { my( $self, $option ) = @_; - my $cust_bill_event = qsearchs( 'part_bill_event', + my $part_bill_event = qsearchs( 'part_bill_event', { 'payby' => $self->cust_main->payby, 'plan' => 'send_agent', @@ -697,12 +697,13 @@ sub _agent_plandata { 'ORDER BY seconds LIMIT 1' ); - return '' unless $cust_bill_event; + return '' unless $part_bill_event; - if ( $cust_bill_event->plandata =~ /^$option (.*)$/m ) { + if ( $part_bill_event->plandata =~ /^$option (.*)$/m ) { return $1; } else { - warn "can't parse plandata for $1"; + warn "can't parse part_bill_event eventpart#". $part_bill_event->eventpart. + " plandata for $option"; return ''; }