X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htdocs%2Fview%2Fcust_bill.cgi;h=93a6f7a29ffcfec778f88265a8809eb474cb1eca;hb=6c44581c70239fcf331b072bbfb4b2e08ef04166;hp=ccfc33c81a1941a21ace5e6ab006808fd5ab8b49;hpb=183f64ede863fff923db7e00d962b3495e405477;p=freeside.git diff --git a/htdocs/view/cust_bill.cgi b/htdocs/view/cust_bill.cgi index ccfc33c81..93a6f7a29 100755 --- a/htdocs/view/cust_bill.cgi +++ b/htdocs/view/cust_bill.cgi @@ -1,8 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_bill.cgi,v 1.5 1999-01-18 09:41:42 ivan Exp $ -# -# Note: Should be run setuid freeside as user nobody. +# $Id: cust_bill.cgi,v 1.8 1999-02-28 00:03:58 ivan Exp $ # # this is a quick & ugly hack which does little more than add some formatting to the ascii output from /dbin/print-invoice # @@ -25,7 +23,17 @@ # also print 'printed' field ivan@sisd.com 98-jul-10 # # $Log: cust_bill.cgi,v $ -# Revision 1.5 1999-01-18 09:41:42 ivan +# Revision 1.8 1999-02-28 00:03:58 ivan +# removed misleading comments +# +# Revision 1.7 1999/01/25 12:26:03 ivan +# yet more mod_perl stuff +# +# Revision 1.6 1999/01/19 05:14:18 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:42 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -40,6 +48,7 @@ # use strict; +use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p ); use IO::File; use CGI; use CGI::Carp qw(fatalsToBrowser); @@ -48,21 +57,21 @@ use FS::CGI qw(header popurl menubar); use FS::Record qw(qsearchs); use FS::cust_bill; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint invnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($invnum)=$1; +$invnum = $1; -my($cust_bill) = qsearchs('cust_bill',{'invnum'=>$invnum}); +$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); die "Invoice #$invnum not found!" unless $cust_bill; -my($custnum) = $cust_bill->getfield('custnum'); +$custnum = $cust_bill->getfield('custnum'); -my($printed) = $cust_bill->printed; +$printed = $cust_bill->printed; -my $p = popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header('Invoice View', menubar( "Main Menu" => $p, "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", @@ -70,7 +79,7 @@ print $cgi->header( '-expires' => 'now' ), header('Invoice View', menubar( Enter payments (check/cash) against this invoice
Reprint this invoice

(Printed $printed times) -
+    
 END
 
 print $cust_bill->print_text;