make postfix export commands configrable
[freeside.git] / FS / FS / cust_credit_bill.pm
index 88a732b..449f011 100644 (file)
@@ -96,7 +96,10 @@ Currently unimplemented.
 =cut
 
 sub delete {
-  return "Can't unapply credit!"
+  my $self = shift;
+  return "Can't delete application for closed credit"
+    if $self->cust_credit->closed =~ /^Y/i;
+  $self->SUPER::delete(@_);
 }
 
 =item replace OLD_RECORD
@@ -147,7 +150,7 @@ sub check {
   return "Cannot apply more than remaining value of invoice"
     unless $self->amount <= $cust_bill->owed;
 
-  $self->SUPER::check;
+  ''; #no error
 }
 
 =item sub cust_credit