projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1d0c67a
)
fix payment receipts when payment_receipt_msgnum is unconfigured
author
ivan
<ivan>
Tue, 24 Aug 2010 00:55:48 +0000
(
00:55
+0000)
committer
ivan
<ivan>
Tue, 24 Aug 2010 00:55:48 +0000
(
00:55
+0000)
FS/FS/cust_pay.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_pay.pm
b/FS/FS/cust_pay.pm
index
eee263a
..
accc826
100644
(file)
--- a/
FS/FS/cust_pay.pm
+++ b/
FS/FS/cust_pay.pm
@@
-458,12
+458,15
@@
sub send_receipt {
my $error = '';
my $error = '';
- if( $conf->exists('payment_receipt_msgnum') ) {
+ if ( $conf->exists('payment_receipt_msgnum')
+ && $conf->config('payment_receipt_msgnum')
+ )
+ {
my $msg_template =
FS::msg_template->by_key($conf->config('payment_receipt_msgnum'));
$error = $msg_template->send('cust_main'=> $cust_main, 'object'=> $self);
my $msg_template =
FS::msg_template->by_key($conf->config('payment_receipt_msgnum'));
$error = $msg_template->send('cust_main'=> $cust_main, 'object'=> $self);
- }
- elsif ( $conf->exists('payment_receipt_email') ) {
+
+
}
elsif ( $conf->exists('payment_receipt_email') ) {
my $receipt_template = new Text::Template (
TYPE => 'ARRAY',
SOURCE => [ map "$_\n", $conf->config('payment_receipt_email') ],
my $receipt_template = new Text::Template (
TYPE => 'ARRAY',
SOURCE => [ map "$_\n", $conf->config('payment_receipt_email') ],
@@
-506,8
+509,7
@@
sub send_receipt {
'body' => [ $receipt_template->fill_in( HASH => \%fill_in ) ],
);
'body' => [ $receipt_template->fill_in( HASH => \%fill_in ) ],
);
- }
- else { # no payment_receipt_msgnum or payment_receipt_email
+ } else { # no payment_receipt_msgnum or payment_receipt_email
my $queue = new FS::queue {
'paynum' => $self->paynum,
my $queue = new FS::queue {
'paynum' => $self->paynum,