X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_event.pm;h=c91283b69ccedf840e8b56b66b0bae9eef9842b9;hb=cc3a43f7d4386297a8babebfdd49646f836db127;hp=7c2ad37453a6a65075c1b2057cc0d64bf1a80d7a;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195;p=freeside.git diff --git a/FS/FS/cust_bill_event.pm b/FS/FS/cust_bill_event.pm index 7c2ad3745..c91283b69 100644 --- a/FS/FS/cust_bill_event.pm +++ b/FS/FS/cust_bill_event.pm @@ -83,7 +83,7 @@ points to. You can ask the object for a copy with the I method. sub table { 'cust_bill_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. @@ -201,7 +201,7 @@ sub retriable { $self->replace($old); } -=item search_sql HASHREF +=item search_sql_where HASHREF Class method which returns an SQL WHERE fragment to search for parameters specified in HASHREF. Valid parameters are @@ -236,7 +236,7 @@ Specifies the user for agent virtualization =cut -sub search_sql { +sub search_sql_where { my ($class, $params) = @_; my @search = (); @@ -324,7 +324,7 @@ sub process_re_X { sub re_X { my($method, $param, $job) = @_; - my $where = FS::cust_bill_event->search_sql($param); + my $where = FS::cust_bill_event->search_sql_where($param); $where = " WHERE plan LIKE 'send%'". ( $where ? " AND $where" : "" ); my $from = 'LEFT JOIN part_bill_event USING ( eventpart )'.