summaryrefslogtreecommitdiff
path: root/FS/FS/part_referral.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/part_referral.pm')
-rw-r--r--FS/FS/part_referral.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/FS/FS/part_referral.pm b/FS/FS/part_referral.pm
index f30ddad..c0858c0 100644
--- a/FS/FS/part_referral.pm
+++ b/FS/FS/part_referral.pm
@@ -38,6 +38,8 @@ The following fields are currently supported:
=item referral - Text name of this advertising source
+=item disabled - Disabled flag, empty or 'Y'
+
=back
=head1 NOTE
@@ -91,10 +93,17 @@ replace methods.
sub check {
my $self = shift;
- $self->ut_numbern('refnum')
+ my $error = $self->ut_numbern('refnum')
|| $self->ut_text('referral')
- || $self->SUPER::check
;
+ return $error if $error;
+
+ if ( $self->dbdef_table->column('disabled') ) {
+ $error = $self->ut_enum('disabled', [ '', 'Y' ] );
+ return $error if $error;
+ }
+
+ $self->SUPER::check;
}
=back