From baf61fc521e1b97d56c45d7ecb5901024d0f9cf4 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 24 Nov 2009 07:42:28 +0000 Subject: [PATCH] timeworked report: carry the date range through to the success redirect --- httemplate/misc/process/timeworked.html | 4 +++- httemplate/misc/timeworked.html | 3 +++ httemplate/search/timeworked.html | 38 +++++++++++++++++++-------------- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/httemplate/misc/process/timeworked.html b/httemplate/misc/process/timeworked.html index 860118e0c..200a7511d 100644 --- a/httemplate/misc/process/timeworked.html +++ b/httemplate/misc/process/timeworked.html @@ -1,13 +1,15 @@ % if ($error) { <% $cgi->redirect(popurl(2). "timeworked.html?". $cgi->query_string) %> % } else { -<% $cgi->redirect(popurl(3). "search/timeworked.html") %> +<% $cgi->redirect(popurl(3). "search/timeworked.html?begin=$begin;end=$end") %> % } <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Time queue'); +my($begin, $end) = FS::UI::Web::parse_beginning_ending($cgi); + my @acct_rt_transaction; foreach my $transaction ( map { /^transactionid(\d+)$/; $1; } grep /^transactionid\d+$/, $cgi->param diff --git a/httemplate/misc/timeworked.html b/httemplate/misc/timeworked.html index db4b64ce7..46063e829 100755 --- a/httemplate/misc/timeworked.html +++ b/httemplate/misc/timeworked.html @@ -92,6 +92,9 @@
+ + + diff --git a/httemplate/search/timeworked.html b/httemplate/search/timeworked.html index 29f9b2546..1d877e6ef 100644 --- a/httemplate/search/timeworked.html +++ b/httemplate/search/timeworked.html @@ -32,19 +32,7 @@ '', '', ], - 'html_foot' => sub { - '
'. - ''. - '

'. - ''; - }, + 'html_foot' => $html_foot, ) %> @@ -99,9 +87,9 @@ my $where = " my $str2time_sql = str2time_sql; my $closing = str2time_sql_closing; -my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi); -$where .= " AND $str2time_sql Transactions.Created $closing >= $beginning ". - " AND $str2time_sql Transactions.Created $closing <= $ending"; +my($begin, $end) = FS::UI::Web::parse_beginning_ending($cgi); +$where .= " AND $str2time_sql Transactions.Created $closing >= $begin ". + " AND $str2time_sql Transactions.Created $closing <= $end "; my $query = " SELECT Tickets.id, Tickets.Subject, @@ -121,4 +109,22 @@ my $count_query = "SELECT COUNT(*) FROM Transactions $where"; my $link = [ "${p}rt/Ticket/Display.html?id=", sub { shift->[0]; } ]; +my $html_foot = qq' + + +
+ + +
+
+ +'; + -- 2.11.0