X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_pay.pm;h=bc5fbab0807f62c1cec4963ee556e903f34f3bcb;hp=f057d2faf4f8fc01c751e36a547a098e58fae2ee;hb=d77dad830dda5fbe6d807445e09fe6770efdb550;hpb=201c446a69a498dd2fe61206ca7d04d930c497b5 diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index f057d2faf..bc5fbab08 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -272,12 +272,14 @@ sub void { =item delete -Deletes this payment and all associated applications (see L), -unless the closed flag is set. In most cases, you want to use the void -method instead to leave a record of the deleted payment. +Unless the closed flag is set, deletes this payment and all associated +applications (see L and L). In most +cases, you want to use the void method instead to leave a record of the +deleted payment. =cut +# very similar to FS::cust_credit::delete sub delete { my $self = shift; return "Can't delete closed payment" if $self->closed =~ /^Y/i; @@ -345,7 +347,16 @@ sub delete { =item replace OLD_RECORD -You probably shouldn't modify payments... +You can, but probably shouldn't modify payments... + +=cut + +sub replace { + #return "Can't modify payment!" + my $self = shift; + return "Can't modify closed payment" if $self->closed =~ /^Y/i; + $self->SUPER::replace(@_); +} =item check