From 686ac9dce198f8ddf01e507b3289485b4ef20946 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 15 May 2013 02:09:30 -0700 Subject: [PATCH] payment voids exist, time for deletepayments to go --- FS/FS/Conf.pm | 7 ------- FS/FS/cust_pay.pm | 32 -------------------------------- 2 files changed, 39 deletions(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 0a9b781d7..0784cd050 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1066,13 +1066,6 @@ sub reason_type_options { }, { - 'key' => 'deletepayments', - 'section' => 'billing', - 'description' => 'Enable deletion of unclosed payments. Really, with voids this is pretty much not recommended in any situation anymore. Be very careful! Only delete payments that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.', - 'type' => [qw( checkbox text )], - }, - - { 'key' => 'deletecredits', #not actually deprecated yet #'section' => 'deprecated', diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index da9143909..86fcf9b4d 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -459,38 +459,6 @@ sub delete { return $error; } - if ( $conf->exists('deletepayments') - && $conf->config('deletepayments') ne '' ) { - - my $cust_main = $self->cust_main; - - my $error = send_email( - 'from' => $conf->config('invoice_from', $self->cust_main->agentnum), - #invoice_from??? well as good as any - 'to' => $conf->config('deletepayments'), - 'subject' => 'FREESIDE NOTIFICATION: Payment deleted', - 'body' => [ - "This is an automatic message from your Freeside installation\n", - "informing you that the following payment has been deleted:\n", - "\n", - 'paynum: '. $self->paynum. "\n", - 'custnum: '. $self->custnum. - " (". $cust_main->last. ", ". $cust_main->first. ")\n", - 'paid: $'. sprintf("%.2f", $self->paid). "\n", - 'date: '. time2str("%a %b %e %T %Y", $self->_date). "\n", - 'payby: '. $self->payby. "\n", - 'payinfo: '. $self->paymask. "\n", - 'paybatch: '. $self->paybatch. "\n", - ], - ); - - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "can't send payment deletion notification: $error"; - } - - } - $dbh->commit or die $dbh->errstr if $oldAutoCommit; ''; -- 2.11.0