X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_credit_bill.pm;h=bd76c2e1ad8b4128229bc626380e1412da31da78;hp=0bbc656ea4657785d8eac903dfd1b96896042d49;hb=e975ed0585280f4cbb90b02f57114dedc43f58be;hpb=281d9b3d2f0f955c159275cafe405f73c88733ba diff --git a/FS/FS/cust_credit_bill.pm b/FS/FS/cust_credit_bill.pm index 0bbc656ea..bd76c2e1a 100644 --- a/FS/FS/cust_credit_bill.pm +++ b/FS/FS/cust_credit_bill.pm @@ -74,6 +74,8 @@ sub table { 'cust_credit_bill'; } Adds this cust_credit_bill to the database ("Posts" all or part of a credit). If there is an error, returns the error, otherwise returns false. +=cut + sub insert { my $self = shift; my $error = $self->SUPER::insert(@_); @@ -94,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