blob: 12fe8578a8d3ec2ad12247328f02c46cea2be5f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<%
# <!-- $Id: cust_bill.cgi,v 1.2 2001-08-21 02:31:57 ivan Exp $ -->
use strict;
use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p );
use IO::File;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use FS::UID qw(cgisuidsetup);
use FS::CGI qw(header popurl menubar);
use FS::Record qw(qsearchs);
use FS::cust_bill;
$cgi = new CGI;
&cgisuidsetup($cgi);
#untaint invnum
($query) = $cgi->keywords;
$query =~ /^(\d+)$/;
$invnum = $1;
$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
die "Invoice #$invnum not found!" unless $cust_bill;
$custnum = $cust_bill->getfield('custnum');
$printed = $cust_bill->printed;
$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",
)), <<END;
<A HREF="${p}edit/cust_pay.cgi?$invnum">Enter payments (check/cash) against this invoice</A>
<BR><A HREF="${p}misc/print-invoice.cgi?$invnum">Reprint this invoice</A>
<BR><BR>(Printed $printed times)
<PRE>
END
print $cust_bill->print_text;
#formatting
print <<END;
</PRE></FONT>
</BODY>
</HTML>
END
%>
|