summaryrefslogtreecommitdiff
path: root/FS/FS/cust_refund.pm
diff options
context:
space:
mode:
authorivan <ivan>2001-04-09 23:05:16 +0000
committerivan <ivan>2001-04-09 23:05:16 +0000
commit15f65a0c56cbce6951d9cb4f71119725a2009f79 (patch)
treea167652e2d03e0da125dffb880f1542fb98e4e60 /FS/FS/cust_refund.pm
parent0281069f3cd7f8caab7768cd818b088991b62117 (diff)
Transactions Part I!!!
Diffstat (limited to 'FS/FS/cust_refund.pm')
-rw-r--r--FS/FS/cust_refund.pm19
1 files changed, 2 insertions, 17 deletions
diff --git a/FS/FS/cust_refund.pm b/FS/FS/cust_refund.pm
index 742c9bb8d..729dc02b0 100644
--- a/FS/FS/cust_refund.pm
+++ b/FS/FS/cust_refund.pm
@@ -75,27 +75,12 @@ L<FS::cust_credit>).
sub insert {
my $self = shift;
- my $error;
-
- $error=$self->check;
+ my $error = $self->check;
return $error if $error;
my $old_cust_credit =
qsearchs( 'cust_credit', { 'crednum' => $self->crednum } );
return "Unknown crednum" unless $old_cust_credit;
- my %hash = $old_cust_credit->hash;
- $hash{credited} = sprintf("%.2f", $hash{credited} - $self->refund );
- my($new_cust_credit) = new FS::cust_credit ( \%hash );
-
- local $SIG{HUP} = 'IGNORE';
- local $SIG{INT} = 'IGNORE';
- local $SIG{QUIT} = 'IGNORE';
- local $SIG{TERM} = 'IGNORE';
- local $SIG{TSTP} = 'IGNORE';
- local $SIG{PIPE} = 'IGNORE';
-
- $error = $new_cust_credit->replace($old_cust_credit);
- return "Error modifying cust_credit: $error" if $error;
$self->SUPER::insert;
}
@@ -172,7 +157,7 @@ sub check {
=head1 VERSION
-$Id: cust_refund.pm,v 1.2 2001-02-11 17:17:39 ivan Exp $
+$Id: cust_refund.pm,v 1.3 2001-04-09 23:05:15 ivan Exp $
=head1 BUGS