3 # $Id: cust_bill.cgi,v 1.4 1999-02-28 00:03:54 ivan Exp $
6 # http://server.name/path/cust_bill.cgi
8 # ivan@voicenet.com 97-apr-4
10 # Changes to allow page to work at a relative position in server
11 # bmccane@maxbaud.net 98-apr-3
13 # $Log: cust_bill.cgi,v $
14 # Revision 1.4 1999-02-28 00:03:54 ivan
15 # removed misleading comments
17 # Revision 1.3 1999/01/19 05:14:11 ivan
18 # for mod_perl: no more top-level my() variables; use vars instead
19 # also the last s/create/new/;
21 # Revision 1.2 1998/12/17 09:41:07 ivan
22 # s/CGI::(Base|Request)/CGI.pm/;
26 use vars qw ( $cgi $invnum );
28 use CGI::Carp qw(fatalsToBrowser);
29 use FS::UID qw(cgisuidsetup);
30 use FS::CGI qw(popurl idiot);
31 use FS::Record qw(qsearchs);
36 $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/;
39 if ( qsearchs('cust_bill',{'invnum'=>$invnum}) ) {
40 print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect
42 idiot("Invoice not found.");