From: ivan Date: Wed, 14 Feb 2007 08:48:36 +0000 (+0000) Subject: add more options to advanced package reporting X-Git-Tag: TRIXBOX_2_6~641 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ab9e07a6507647e1aaf59df75edc54b40a745643 add more options to advanced package reporting --- diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 18afc3d48..9ddcf142d 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -18,19 +18,20 @@ $me = '[FS::UID::Web]'; use Date::Parse; sub parse_beginning_ending { - my($cgi) = @_; + my($cgi, $prefix) = @_; + $prefix .= '_' if $prefix; my $beginning = 0; - if ( $cgi->param('begin') =~ /^(\d+)$/ ) { + if ( $cgi->param($prefix.'begin') =~ /^(\d+)$/ ) { $beginning = $1; - } elsif ( $cgi->param('beginning') =~ /^([ 0-9\-\/]{1,64})$/ ) { + } elsif ( $cgi->param($prefix.'beginning') =~ /^([ 0-9\-\/]{1,64})$/ ) { $beginning = str2time($1) || 0; } my $ending = 4294967295; #2^32-1 - if ( $cgi->param('end') =~ /^(\d+)$/ ) { + if ( $cgi->param($prefix.'end') =~ /^(\d+)$/ ) { $ending = $1 - 1; - } elsif ( $cgi->param('ending') =~ /^([ 0-9\-\/]{1,64})$/ ) { + } elsif ( $cgi->param($prefix.'ending') =~ /^([ 0-9\-\/]{1,64})$/ ) { #probably need an option to turn off the + 86399 $ending = str2time($1) + 86399; } diff --git a/httemplate/elements/select-cust_pkg-status.html b/httemplate/elements/select-cust_pkg-status.html index 58f270342..71aaa84b6 100644 --- a/httemplate/elements/select-cust_pkg-status.html +++ b/httemplate/elements/select-cust_pkg-status.html @@ -1,20 +1,21 @@ -% -% my( $status, %opt ) = @_; -% -% $opt{'statuses'} ||= [ FS::cust_pkg->statuses() ]; # { disabled=>'' } ) -% -% - - ->