diff options
| author | Christopher Burger <burgerc@freeside.biz> | 2018-05-16 12:39:59 -0400 | 
|---|---|---|
| committer | Christopher Burger <burgerc@freeside.biz> | 2018-05-16 18:49:16 -0400 | 
| commit | 01625315547278cbf15ad5e96c218b5cd4bf10cc (patch) | |
| tree | e8f92181fc1deb61bf1ab468a67eb1d52a4f6ae9 /FS/FS | |
| parent | 0bc6f2a95309807cc9372a6be3a36d5e8b3485d8 (diff) | |
RT# 78131 - added documentation for new method.
Conflicts:
	FS/FS/cust_pay.pm
Diffstat (limited to 'FS/FS')
| -rw-r--r-- | FS/FS/cust_pay.pm | 20 | 
1 files changed, 15 insertions, 5 deletions
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 285ab3f3c..67f4b297d 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -664,6 +664,7 @@ sub send_receipt {         || ! $cust_bill       )    { +      $error = $self->send_message_receipt(          'cust_main'      => $cust_main,          'cust_bill'      => $opt->{cust_bill}, @@ -716,7 +717,13 @@ sub send_receipt {  =item send_message_receipt  sends out a message receipt. -send_message_receipt($cust_main, $msgnum); +$error = $self->send_message_receipt( +        'cust_main'      => $cust_main, +        'cust_bill'      => $opt->{cust_bill}, +        'cust_pkg'       => $opt->{cust_pkg}, +        'invoicing_list' => @invoicing_list, +        'msgnum'         => $conf->config('payment_receipt_msgnum', $cust_main->agentnum) +      );  =cut @@ -734,6 +741,11 @@ sub send_message_receipt {        my %substitutions = ();        $substitutions{invnum} = $cust_bill->invnum if $cust_bill; +      my $msg_template = qsearchs('msg_template',{ msgnum => $msgnum}); +      unless ($msg_template) { +        return "send_receipt could not load msg_template"; +      } +        my $queue = new FS::queue {          'job'     => 'FS::Misc::process_send_email',          'paynum'  => $self->paynum, @@ -754,8 +766,7 @@ sub send_message_receipt {          TYPE   => 'ARRAY',          SOURCE => [ map "$_\n", $conf->config('payment_receipt_email') ],        ) or do { -        warn "can't create payment receipt template: $Text::Template::ERROR"; -        return ''; +        return "can't create payment receipt template: $Text::Template::ERROR";        };        my $payby = $self->payby; @@ -800,8 +811,7 @@ sub send_message_receipt {          'body'    => [ $receipt_template->fill_in( HASH => \%fill_in ) ],        );        } else { -      warn "payment_receipt is on, but no payment_receipt_msgnum\n"; -      $error = "payment_receipt is on, but no payment_receipt_msgnum"; +      $error = "payment_receipt is on, but no payment_receipt_msgnum\n";      }    return $error;  | 
