X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Ftimeworked.html;h=1d877e6ef219039862d5d5b9074f1f1d114bad68;hb=7a7bcda9d75c951df9c911ce60d5b0551765daf2;hp=49173bd08a1023d75fb002573e75f4ff264ab974;hpb=7043f97e59b35d497e3e4fc66e6f23dbee34ca53;p=freeside.git diff --git a/httemplate/search/timeworked.html b/httemplate/search/timeworked.html index 49173bd08..1d877e6ef 100644 --- a/httemplate/search/timeworked.html +++ b/httemplate/search/timeworked.html @@ -32,19 +32,7 @@ '', '', ], - 'html_foot' => sub { - '
'. - ''. - '

'. - ''; - }, + 'html_foot' => $html_foot, ) %> @@ -88,6 +76,7 @@ my $groupby = join(',', @groupby); my $where = " WHERE ObjectType='RT::Ticket' AND ( ( Transactions.Type='Set' AND Field='TimeWorked' ) + OR Transactions.Type='Create' OR Transactions.Type='Comment' OR Transactions.Type='Correspond' ) @@ -95,6 +84,13 @@ my $where = " "; #AND $wheretimeleft +my $str2time_sql = str2time_sql; +my $closing = str2time_sql_closing; + +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, TO_CHAR(Transactions.Created, 'Dy Mon DD HH24:MI:SS YYYY'), @@ -113,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' + + +
+ + +
+
+ +'; +