freeside/httemplate/view cust_bill.cgi,1.19,1.20
ivan
ivan at pouncequick.420.am
Tue Oct 5 06:52:52 PDT 2004
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory pouncequick:/tmp/cvs-serv4415
Modified Files:
cust_bill.cgi
Log Message:
links to show alternate invoices also
Index: cust_bill.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_bill.cgi,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- cust_bill.cgi 5 Oct 2004 13:44:06 -0000 1.19
+++ cust_bill.cgi 5 Oct 2004 13:52:28 -0000 1.20
@@ -31,40 +31,47 @@
my $conf = new FS::Conf;
if ( $conf->exists('invoice_latex') ) {
+ my $link = "${p}view/cust_bill-pdf.cgi?";
+ $link .= "$templatename-" if $templatename;
+ $link .= "$invnum.pdf";
print menubar(
- 'View typeset invoice' => "${p}view/cust_bill-pdf.cgi?$invnum.pdf",
+ 'View typeset invoice' => $link,
), '<BR><BR>';
}
#false laziness with search/cust_bill_event.cgi
-print table(). '<TR><TH>Event</TH><TH>Date</TH><TH>Status</TH></TR>';
-foreach my $cust_bill_event (
- sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event
-) {
- my $status = $cust_bill_event->status;
- $status .= ': '. $cust_bill_event->statustext if $cust_bill_event->statustext;
- my $part_bill_event = $cust_bill_event->part_bill_event;
- print '<TR><TD>'. $part_bill_event->event;
-
- if (
- $part_bill_event->plan eq 'send_alternate'
- && $part_bill_event->plandata =~ /^templatename (.*)$/m
+unless ( $templatename ) {
+ print table(). '<TR><TH>Event</TH><TH>Date</TH><TH>Status</TH></TR>';
+ foreach my $cust_bill_event (
+ sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event
) {
- my $templatename = $1;
- print qq! ( <A HREF="${p}view/cust_bill.cgi?$templatename-$invnum">!.
- 'view text</A> | '.
- qq!<A HREF="${p}view/cust_bill-pdf.cgi?$templatename-$invnum.pdf">!.
- 'view typeset</A> )';
+ my $status = $cust_bill_event->status;
+ $status .= ': '. $cust_bill_event->statustext
+ if $cust_bill_event->statustext;
+ my $part_bill_event = $cust_bill_event->part_bill_event;
+ print '<TR><TD>'. $part_bill_event->event;
+
+ if (
+ $part_bill_event->plan eq 'send_alternate'
+ && $part_bill_event->plandata =~ /^templatename (.*)$/m
+ ) {
+ my $templatename = $1;
+ print qq! ( <A HREF="${p}view/cust_bill.cgi?$templatename-$invnum">!.
+ 'view text</A> | '.
+ qq!<A HREF="${p}view/cust_bill-pdf.cgi?$templatename-$invnum.pdf">!.
+ 'view typeset</A> )';
+ }
+
+ print '</TD><TD>'.
+ time2str("%a %b %e %T %Y", $cust_bill_event->_date). '</TD><TD>'.
+ $status. '</TD></TR>';
}
-
- print '</TD><TD>'.
- time2str("%a %b %e %T %Y", $cust_bill_event->_date). '</TD><TD>'.
- $status. '</TD></TR>';
+ print '</TABLE><BR>';
}
-print '</TABLE><BR><PRE>';
-print $cust_bill->print_text('', $templatename);
+
+print '<PRE>'. $cust_bill->print_text('', $templatename);
#formatting
print <<END;
More information about the freeside-commits
mailing list