[freeside-users] Can't call method "invnum_date_pretty"

Graham McIntire gmcintire at gmail.com
Sun Jun 5 10:06:50 PDT 2011


I'm getting the following error trying to view certain customers
information page. I had manually done some database manipulation and
now it looks like there's an invoice trying to be loaded that doesn't
exist any more. Is there any way to debug this to figure out what
value it's looking for so I can remedy the problem?

I'm running Freeside 2.1 with PostgreSQL backend.

error: 	Can't call method "invnum_date_pretty" on an undefined value
at /usr/local/share/perl/5.10.1/FS/cust_bill_ApplicationCommon.pm line
487.
context: 	
... 	
483: 	=cut
484: 	
485: 	sub applied_to_invoice {
486: 	 my $self = shift;
487: 	 'applied to '. $self->cust_bill->invnum_date_pretty;
488: 	}
489: 	
490: 	=item lineitem_breakdown_table
491: 	
... 	
code stack: 	 /usr/local/share/perl/5.10.1/FS/cust_bill_ApplicationCommon.pm:487
/var/www/freeside/view/cust_main/payment_history/credit.html:29
/usr/local/share/perl/5.10.1/FS/Mason.pm:377
/var/www/freeside/view/cust_main/payment_history.html:447
/usr/local/share/perl/5.10.1/FS/Mason.pm:377
/var/www/freeside/view/cust_main.cgi:259
/var/www/freeside/autohandler:1

Can't call method "invnum_date_pretty" on an undefined value at
/usr/local/share/perl/5.10.1/FS/cust_bill_ApplicationCommon.pm line
487.


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method
"invnum_date_pretty" on an undefined value at
/usr/local/share/perl/5.10.1/FS/cust_bill_ApplicationCommon.pm line
487.^J') called at
/usr/local/share/perl/5.10.1/FS/cust_bill_ApplicationCommon.pm line
487
FS::cust_bill_ApplicationCommon::applied_to_invoice('FS::cust_credit_bill=HASH(0xb9ba9670)')
called at /var/www/freeside/view/cust_main/payment_history/credit.html
line 29
HTML::Mason::Commands::__ANON__('FS::cust_credit=HASH(0xbed2cf30)',
'date_format', '%m/%d/%Y', 'card_refund-days', undef,
'deleteinvoices', 1, 'pkg-balances', '', 'deleterefunds', 1,
'deletepayments', 1) called at
/usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xbec91ef8)',
'FS::cust_credit=HASH(0xbed2cf30)', 'date_format', '%m/%d/%Y',
'card_refund-days', undef, 'deleteinvoices', 1, 'pkg-balances', '',
'deleterefunds', 1, 'deletepayments', 1) called at
/usr/share/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef,
'FS::cust_credit=HASH(0xbed2cf30)', 'date_format', '%m/%d/%Y',
'card_refund-days', undef, 'deleteinvoices', 1, 'pkg-balances', '',
'deleterefunds', 1, 'deletepayments', 1) called at
/usr/share/perl5/HTML/Mason/Request.pm line 1355
HTML::Mason::Request::scomp('FS::Mason::Request=HASH(0xbeef1f68)',
'payment_history/credit.html', 'FS::cust_credit=HASH(0xbed2cf30)',
'date_format', '%m/%d/%Y', 'card_refund-days', undef,
'deleteinvoices', 1, 'pkg-balances', '', 'deleterefunds', 1,
'deletepayments', 1) called at
/usr/local/share/perl/5.10.1/FS/Mason.pm line 377
HTML::Mason::Commands::include('payment_history/credit.html',
'FS::cust_credit=HASH(0xbed2cf30)', 'date_format', '%m/%d/%Y',
'card_refund-days', undef, 'deleteinvoices', 1, 'pkg-balances', '',
'deleterefunds', 1, 'deletepayments', 1) called at
/var/www/freeside/view/cust_main/payment_history.html line 447
HTML::Mason::Commands::__ANON__('FS::cust_main=HASH(0xbed6f2a0)')
called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xbed55420)',
'FS::cust_main=HASH(0xbed6f2a0)') called at
/usr/share/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef,
'FS::cust_main=HASH(0xbed6f2a0)') called at
/usr/share/perl5/HTML/Mason/Request.pm line 1355
HTML::Mason::Request::scomp('FS::Mason::Request=HASH(0xbeef1f68)',
'cust_main/payment_history.html', 'FS::cust_main=HASH(0xbed6f2a0)')
called at /usr/local/share/perl/5.10.1/FS/Mason.pm line 377
HTML::Mason::Commands::include('cust_main/payment_history.html',
'FS::cust_main=HASH(0xbed6f2a0)') called at
/var/www/freeside/view/cust_main.cgi line 259
HTML::Mason::Commands::__ANON__('keywords', 9) called at
/usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xbeb6a710)',
'keywords', 9) called at /usr/share/perl5/HTML/Mason/Request.pm line
1302
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'keywords', 9) called
at /usr/share/perl5/HTML/Mason/Request.pm line 955
HTML::Mason::Request::call_next('FS::Mason::Request=HASH(0xbeef1f68)')
called at /var/www/freeside/autohandler line 1
HTML::Mason::Commands::__ANON__('keywords', 9) called at
/usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xbe9e15d8)',
'keywords', 9) called at /usr/share/perl5/HTML/Mason/Request.pm line
1297
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'keywords', 9) called
at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('FS::Mason::Request=HASH(0xbeef1f68)')
called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('FS::Mason::Request=HASH(0xbeef1f68)')
called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0xbe538860)',
'Apache2::RequestRec=SCALAR(0xbed1aea0)') called at
/usr/local/etc/freeside/handler.pl line 92
eval {...} at /usr/local/etc/freeside/handler.pl line 92
HTML::Mason::handler('Apache2::RequestRec=SCALAR(0xbed1aea0)') called
at -e line 0
eval {...} at -e line 0


More information about the freeside-users mailing list