X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=41ff6aaa92e7c79e87aeae13e37c83a406c45d30;hp=ef6dc7bee233051f8ee29187f024f506de273a5a;hb=3ab9b93b970353bfddc44b65bbb79d3aa586ded7;hpb=5df49c99a8c9cb241910b2cf262d19bdbae1f612 diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index ef6dc7bee..41ff6aaa9 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -144,6 +144,8 @@ Specific use cases =item agent_invid - legacy invoice number +=item promised_date - customer promised payment date, for collection + =back =head1 METHODS @@ -5622,6 +5624,15 @@ sub search_sql_where { } + #promised_date - also has an option to accept nulls + if ( $param->{promised_date} ) { + my($beginning, $ending, $null) = @{$param->{promised_date}}; + + push @search, "(( cust_bill.promised_date >= $beginning AND ". + "cust_bill.promised_date < $ending )" . + ($null ? ' OR cust_bill.promised_date IS NULL ) ' : ')'); + } + #agent virtualization my $curuser = $FS::CurrentUser::CurrentUser; if ( $curuser->username eq 'fs_queue'