freeside/FS/FS/UI Web.pm,1.5,1.6

Ivan Kohler ivan at pouncequick.420.am
Thu Jun 2 02:30:27 PDT 2005


Update of /home/cvs/cvsroot/freeside/FS/FS/UI
In directory pouncequick:/tmp/cvs-serv23604/FS/FS/UI

Modified Files:
	Web.pm 
Log Message:
add ability to search on a date range of invoice events and then reprint or reemail (boy was that a bit more work than i expected), closes: Bug#946

Index: Web.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/UI/Web.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Web.pm	24 Feb 2005 14:22:02 -0000	1.5
+++ Web.pm	2 Jun 2005 09:29:52 -0000	1.6
@@ -4,6 +4,19 @@
 #use FS::UI
 #@ISA = qw( FS::UI );
 
+use Date::Parse;
+sub parse_beginning_ending {
+  my($cgi) = @_;
+
+  $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/;
+  my $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;
+
+  ( $beginning, $ending );
+}
 
 # begin JSRPC code...
 




More information about the freeside-commits mailing list