From dd013679940cb0a4425eeff4df263e390d9c42e4 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 17 Apr 1998 05:37:07 +0000 Subject: Initial revision --- htdocs/search/cust_bill.cgi | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 htdocs/search/cust_bill.cgi (limited to 'htdocs/search') diff --git a/htdocs/search/cust_bill.cgi b/htdocs/search/cust_bill.cgi new file mode 100755 index 000000000..5be84b79e --- /dev/null +++ b/htdocs/search/cust_bill.cgi @@ -0,0 +1,46 @@ +#!/usr/bin/perl -Tw +# +# cust_bill.cgi: Search for invoices (process form) +# +# Usage: post form to: +# http://server.name/path/cust_bill.cgi +# +# Note: Should be run setuid freeside as user nobody. +# +# ivan@voicenet.com 97-apr-4 +# +# Changes to allow page to work at a relative position in server +# bmccane@maxbaud.net 98-apr-3 + +use strict; +use CGI::Request; +use FS::UID qw(cgisuidsetup); +use FS::Record qw(qsearchs); + +my($req)=new CGI::Request; +cgisuidsetup($req->cgi); + +$req->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/; +my($invnum)=$2; + +if ( qsearchs('cust_bill',{'invnum'=>$invnum}) ) { + $req->cgi->redirect("../view/cust_bill.cgi?$invnum"); #redirect +} else { #error + CGI::Base::SendHeaders(); # one guess + print < + + Invoice Search Error + + +
+

Invoice Search Error

+
+ Invoice not found. +
+ + +END + +} + -- cgit v1.2.1