summaryrefslogtreecommitdiff
path: root/FS/FS/cust_refund.pm
diff options
context:
space:
mode:
authorivan <ivan>2002-01-28 06:57:23 +0000
committerivan <ivan>2002-01-28 06:57:23 +0000
commit1aa750eba2b9b73b4f09f28b9acd748ee3669bd4 (patch)
tree08133c5572e09b75b3557b32335ad53d0668c6eb /FS/FS/cust_refund.pm
parentb03df92e48df653460cb8b6034a06dd1de6f4095 (diff)
book closing schema changes
Diffstat (limited to 'FS/FS/cust_refund.pm')
-rw-r--r--FS/FS/cust_refund.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/FS/FS/cust_refund.pm b/FS/FS/cust_refund.pm
index 2f7b3af..3dbd4ef 100644
--- a/FS/FS/cust_refund.pm
+++ b/FS/FS/cust_refund.pm
@@ -55,6 +55,8 @@ L<Time::Local> and L<Date::Parse> for conversion functions.
=item otaker - order taker (assigned automatically, see L<FS::UID>)
+=item closed - books closed flag, empty or `Y'
+
=back
=head1 METHODS
@@ -189,7 +191,9 @@ Currently unimplemented (accounting reasons).
=cut
sub delete {
- return "Can't (yet?) delete cust_refund records!";
+ my $self = shift;
+ return "Can't delete closed refund" if $self->closed =~ /^Y/i;
+ $self->SUPER::delete(@_);
}
=item replace OLD_RECORD
@@ -218,6 +222,7 @@ sub check {
|| $self->ut_money('refund')
|| $self->ut_numbern('_date')
|| $self->ut_textn('paybatch')
+ || $self->ut_enum('closed', [ '', 'Y' ])
;
return $error if $error;
@@ -261,7 +266,7 @@ sub check {
=head1 VERSION
-$Id: cust_refund.pm,v 1.14 2002-01-24 16:58:47 ivan Exp $
+$Id: cust_refund.pm,v 1.15 2002-01-28 06:57:23 ivan Exp $
=head1 BUGS