diff options
author | ivan <ivan> | 2005-08-07 00:40:02 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-08-07 00:40:02 +0000 |
commit | 6ed5d51b3a72e2935dd5d084c9e24567150b03ca (patch) | |
tree | 25626f44e2179b5b1fa704d672153345ae404380 /FS/FS/UI | |
parent | 05d94720d26ca009b06f21534b06d1650d9f2915 (diff) |
move cust_pkg search to new template, add active/suspended/cancelled customer packages to agent browse
Diffstat (limited to 'FS/FS/UI')
-rw-r--r-- | FS/FS/UI/Web.pm | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 031a0e67a..85b85081a 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -12,12 +12,20 @@ use Date::Parse; sub parse_beginning_ending { my($cgi) = @_; - $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/; - my $beginning = str2time($1) || 0; + my $beginning = 0; + if ( $cgi->param('begin') =~ /^(\d+)$/ ) { + $beginning = $1; + } elsif ( $cgi->param('beginning') =~ /^([ 0-9\-\/]{1,64})$/ ) { + $beginning = str2time($1) || 0; + } - #need an option to turn off the + 86399 ??? - $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/; - my $ending = ( $1 ? str2time($1) : 4294880896 ) + 86399; + my $ending = 4294967295; #2^32-1 + if ( $cgi->param('end') =~ /^(\d+)$/ ) { + $ending = $1 - 1; + } elsif ( $cgi->param('ending') =~ /^([ 0-9\-\/]{1,64})$/ ) { + #probably need an option to turn off the + 86399 + my $ending = str2time($1) + 86399; + } ( $beginning, $ending ); } |