cache foo
[freeside.git] / httemplate / view / cust_bill.cgi
index 12fe857..5719319 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-# <!-- $Id: cust_bill.cgi,v 1.2 2001-08-21 02:31:57 ivan Exp $ -->
+# <!-- $Id: cust_bill.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p );
@@ -26,12 +26,16 @@ $custnum = $cust_bill->getfield('custnum');
 $printed = $cust_bill->printed;
 
 $p = popurl(2);
-print $cgi->header( '-expires' => 'now' ), header('Invoice View', menubar(
+print $cgi->header( @FS::CGI::header ), 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>
+));
+
+print qq!<A HREF="${p}edit/cust_pay.cgi?$invnum">Enter payments (check/cash) against this invoice</A> | !
+  if $cust_bill->owed > 0;
+
+print <<END;
+      <A HREF="${p}misc/print-invoice.cgi?$invnum">Reprint this invoice</A>
       <BR><BR>(Printed $printed times)
     <PRE>
 END