add some reporting features
[freeside.git] / httemplate / search / report_tax.cgi
1 <%
2 #!/usr/bin/perl -Tw
3 #
4 # $Id: report_tax.cgi,v 1.1 2002-02-22 23:18:34 jeff Exp $
5 #
6 # Usage: post form to:
7 #        http://server.name/path/svc_domain.cgi
8 #
9 # ivan@voicenet.com 96-mar-5
10 #
11 # need to look at table in results to make it more readable
12 #
13 # ivan@voicenet.com
14 #
15 # rewrite ivan@sisd.com 98-mar-15
16 #
17 # Changes to allow page to work at a relative position in server
18 #       bmccane@maxbaud.net     98-apr-3
19 #
20 # $Log: report_tax.cgi,v $
21 # Revision 1.1  2002-02-22 23:18:34  jeff
22 # add some reporting features
23 #
24 # Revision 1.1  2002/02/05 15:22:00  jeff
25 # preserving state prior to 1.4.0pre7 upgrade
26 #
27 # Revision 1.2  2000/09/20 19:25:19  jeff
28 # local modifications
29 #
30 # Revision 1.1.1.1  2000/09/18 06:26:58  jeff
31 # Import of Freeside 1.2.3
32 #
33 # Revision 1.10  1999/07/20 06:03:36  ivan
34 # s/CGI::Request/CGI/; (how'd i miss that before?)
35 #
36 # Revision 1.9  1999/04/09 04:22:34  ivan
37 # also table()
38 #
39 # Revision 1.8  1999/04/09 03:52:55  ivan
40 # explicit & for table/itable/ntable
41 #
42 # Revision 1.7  1999/02/28 00:03:56  ivan
43 # removed misleading comments
44 #
45 # Revision 1.6  1999/02/09 09:22:58  ivan
46 # visual and bugfixes
47 #
48 # Revision 1.5  1999/01/19 05:14:16  ivan
49 # for mod_perl: no more top-level my() variables; use vars instead
50 # also the last s/create/new/;
51 #
52 # Revision 1.4  1999/01/18 09:41:40  ivan
53 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
54 # (good idea anyway)
55 #
56 # Revision 1.3  1998/12/17 09:41:11  ivan
57 # s/CGI::(Base|Request)/CGI.pm/;
58 #
59
60 use strict;
61 use vars qw( $conf $cgi $beginning $ending );
62 use CGI;
63 use CGI::Carp qw(fatalsToBrowser);
64 use FS::UID qw(cgisuidsetup);
65 use FS::CGI qw(popurl idiot header table);
66 use FS::Record qw(qsearch qsearchs);
67 use FS::Conf;
68
69 $cgi = new CGI;
70 &cgisuidsetup($cgi);
71
72 $conf = new FS::Conf;
73
74 $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/;
75 $beginning = $1;
76
77 $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/;
78 $ending = $1;
79
80   print $cgi->header( '-expires' => '-2m' ),
81         header('Tax Report Results');
82
83   open (REPORT, "/usr/bin/freeside-tax-report -v -s $beginning -d $ending freeside |");
84
85   print '<PRE>';
86   while(<REPORT>) {
87     print $_;
88   }
89   print '</PRE>';
90
91   print '</BODY></HTML>';
92
93 %>
94