get rid of FS::SSH.pm (became Net::SSH and Net::SCP on CPAN)
[freeside.git] / FS / FS / cust_pay.pm
index e2b9298..f0d9450 100644 (file)
@@ -29,8 +29,9 @@ FS::cust_pay - Object methods for cust_pay objects
 
 =head1 DESCRIPTION
 
-An FS::cust_pay object represents a payment.  FS::cust_pay inherits from
-FS::Record.  The following fields are currently supported:
+An FS::cust_pay object represents a payment; the transfer of money from a
+customer.  FS::cust_pay inherits from FS::Record.  The following fields are
+currently supported:
 
 =over 4
 
@@ -73,26 +74,11 @@ L<FS::cust_bill>).
 sub insert {
   my $self = shift;
 
-  my $error;
-
-  $error = $self->check;
+  my $error = $self->check;
   return $error if $error;
 
   my $old_cust_bill = qsearchs( 'cust_bill', { 'invnum' => $self->invnum } );
   return "Unknown invnum" unless $old_cust_bill;
-  my %hash = $old_cust_bill->hash;
-  $hash{'owed'} = sprintf("%.2f", $hash{owed} - $self->paid );
-  my $new_cust_bill = new FS::cust_bill ( \%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_bill->replace($old_cust_bill);
-  return "Error modifying cust_bill: $error" if $error;
 
   $self->SUPER::insert;
 }
@@ -172,7 +158,7 @@ sub check {
 
 =head1 VERSION
 
-$Id: cust_pay.pm,v 1.1 1999-08-04 09:03:53 ivan Exp $
+$Id: cust_pay.pm,v 1.3 2001-04-09 23:05:15 ivan Exp $
 
 =head1 BUGS