diff options
author | mark <mark> | 2011-04-01 02:52:24 +0000 |
---|---|---|
committer | mark <mark> | 2011-04-01 02:52:24 +0000 |
commit | b65b8096089410001dfbcd35f9a56f9405b9f5f1 (patch) | |
tree | df16b0422007bd876bc969bdff857d8a510b0aca /FS/FS/part_svc_column.pm | |
parent | 19b0c403fbf697a1de92f12abc8a2104daca07bc (diff) |
svc_hardware and svc_dish, #11454
Diffstat (limited to 'FS/FS/part_svc_column.pm')
-rw-r--r-- | FS/FS/part_svc_column.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/FS/FS/part_svc_column.pm b/FS/FS/part_svc_column.pm index f5b39c0..d467516 100644 --- a/FS/FS/part_svc_column.pm +++ b/FS/FS/part_svc_column.pm @@ -43,7 +43,7 @@ fields are currently supported: =item columnvalue - default or fixed value for the column -=item columnflag - null or empty (no default), `D' for default, `F' for fixed (unchangeable), `S' for selectable choice, `M' for manual selection from inventory, or `A' for automatic selection from inventory. For virtual fields, can also be 'X' for excluded. +=item columnflag - null or empty (no default), `D' for default, `F' for fixed (unchangeable), `S' for selectable choice, `M' for manual selection from inventory, `A' for automatic selection from inventory, or `H' for selection from a hardware class. For virtual fields, can also be 'X' for excluded. =back @@ -94,15 +94,19 @@ sub check { ; return $error if $error; - $self->columnflag =~ /^([DFSMAX]?)$/ + $self->columnflag =~ /^([DFSMAHX]?)$/ or return "illegal columnflag ". $self->columnflag; $self->columnflag(uc($1)); if ( $self->columnflag =~ /^[MA]$/ ) { $error = $self->ut_foreign_key( 'columnvalue', 'inventory_class', 'classnum' ); - return $error if $error; } + if ( $self->columnflag eq 'H' ) { + $error = + $self->ut_foreign_key( 'columnvalue', 'hardware_class', 'classnum' ); + } + return $error if $error; $self->SUPER::check; } |