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.
$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
=cut
-sub search_sql {
+sub search_sql_where {
my ($class, $params) = @_;
my @search = ();
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 )'.