X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_credit.pm;h=47a8119ee78d455d7e11dfe0f0445f03293374c2;hb=2fc4e14db2e9ae2ff9ee2c31e498782800d576b5;hp=d5b6ff465a8b359a59b9afc2c03ba467324d9c43;hpb=2e2fb0fc3619ce3afc268bcaa3e34f1e712e57c5;p=freeside.git diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm index d5b6ff465..47a8119ee 100644 --- a/FS/FS/cust_credit.pm +++ b/FS/FS/cust_credit.pm @@ -87,6 +87,10 @@ Text ( deprecated ) Reason (see L) +=item addlinfo + +Text + =item closed Books closed flag, empty or `Y' @@ -225,7 +229,8 @@ sub delete { my $cust_main = $self->cust_main; my $error = send_email( - 'from' => $conf->config('invoice_from'), #??? well as good as any + 'from' => $conf->config('invoice_from', $self->cust_main->agentnum), + #invoice_from??? well as good as any 'to' => $conf->config('deletecredits'), 'subject' => 'FREESIDE NOTIFICATION: Credit deleted', 'body' => [ @@ -288,6 +293,7 @@ sub check { || $self->ut_alpha('otaker') || $self->ut_textn('reason') || $self->ut_foreign_key('reasonnum', 'reason', 'reasonnum') + || $self->ut_textn('addlinfo') || $self->ut_enum('closed', [ '', 'Y' ]) ; return $error if $error; @@ -412,7 +418,8 @@ sub reason { $dbh->commit or die $dbh->errstr if $oldAutoCommit; - $reason ? $reason->reason : ''; + ( $reason ? $reason->reason : '' ). + ( $self->addlinfo ? ' '.$self->addlinfo : '' ); } # _upgrade_data