X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_event.pm;h=adaa13eeec1eb2350d7143b5945d8d0eb92f9591;hb=b51f95ce19785983728938439d1e2027b8e27569;hp=7c2ad37453a6a65075c1b2057cc0d64bf1a80d7a;hpb=2e2fb0fc3619ce3afc268bcaa3e34f1e712e57c5;p=freeside.git diff --git a/FS/FS/cust_bill_event.pm b/FS/FS/cust_bill_event.pm index 7c2ad3745..adaa13eee 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 = (); @@ -304,13 +304,11 @@ sub process_refax { process_re_X('fax', @_); } -use Storable qw(thaw); use Data::Dumper; -use MIME::Base64; sub process_re_X { my( $method, $job ) = ( shift, shift ); - my $param = thaw(decode_base64(shift)); + my $param = shift; warn Dumper($param) if $DEBUG; re_X( @@ -324,7 +322,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 )'.