projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
338b3a1
)
RT#38432: OFM - Send refund receipt [v3 message prepare]
author
Jonathan Prykop
<jonathan@freeside.biz>
Thu, 29 Oct 2015 04:37:58 +0000
(23:37 -0500)
committer
Jonathan Prykop
<jonathan@freeside.biz>
Thu, 29 Oct 2015 04:37:58 +0000
(23:37 -0500)
FS/FS/cust_refund.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_refund.pm
b/FS/FS/cust_refund.pm
index
d156d22
..
166e537
100644
(file)
--- a/
FS/FS/cust_refund.pm
+++ b/
FS/FS/cust_refund.pm
@@
-377,20
+377,17
@@
sub send_receipt {
return "Could not load template"
unless $msg_template;
return "Could not load template"
unless $msg_template;
- my $cust_msg = $msg_template->prepare(
- 'cust_main' => $cust_main,
- 'object' => $self,
- 'msgtype' => 'receipt',
- );
- return 'Error preparing message' unless $cust_msg;
- my $error = $cust_msg->insert;
- return $error if $error;
-
my $queue = new FS::queue {
my $queue = new FS::queue {
- 'job' => 'FS::
cust_msg::process_send
',
+ 'job' => 'FS::
Misc::process_send_email
',
'custnum' => $cust_main->custnum,
};
'custnum' => $cust_main->custnum,
};
- $error = $queue->insert( $cust_msg->custmsgnum );
+ my $error = $queue->insert(
+ FS::msg_template->by_key($msgnum)->prepare(
+ 'cust_main' => $cust_main,
+ 'object' => $self,
+ ),
+ 'msgtype' => 'receipt', # override msg_template's default
+ );
return $error;
}
return $error;
}