diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-11-15 11:37:27 -0500 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-11-15 13:52:30 -0500 |
commit | a8944edbf9043e38df231ad6495f375f8655b585 (patch) | |
tree | 6606cbb7149a91bdc312e5d20ff6341efbf7add6 /FS/FS/cust_pay.pm | |
parent | 3d262a9f8af976a08152a9fbc70cbcdbbf3b305e (diff) |
RT# 80138 - Added config option to display/edit customer option to send or not send payment receipts
Diffstat (limited to 'FS/FS/cust_pay.pm')
-rw-r--r-- | FS/FS/cust_pay.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 4c82d10..915cb33 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -241,6 +241,8 @@ sub insert { local $FS::UID::AutoCommit = 0; my $dbh = dbh; + my $conf = new FS::Conf; + my $cust_bill; if ( $self->invnum ) { $cust_bill = qsearchs('cust_bill', { 'invnum' => $self->invnum } ) @@ -650,6 +652,8 @@ sub send_receipt { return '' unless $conf->config_bool('payment_receipt', $cust_main->agentnum); + return '' if ($conf->config_bool('allow_payment_receipt_noemail', $cust_main->agentnum) && $cust_main->paymentreceipt_noemail); + my @invoicing_list = $cust_main->invoicing_list_emailonly; return '' unless @invoicing_list; |