From a8944edbf9043e38df231ad6495f375f8655b585 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Thu, 15 Nov 2018 11:37:27 -0500 Subject: RT# 80138 - Added config option to display/edit customer option to send or not send payment receipts --- FS/FS/cust_pay.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'FS/FS/cust_pay.pm') 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; -- cgit v1.1