From 4201aaaae8a957bc98ce345d3ee0e599da354766 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 16 Apr 2002 10:47:35 +0000 Subject: [PATCH] report on failed billing events... --- FS/FS/Conf.pm | 4 +-- FS/FS/cust_bill.pm | 8 ++--- FS/FS/cust_bill_event.pm | 11 ++++++ httemplate/index.html | 2 ++ httemplate/search/cust_bill_event.cgi | 62 ++++++++++++++++++++++++++++++++++ httemplate/search/cust_bill_event.html | 23 +++++++++++++ httemplate/search/report_cc.html | 4 +-- httemplate/search/report_credit.html | 4 +-- httemplate/search/report_tax.html | 4 +-- httemplate/view/cust_bill.cgi | 2 ++ 10 files changed, 112 insertions(+), 12 deletions(-) create mode 100644 httemplate/search/cust_bill_event.cgi create mode 100755 httemplate/search/cust_bill_event.html diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index dc1cbb820..6bcf9c43e 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -896,14 +896,14 @@ httemplate/docs/config.html }, { - 'key' => 'declinetemplate' + 'key' => 'declinetemplate', 'section' => 'billing', 'description' => 'Template file for credit card decline emails.', 'type' => 'textarea', }, { - 'key' => 'emaildecline' + 'key' => 'emaildecline', 'section' => 'billing', 'description' => 'Enable emailing of credit card decline notices.', 'type' => 'checkbox', diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index cb2aa4629..816553bda 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -582,9 +582,9 @@ sub realtime_card { my $template = new Text::Template ( TYPE => 'ARRAY', SOURCE => [ map "$_\n", @templ ], - ) or die "($perror) can't create template: $Text::Template::ERROR"; + ) or return "($perror) can't create template: $Text::Template::ERROR"; $template->compile() - or die "($perror) can't compile template: $Text::Template::ERROR"; + or return "($perror) can't compile template: $Text::Template::ERROR"; my $error = $transaction->error_message; @@ -605,7 +605,7 @@ sub realtime_card { $!=0; $message->smtpsend( Host => $smtpmachine ) or $message->smtpsend( Host => $smtpmachine, Debug => 1 ) - or die "($perror) (customer # ". $self->custnum. + or return "($perror) (customer # ". $self->custnum. ") can't send card decline email to ". join(', ', grep { $_ ne 'POST' } $cust_main->invoicing_list ). " via server $smtpmachine with SMTP: $!"; @@ -944,7 +944,7 @@ sub print_text { =head1 VERSION -$Id: cust_bill.pm,v 1.28 2002-04-16 09:38:19 ivan Exp $ +$Id: cust_bill.pm,v 1.29 2002-04-16 10:47:34 ivan Exp $ =head1 BUGS diff --git a/FS/FS/cust_bill_event.pm b/FS/FS/cust_bill_event.pm index 146a30e02..d5ca55f36 100644 --- a/FS/FS/cust_bill_event.pm +++ b/FS/FS/cust_bill_event.pm @@ -132,6 +132,17 @@ sub part_bill_event { qsearchs( 'part_bill_event', { 'eventpart' => $self->eventpart } ); } +=item cust_bill + +Returns the invoice (see L) for this completed invoice event. + +=cut + +sub cust_bill { + my $self = shift; + qsearchs( 'cust_bill', { 'invnum' => $self->invnum } ); +} + =back =head1 BUGS diff --git a/httemplate/index.html b/httemplate/index.html index 934767dde..b562a2280 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -58,6 +58,7 @@
View pending credit card batch

Invoice reports Invoices