Problems with Freeside1.5.0pre6 when trying to view certain invoices
Peter Kolbe
peter at venturenet.co.za
Thu May 26 05:19:32 PDT 2005
Errors Output
Can't call method "_date" on an undefined value at
/usr/local/lib/perl5/site_perl/5.8.5//FS/cust_bill.pm line 844. ,
/usr/local/lib/perl5/site_perl/5.8.5/Apache/ASP.pm line 1519
Debug Output
Can't call method "_date" on an undefined value at
/usr/local/lib/perl5/site_perl/5.8.5//FS/cust_bill.pm line 844. ,
/usr/local/lib/perl5/site_perl/5.8.5/Apache/ASP.pm line 1519
ASP to Perl Script
-: no strict;;use vars qw($Application $Session $Response $Server
$Request);;
-: #line 1 /var/www/freeside/view/cust_bill.cgi
1: ;;&Apache::ASP::WriteRef($main::Response, \('<!-- mason kludge -->
2: '));
3:
4: #untaint invnum
5: my($query) = $cgi->keywords;
6: $query =~ /^((.+)-)?(\d+)$/;
7: my $templatename = $2;
8: my $invnum = $3;
9:
10: my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
11: die "Invoice #$invnum not found!" unless $cust_bill;
12: my $custnum = $cust_bill->getfield('custnum');
13:
14: #my $printed = $cust_bill->printed;
15:
16: print header('Invoice View', menubar(
17: "Main Menu" => $p,
18: "View this customer (#$custnum)" =>
"${p}view/cust_main.cgi?$custnum",
19: ));
20:
21: print qq!<A HREF="${p}edit/cust_pay.cgi?$invnum">Enter payments
(check/cash) against this invoice</A> | !
22: if $cust_bill->owed > 0;
23:
24: print qq!<A HREF="${p}misc/print-invoice.cgi?$invnum">Reprint this
invoice</A>!;
25: if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) {
26: print qq! | <A HREF="${p}misc/email-invoice.cgi?$invnum">!.
27: qq!Re-email this invoice</A>!;
28: }
29:
30: print '<BR><BR>';
31:
32: my $conf = new FS::Conf;
33: if ( $conf->exists('invoice_latex') ) {
34: my $link = "${p}view/cust_bill-pdf.cgi?";
35: $link .= "$templatename-" if $templatename;
36: $link .= "$invnum.pdf";
37: print menubar(
38: 'View typeset invoice' => $link,
39: ), '<BR><BR>';
40: }
41:
42: #false laziness with search/cust_bill_event.cgi
43:
44: unless ( $templatename ) {
45: print table(). '<TR><TH>Event</TH><TH>Date</TH><TH>Status</TH></TR>';
46: foreach my $cust_bill_event (
47: sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event
48: ) {
49: my $status = $cust_bill_event->status;
50: $status .= ': '. $cust_bill_event->statustext
51: if $cust_bill_event->statustext;
52: my $part_bill_event = $cust_bill_event->part_bill_event;
53: print '<TR><TD>'. $part_bill_event->event;
54:
55: if (
56: $part_bill_event->plan eq 'send_alternate'
57: && $part_bill_event->plandata =~ /^templatename (.*)$/m
58: ) {
59: my $templatename = $1;
60: print qq! ( <A
HREF="${p}view/cust_bill.cgi?$templatename-$invnum">!.
61: 'view text</A> | '.
62: qq!<A
HREF="${p}view/cust_bill-pdf.cgi?$templatename-$invnum.pdf">!.
63: 'view typeset</A> )';
64: }
65:
66: print '</TD><TD>'.
67: time2str("%a %b %e %T %Y", $cust_bill_event->_date).
'</TD><TD>'.
68: $status. '</TD></TR>';
69: }
70: print '</TABLE><BR>';
71: }
72:
73: print '<PRE>', $cust_bill->print_text('', $templatename);
74:
75: #formatting
76: print <<END;
77: </PRE></FONT>
78: </BODY>
79: </HTML>
80: END
81:
82: ;
An error has occured with the Apache::ASP script just run. If you are the
developer working on this script, and cannot work through this problem,
please try researching it at the Apache::ASP web site, specifically the FAQ
section. Failing that, check out your support options, and if necessary
include this debug output with any query.
--------------------------------------------------------------------------
The information transmitted is intended only for the person to whom it is
addressed and may contain confidential and/or privileged material.
Although SCDS / Venturenet scans incoming and outgoing emails and email
attachments for viruses we cannot guarantee a communication to be free of
all viruses nor accept any responsibility for viruses.
Although SCDS / Venturenet monitors incoming and outgoing emails for
inappropriate content, we cannot be held responsible for the views or
expressions of the author.
The views expressed may not necessarily be those of SCDS / Venturenet and
as such, cannot be held responsible for any loss or injury resulting from
the contents of a message.
--------------------------------------------------------------------------
More information about the freeside-users
mailing list