summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2004-06-30 09:56:23 +0000
committerivan <ivan>2004-06-30 09:56:23 +0000
commit6dd9433a5401f1b21fa38e9372ed2aab2a5d26c2 (patch)
tree207313ef6163cb4f561ee9b8d6f2ac910a839785 /FS
parent958445892a327299ecf08de85b15c0f9545b5e0b (diff)
fix warning message when agent-specific plandata cannot be found
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_bill.pm9
1 files changed, 5 insertions, 4 deletions
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 '';
}