[freeside-commits] freeside/httemplate/search timeworked.html, 1.6, 1.6.4.1

Ivan,,, ivan at wavetail.420.am
Mon Nov 23 23:42:31 PST 2009


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv23085/search

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	timeworked.html 
Log Message:
timeworked report: carry the date range through to the success redirect

Index: timeworked.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/timeworked.html,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -u -d -r1.6 -r1.6.4.1
--- timeworked.html	12 Feb 2008 19:24:12 -0000	1.6
+++ timeworked.html	24 Nov 2009 07:42:29 -0000	1.6.4.1
@@ -32,19 +32,7 @@
                    '',
                    '',
                  ],
-                 'html_foot' => sub {
-                                  '<BR><INPUT TYPE="button" VALUE="select all" onClick="setAll(true)">'.
-                                  '<INPUT TYPE="button" VALUE="unselect all" onClick="setAll(false)">'.
-                                  '<BR><INPUT TYPE="submit" NAME="action" VALUE="Assign to accounts"><BR>'.
-                                  '<SCRIPT TYPE="text/javascript">'.
-                                  '  function setAll(setTo) { '.
-                                  '    theForm = document.timeForm;'.
-                                  '    for (i=0,n=theForm.elements.length;i<n;i++)'.
-                                  '      if (theForm.elements[i].name.indexOf("transactionid") != -1)'.
-                                  '        theForm.elements[i].checked = setTo;'.
-                                  '  }'.
-                                  '</SCRIPT>';
-                                },
+                 'html_foot' => $html_foot,
              )
 
 %>
@@ -96,6 +84,13 @@
 ";
     #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'),
@@ -114,4 +109,22 @@
 
 my $link = [ "${p}rt/Ticket/Display.html?id=", sub { shift->[0]; } ];
 
+my $html_foot = qq'
+  <INPUT TYPE="hidden" NAME="begin" VALUE="$begin">
+  <INPUT TYPE="hidden" NAME="end"   VALUE="$end">
+  <BR>
+  <INPUT TYPE="button" VALUE="select all" onClick="setAll(true)">
+  <INPUT TYPE="button" VALUE="unselect all" onClick="setAll(false)">
+  <BR>
+  <INPUT TYPE="submit" NAME="action" VALUE="Assign to accounts"><BR>
+  <SCRIPT TYPE="text/javascript">
+    function setAll(setTo) {
+      theForm = document.timeForm;
+      for (i=0,n=theForm.elements.length;i<n;i++)
+        if (theForm.elements[i].name.indexOf("transactionid") != -1)
+          theForm.elements[i].checked = setTo;
+    }
+  </SCRIPT>
+';
+
 </%init>



More information about the freeside-commits mailing list