allow credits to be modified at API level
authorivan <ivan>
Mon, 22 Dec 2003 21:01:13 +0000 (21:01 +0000)
committerivan <ivan>
Mon, 22 Dec 2003 21:01:13 +0000 (21:01 +0000)
FS/FS/cust_credit.pm

index 284d59d..22a0cdf 100644 (file)
@@ -141,7 +141,10 @@ posted.
 =cut
 
 sub replace {
-  return "Can't modify credit!"
+  #return "Can't modify credit!"
+  my $self = shift;
+  return "Can't modify closed credit" if $self->closed =~ /^Y/i;
+  $self->SUPER::replace(@_);
 }
 
 =item check
@@ -240,13 +243,9 @@ sub credited {
 
 =back
 
-=head1 VERSION
-
-$Id: cust_credit.pm,v 1.16 2002-06-04 14:35:52 ivan Exp $
-
 =head1 BUGS
 
-The delete method.
+The delete method.  The replace method.
 
 =head1 SEE ALSO