diff options
author | Mark Wells <mark@freeside.biz> | 2012-10-10 12:24:09 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-10-10 12:24:09 -0700 |
commit | 963b977d201a71e85781bcbf6732795728e9fc0f (patch) | |
tree | 19a45ce6aa3c93e848511d15972f1ef81f65d99b /FS/FS/part_tag.pm | |
parent | 64c605834e8674c6ae5a3c7e235e37364826c870 (diff) |
HTML templates for printable form letters, #17349
Diffstat (limited to 'FS/FS/part_tag.pm')
-rw-r--r-- | FS/FS/part_tag.pm | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/FS/FS/part_tag.pm b/FS/FS/part_tag.pm index 0229e3a..ed31929 100644 --- a/FS/FS/part_tag.pm +++ b/FS/FS/part_tag.pm @@ -30,22 +30,17 @@ FS::Record. The following fields are currently supported: =over 4 -=item tagnum +=item tagnum - primary key -primary key +=item tagname - tag name -=item tagname +=item tagdesc - description (can be longer than name) -tagname +=item tagcolor - HTML-style color to display this tag -=item tagdesc - -tagdesc - -=item tagcolor - -tagcolor +=item by_default - 'Y' to enable this tag on new customers +=item disabled =back @@ -111,6 +106,7 @@ sub check { || $self->ut_text('tagname') || $self->ut_textn('tagdesc') || $self->ut_textn('tagcolor') + || $self->ut_enum('by_default', [ '', 'Y' ] ) || $self->ut_enum('disabled', [ '', 'Y' ] ) ; return $error if $error; @@ -120,6 +116,21 @@ sub check { =back +=head1 CLASS METHODS + +=over 4 + +=item default_tags + +Returns the tagnums of all tags that have 'by_default' enabled. + +=cut + +sub default_tags { + my $class = shift; + map { $_->tagnum } qsearch('part_tag', { disabled => '', by_default => 'Y' }); +} + =head1 BUGS =head1 SEE ALSO |