summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2009-07-20 04:51:34 +0000
committerivan <ivan>2009-07-20 04:51:34 +0000
commit52d81f0b1f3bc092da71e7f5919d332c4fa012d5 (patch)
treeb2d026c0392632a525a2bd42fc70b44405043279 /FS
parent3aa3b1bab64f02a54d0b82e8e7268da56a88e019 (diff)
one $conf is enough
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_pkg.pm3
1 files changed, 0 insertions, 3 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index f56402377..4d44692b3 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -647,7 +647,6 @@ sub cancel {
# Add a credit for remaining service
my $remaining_value = $self->calc_remain(time=>$cancel_time);
if ( $remaining_value > 0 && !$options{'no_credit'} ) {
- my $conf = new FS::Conf;
my $error = $self->cust_main->credit(
$remaining_value,
'Credit for unused time on '. $self->part_pkg->pkg,
@@ -673,10 +672,8 @@ sub cancel {
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
return '' if $date; #no errors
- my $conf = new FS::Conf;
my @invoicing_list = grep { $_ !~ /^(POST|FAX)$/ } $self->cust_main->invoicing_list;
if ( !$options{'quiet'} && $conf->exists('emailcancel') && @invoicing_list ) {
- my $conf = new FS::Conf;
my $error = send_email(
'from' => $conf->config('invoice_from', $self->cust_main->agentnum),
'to' => \@invoicing_list,