4 use vars qw( $base_dir @config_items @base_items @card_types @invoice_terms
6 $conf_cache $conf_cache_enabled
18 use FS::Record qw(qsearch qsearchs);
19 use FS::UID qw(dbh datasrc);
20 use FS::Misc::Invoicing qw( spool_formats );
22 $base_dir = '%%%FREESIDE_CONF%%%';
26 $conf_cache_enabled = 0;
30 FS::Conf - Freeside configuration values
38 $value = $conf->config('key');
39 @list = $conf->config('key');
40 $bool = $conf->exists('key');
43 $conf->set('key' => 'value');
46 @config_items = $conf->config_items;
50 Read and write Freeside configuration values. Keys currently map to filenames,
51 but this may change in the future.
59 Create a new configuration object.
61 HASHREF may contain options to set the configuration context. Currently
62 accepts C<locale>, and C<localeonly> to disable fallback to the null locale.
68 my $opts = shift || {};
69 my($class) = ref($proto) || $proto;
71 'base_dir' => $base_dir,
72 'locale' => $opts->{locale},
73 'localeonly' => $opts->{localeonly}, # for config-view.cgi ONLY
75 warn "FS::Conf created with no locale fallback.\n" if $self->{localeonly};
76 bless ($self, $class);
81 Returns the base directory. By default this is /usr/local/etc/freeside.
87 my $base_dir = $self->{base_dir};
88 -e $base_dir or die "FATAL: $base_dir doesn't exist!";
89 -d $base_dir or die "FATAL: $base_dir isn't a directory!";
90 -r $base_dir or die "FATAL: Can't read $base_dir!";
91 -x $base_dir or die "FATAL: $base_dir not searchable (executable)!";
92 $base_dir =~ /^(.*)$/;
96 =item conf KEY [ AGENTNUM [ NODEFAULT ] ]
98 Returns the L<FS::conf> record for the key and agent.
107 =item config KEY [ AGENTNUM [ NODEFAULT ] ]
109 Returns the configuration value or values (depending on context) for key.
110 The optional agent number selects an agent specific value instead of the
111 global default if one is present. If NODEFAULT is true only the agent
112 specific value(s) is returned.
117 my($self,$name,$agentnum,$agentonly)=@_;
118 my $hashref = { 'name' => $name };
119 local $FS::Record::conf = undef; # XXX evil hack prevents recursion
120 $conf_cache = undef unless $conf_cache_enabled; # use cache only when it is
125 ($agentonly && $agentnum ? () : '')
128 ($self->{locale} || ()),
129 ($self->{localeonly} && $self->{locale} ? () : '')
131 # try with the agentnum first, then fall back to no agentnum if allowed
133 $hashref->{agentnum} = $a;
135 my $key = join(':',$name, $a, $l);
136 if (! exists $conf_cache->{$key}){
137 $hashref->{locale} = $l;
138 # $conf_cache is reset in FS::UID during myconnect, so the cache is
139 # reset per connection
140 $conf_cache->{$key} = FS::Record::qsearchs('conf', $hashref);
142 return $conf_cache->{$key} if $conf_cache->{$key};
151 carp "FS::Conf->config(". join(', ', @_). ") called"
154 my $cv = $self->_config(@_) or return;
159 (split "\n", $v, -1);
161 (split("\n", $cv->value))[0];
165 =item config_binary KEY [ AGENTNUM [ NODEFAULT ] ]
167 Returns the exact scalar value for key.
174 my $cv = $self->_config(@_) or return;
175 length($cv->value) ? decode_base64($cv->value) : '';
178 =item exists KEY [ AGENTNUM [ NODEFAULT ] ]
180 Returns true if the specified key exists, even if the corresponding value
188 #my($name, $agentnum)=@_;
190 carp "FS::Conf->exists(". join(', ', @_). ") called"
193 defined($self->_config(@_));
196 #maybe this should just be the new exists instead of getting a method of its
197 #own, but i wanted to avoid possible fallout
202 my($name,$agentnum,$agentonly) = @_;
204 carp "FS::Conf->config_bool(". join(', ', @_). ") called"
207 #defined($self->_config(@_));
209 #false laziness w/_config
210 my $hashref = { 'name' => $name };
211 local $FS::Record::conf = undef; # XXX evil hack prevents recursion
215 ($agentonly && $agentnum ? () : '')
218 ($self->{locale} || ()),
219 ($self->{localeonly} && $self->{locale} ? () : '')
221 # try with the agentnum first, then fall back to no agentnum if allowed
223 $hashref->{agentnum} = $a;
225 $hashref->{locale} = $l;
226 $cv = FS::Record::qsearchs('conf', $hashref);
228 if ( $cv->value eq '0'
229 && ($hashref->{agentnum} || $hashref->{locale} )
232 return 0; #an explicit false override, don't continue looking
243 =item config_orbase KEY SUFFIX
245 Returns the configuration value or values (depending on context) for
246 KEY_SUFFIX, if it exists, otherwise for KEY
250 # outmoded as soon as we shift to agentnum based config values
251 # well, mostly. still useful for e.g. late notices, etc. in that we want
252 # these to fall back to standard values
256 my( $name, $suffix ) = @_;
257 if ( $self->exists("${name}_$suffix") ) {
258 $self->config("${name}_$suffix");
260 $self->config($name);
264 =item key_orbase KEY SUFFIX
266 If the config value KEY_SUFFIX exists, returns KEY_SUFFIX, otherwise returns
267 KEY. Useful for determining which exact configuration option is returned by
275 my( $name, $suffix ) = @_;
276 if ( $self->exists("${name}_$suffix") ) {
283 =item invoice_templatenames
285 Returns all possible invoice template names.
289 sub invoice_templatenames {
292 my %templatenames = ();
293 foreach my $item ( $self->config_items ) {
294 foreach my $base ( @base_items ) {
295 my( $main, $ext) = split(/\./, $base);
296 $ext = ".$ext" if $ext;
297 if ( $item->key =~ /^${main}_(.+)$ext$/ ) {
298 $templatenames{$1}++;
303 map { $_ } #handle scalar context
304 sort keys %templatenames;
308 =item touch KEY [ AGENT ];
310 Creates the specified configuration key if it does not exist.
317 my($name, $agentnum) = @_;
318 #unless ( $self->exists($name, $agentnum) ) {
319 unless ( $self->config_bool($name, $agentnum) ) {
320 if ( $agentnum && $self->exists($name) && $self->config($name,$agentnum) eq '0' ) {
321 $self->delete($name, $agentnum);
323 $self->set($name, '', $agentnum);
328 =item set KEY VALUE [ AGENTNUM ];
330 Sets the specified configuration key to the given value.
337 my($name, $value, $agentnum) = @_;
341 warn "[FS::Conf] SET $name\n" if $DEBUG;
345 agentnum => $agentnum,
346 locale => $self->{locale}
349 my $old = FS::Record::qsearchs('conf', $hashref);
350 my $new = new FS::conf { $old ? $old->hash : %$hashref };
355 $error = $new->replace($old);
357 $error = $new->insert;
361 # clean the object cache
362 my $key = join(':',$name, $agentnum, $self->{locale});
363 $conf_cache->{ $key } = $new;
366 die "error setting configuration value: $error \n"
371 =item set_binary KEY VALUE [ AGENTNUM ]
373 Sets the specified configuration key to an exact scalar value which
374 can be retrieved with config_binary.
381 my($name, $value, $agentnum)=@_;
382 $self->set($name, encode_base64($value), $agentnum);
385 =item delete KEY [ AGENTNUM ];
387 Deletes the specified configuration key.
394 my($name, $agentnum) = @_;
395 if ( my $cv = FS::Record::qsearchs('conf', {name => $name, agentnum => $agentnum, locale => $self->{locale}}) ) {
396 warn "[FS::Conf] DELETE $name\n" if $DEBUG;
398 my $oldAutoCommit = $FS::UID::AutoCommit;
399 local $FS::UID::AutoCommit = 0;
402 my $error = $cv->delete;
405 $dbh->rollback if $oldAutoCommit;
406 die "error setting configuration value: $error \n"
409 $dbh->commit or die $dbh->errstr if $oldAutoCommit;
414 #maybe this should just be the new delete instead of getting a method of its
415 #own, but i wanted to avoid possible fallout
420 my($name, $agentnum) = @_;
422 warn "[FS::Conf] DELETE $name\n" if $DEBUG;
424 my $cv = FS::Record::qsearchs('conf', { name => $name,
425 agentnum => $agentnum,
426 locale => $self->{locale},
430 my $error = $cv->delete;
431 die $error if $error;
432 } elsif ( $agentnum ) {
433 $self->set($name, '0', $agentnum);
438 =item import_config_item CONFITEM DIR
440 Imports the item specified by the CONFITEM (see L<FS::ConfItem>) into
441 the database as a conf record (see L<FS::conf>). Imports from the file
442 in the directory DIR.
446 sub import_config_item {
447 my ($self,$item,$dir) = @_;
448 my $key = $item->key;
449 if ( -e "$dir/$key" ) {
450 warn "Inserting $key\n" if $DEBUG;
452 my $value = readline(new IO::File "$dir/$key");
453 if ($item->type =~ /^(binary|image)$/ ) {
454 $self->set_binary($key, $value);
456 $self->set($key, $value);
459 warn "Not inserting $key\n" if $DEBUG;
463 #item _orbase_items OPTIONS
465 #Returns all of the possible extensible config items as FS::ConfItem objects.
466 #See #L<FS::ConfItem>. OPTIONS consists of name value pairs. Possible
469 # dir - the directory to search for configuration option files instead
470 # of using the conf records in the database
476 my ($self, %opt) = @_;
478 my $listmaker = sub { my $v = shift;
480 if ( $v =~ /\.(png|eps)$/ ) {
486 FS::Record::qsearch( 'conf',
489 "WHERE name LIKE '$v' ESCAPE '!'"
493 if (exists($opt{dir}) && $opt{dir}) {
494 $listmaker = sub { my $v = shift;
495 if ( $v =~ /\.(png|eps)$/ ) {
500 map { basename $_ } glob($opt{dir}. "/$v" );
507 for ( @config_items ) { $proto = $_; last if $proto->key eq $base; }
508 die "don't know about $base items" unless $proto->key eq $base;
510 map { new FS::ConfItem {
512 'base_key' => $proto->key,
513 'section' => $proto->section,
514 'description' => 'Alternate ' . $proto->description . ' See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:Administration#Invoice_templates">billing documentation</a> for details.',
515 'type' => $proto->type,
517 } &$listmaker($base);
524 Returns all of the possible global/default configuration items as
525 FS::ConfItem objects. See L<FS::ConfItem>.
532 ( @config_items, $self->_orbase_items(@_) );
535 =item invoice_from_full [ AGENTNUM ]
537 Returns values of invoice_from and invoice_from_name (or, if that is not
538 defined, company_name), appropriately combined based on their current values.
542 sub invoice_from_full {
543 my ($self, $agentnum) = @_;
545 ( $self->config('invoice_from_name', $agentnum)
546 || $self->config('company_name', $agentnum)
548 ' <'. $self->config('invoice_from', $agentnum ). '>';
557 =item init-config DIR
559 Imports the configuration items from DIR (1.7 compatible)
560 to conf records in the database.
567 my $conf = new FS::Conf;
568 foreach my $item ( $conf->config_items(dir => $dir) ) {
569 $conf->import_config_item($item, $dir);
579 If this was more than just crud that will never be useful outside Freeside I'd
580 worry that config_items is freeside-specific and icky.
584 "Configuration" in the web interface (config/config.cgi).
588 #Business::CreditCard
593 "American Express card",
594 "Diner's Club/Carte Blanche",
605 invoice_latexreturnaddress
607 invoice_latexsmallfooter
610 invoice_latexwatermark
612 invoice_htmlreturnaddress
615 invoice_htmlwatermark
622 'Payable upon receipt',
623 'Net 0', 'Net 3', 'Net 5', 'Net 7', 'Net 9', 'Net 10', 'Net 14',
624 'Net 15', 'Net 18', 'Net 20', 'Net 21', 'Net 25', 'Net 30', 'Net 45',
628 my %msg_template_options = (
629 'type' => 'select-sub',
630 'options_sub' => sub {
631 my @templates = qsearch({
632 'table' => 'msg_template',
633 'hashref' => { 'disabled' => '' },
634 'extra_sql' => ' AND '.
635 $FS::CurrentUser::CurrentUser->agentnums_sql(null => 1),
637 map { $_->msgnum, $_->msgname } @templates;
639 'option_sub' => sub {
640 my $msg_template = FS::msg_template->by_key(shift);
641 $msg_template ? $msg_template->msgname : ''
646 my %payment_gateway_options = (
647 'type' => 'select-sub',
648 'options_sub' => sub {
649 my @gateways = qsearch({
650 'table' => 'payment_gateway',
651 'hashref' => { 'disabled' => '' },
653 map { $_->gatewaynum, $_->label } @gateways;
655 'option_sub' => sub {
656 my $gateway = FS::payment_gateway->by_key(shift);
657 $gateway ? $gateway->label : ''
661 my %batch_gateway_options = (
662 %payment_gateway_options,
663 'options_sub' => sub {
664 my @gateways = qsearch('payment_gateway',
667 'gateway_namespace' => 'Business::BatchPayment',
670 map { $_->gatewaynum, $_->label } @gateways;
674 my %invoice_mode_options = (
675 'type' => 'select-sub',
676 'options_sub' => sub {
677 my @modes = qsearch({
678 'table' => 'invoice_mode',
679 'extra_sql' => ' WHERE '.
680 $FS::CurrentUser::CurrentUser->agentnums_sql(null => 1),
682 map { $_->modenum, $_->modename } @modes;
684 'option_sub' => sub {
685 my $mode = FS::invoice_mode->by_key(shift);
686 $mode ? $mode->modename : '',
693 'default' => 'Default',
694 'source_default' => 'Default with source',
695 'accountcode_default' => 'Default plus accountcode',
696 'description_default' => 'Default with description field as destination',
698 'simple' => 'Simple',
699 'simple2' => 'Simple with source',
700 'accountcode_simple' => 'Simple with accountcode',
703 # takes the reason class (C, R, S) as an argument
704 sub reason_type_options {
705 my $reason_class = shift;
707 'type' => 'select-sub',
708 'options_sub' => sub {
709 map { $_->typenum => $_->type }
710 qsearch('reason_type', { class => $reason_class });
712 'option_sub' => sub {
713 my $type = FS::reason_type->by_key(shift);
714 $type ? $type->type : '';
718 my $validate_email = sub { $_[0] =~
719 /^[^@]+\@[[:alnum:]-]+(\.[[:alnum:]-]+)+$/
720 ? '' : 'Invalid email address';
724 #Invoicing (50 items)
726 #Self-service (29 items)
728 #Unclassified (77 items)
730 @config_items = map { new FS::ConfItem $_ } (
733 'key' => 'event_log_level',
734 'section' => 'notification',
735 'description' => 'Store events in the internal log if they are at least this severe. "info" is the default, "debug" is very detailed and noisy.',
737 'select_enum' => [ '', 'debug', 'info', 'notice', 'warning', 'error', ],
738 # don't bother with higher levels
742 'key' => 'log_sent_mail',
743 'section' => 'notification',
744 'description' => 'Enable logging of all sent email.',
745 'type' => 'checkbox',
749 'key' => 'part_pkg-lineage',
750 'section' => 'packages',
751 'description' => 'When editing a package definition, if setup or recur fees are changed, create a new package rather than changing the existing package.',
752 'type' => 'checkbox',
757 #not actually deprecated yet
758 #'section' => 'deprecated',
759 #'description' => '<b>DEPRECATED</b>, add an <i>apache</i> <a href="../browse/part_export.cgi">export</a> instead. Used to be the current IP address to assign to new virtual hosts',
760 'section' => 'services',
761 'description' => 'IP address to assign to new virtual hosts',
766 'key' => 'credits-auto-apply-disable',
767 'section' => 'billing',
768 'description' => 'Disable the "Auto-Apply to invoices" UI option for new credits',
769 'type' => 'checkbox',
773 'key' => 'credit-card-surcharge-percentage',
774 'section' => 'credit_cards',
775 'description' => 'Add a credit card surcharge to invoices, as a % of the invoice total. WARNING: Although recently permitted to US merchants in general, specific consumer protection laws may prohibit or restrict this practice in California, Colorado, Connecticut, Florda, Kansas, Maine, Massachusetts, New York, Oklahome, and Texas. Surcharging is also generally prohibited in most countries outside the US, AU and UK. When allowed, typically not permitted to be above 4%.',
781 'key' => 'discount-show-always',
782 'section' => 'invoicing',
783 'description' => 'Generate a line item on an invoice even when a package is discounted 100%',
784 'type' => 'checkbox',
788 'key' => 'discount-show_available',
789 'section' => 'invoicing',
790 'description' => 'Show available prepayment discounts on invoices.',
791 'type' => 'checkbox',
795 'key' => 'invoice-barcode',
796 'section' => 'invoicing',
797 'description' => 'Display a barcode on HTML and PDF invoices',
798 'type' => 'checkbox',
802 'key' => 'cust_main-select-billday',
803 'section' => 'payments',
804 'description' => 'When used with a specific billing event, allows the selection of the day of month on which to charge credit card / bank account automatically, on a per-customer basis',
805 'type' => 'checkbox',
809 'key' => 'cust_main-select-prorate_day',
810 'section' => 'billing',
811 'description' => 'When used with prorate or anniversary packages, allows the selection of the prorate day of month, on a per-customer basis',
812 'type' => 'checkbox',
816 'key' => 'anniversary-rollback',
817 'section' => 'billing',
818 'description' => 'When billing an anniversary package ordered after the 28th, roll the anniversary date back to the 28th instead of forward into the following month.',
819 'type' => 'checkbox',
823 'key' => 'encryption',
824 'section' => 'credit_cards',
825 'description' => 'Enable encryption of credit cards and echeck numbers',
826 'type' => 'checkbox',
830 'key' => 'encryptionmodule',
831 'section' => 'credit_cards',
832 'description' => 'Use which module for encryption?',
834 'select_enum' => [ '', 'Crypt::OpenSSL::RSA', ],
838 'key' => 'encryptionpublickey',
839 'section' => 'credit_cards',
840 'description' => 'Encryption public key',
841 'type' => 'textarea',
845 'key' => 'encryptionprivatekey',
846 'section' => 'credit_cards',
847 'description' => 'Encryption private key',
848 'type' => 'textarea',
852 'key' => 'billco-url',
853 'section' => 'print_services',
854 'description' => 'The url to use for performing uploads to the invoice mailing service.',
860 'key' => 'billco-username',
861 'section' => 'print_services',
862 'description' => 'The login name to use for uploads to the invoice mailing service.',
869 'key' => 'billco-password',
870 'section' => 'print_services',
871 'description' => 'The password to use for uploads to the invoice mailing service.',
878 'key' => 'billco-clicode',
879 'section' => 'print_services',
880 'description' => 'The clicode to use for uploads to the invoice mailing service.',
886 'key' => 'billco-account_num',
887 'section' => 'print_services',
888 'description' => 'The data to place in the "Transaction Account No" / "TRACCTNUM" field.',
891 'invnum-date' => 'Invoice number - Date (default)',
892 'display_custnum' => 'Customer number',
898 'key' => 'next-bill-ignore-time',
899 'section' => 'billing',
900 'description' => 'Ignore the time portion of next bill dates when billing, matching anything from 00:00:00 to 23:59:59 on the billing day.',
901 'type' => 'checkbox',
905 'key' => 'business-onlinepayment',
906 'section' => 'credit_cards',
907 'description' => '<a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a> support, at least three lines: processor, login, and password. An optional fourth line specifies the action or actions (multiple actions are separated with `,\': for example: `Authorization Only, Post Authorization\'). Optional additional lines are passed to Business::OnlinePayment as %processor_options. For more detailed information and examples see the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:Administration:Real-time_Processing">real-time credit card processing documentation</a>.',
908 'type' => 'textarea',
912 'key' => 'business-onlinepayment-ach',
913 'section' => 'e-checks',
914 'description' => 'Alternate <a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a> support for ACH transactions (defaults to regular <b>business-onlinepayment</b>). At least three lines: processor, login, and password. An optional fourth line specifies the action or actions (multiple actions are separated with `,\': for example: `Authorization Only, Post Authorization\'). Optional additional lines are passed to Business::OnlinePayment as %processor_options.',
915 'type' => 'textarea',
919 'key' => 'business-onlinepayment-namespace',
920 'section' => 'credit_cards',
921 'description' => 'Specifies which perl module namespace (which group of collection routines) is used by default.',
924 'Business::OnlinePayment' => 'Direct API (Business::OnlinePayment)',
925 'Business::OnlineThirdPartyPayment' => 'Web API (Business::ThirdPartyPayment)',
930 'key' => 'business-onlinepayment-description',
931 'section' => 'credit_cards',
932 'description' => 'String passed as the description field to <a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a>. Evaluated as a double-quoted perl string, with the following variables available: <code>$agent</code> (the agent name), and <code>$pkgs</code> (a comma-separated list of packages for which these charges apply - not available in all situations)',
937 'key' => 'business-onlinepayment-email-override',
938 'section' => 'credit_cards',
939 'description' => 'Email address used instead of customer email address when submitting a BOP transaction.',
944 'key' => 'business-onlinepayment-email_customer',
945 'section' => 'credit_cards',
946 'description' => 'Controls the "email_customer" flag used by some Business::OnlinePayment processors to enable customer receipts.',
947 'type' => 'checkbox',
951 'key' => 'business-onlinepayment-test_transaction',
952 'section' => 'credit_cards',
953 'description' => 'Turns on the Business::OnlinePayment test_transaction flag. Note that not all gateway modules support this flag; if yours does not, transactions will still be sent live.',
954 'type' => 'checkbox',
958 'key' => 'business-onlinepayment-currency',
959 'section' => 'credit_cards',
960 'description' => 'Currency parameter for Business::OnlinePayment transactions.',
962 'select_enum' => [ '', qw( USD AUD CAD DKK EUR GBP ILS JPY NZD ARS ) ],
966 'key' => 'business-onlinepayment-verification',
967 'section' => 'credit_cards',
968 'description' => 'Run a $1 authorization (followed by a void) to verify new credit card information.',
969 'type' => 'checkbox',
974 'section' => 'localization',
975 'description' => 'Main accounting currency',
977 'select_enum' => [ '', qw( USD AUD CAD DKK EUR GBP ILS JPY NZD XAF ARS ) ],
981 'key' => 'currencies',
982 'section' => 'localization',
983 'description' => 'Additional accepted currencies',
984 'type' => 'select-sub',
986 'options_sub' => sub {
987 map { $_ => code2currency($_) } all_currency_codes();
989 'sort_sub' => sub ($$) { $_[0] cmp $_[1]; },
990 'option_sub' => sub { code2currency(shift); },
994 'key' => 'business-batchpayment-test_transaction',
995 'section' => 'credit_cards',
996 'description' => 'Turns on the Business::BatchPayment test_mode flag. Note that not all gateway modules support this flag; if yours does not, using the batch gateway will fail.',
997 'type' => 'checkbox',
1001 'key' => 'countrydefault',
1002 'section' => 'localization',
1003 'description' => 'Default two-letter country code (if not supplied, the default is `US\')',
1008 'key' => 'date_format',
1009 'section' => 'localization',
1010 'description' => 'Format for displaying dates',
1013 '%m/%d/%Y' => 'MM/DD/YYYY',
1014 '%d/%m/%Y' => 'DD/MM/YYYY',
1015 '%Y/%m/%d' => 'YYYY/MM/DD',
1016 '%e %b %Y' => 'DD Mon YYYY',
1022 'key' => 'date_format_long',
1023 'section' => 'localization',
1024 'description' => 'Verbose format for displaying dates',
1027 '%b %o, %Y' => 'Mon DDth, YYYY',
1028 '%e %b %Y' => 'DD Mon YYYY',
1029 '%m/%d/%Y' => 'MM/DD/YYYY',
1030 '%d/%m/%Y' => 'DD/MM/YYYY',
1031 '%Y/%m/%d' => 'YYYY/MM/DD',
1037 'key' => 'deleterefunds',
1038 'section' => 'billing',
1039 'description' => 'Enable deletion of unclosed refunds. Be very careful! Only delete refunds that were data-entry errors, not adjustments.',
1040 'type' => 'checkbox',
1045 'section' => 'shell',
1046 'description' => 'Optional numeric value to control directory hashing. If positive, hashes directories for the specified number of levels from the front of the username. If negative, hashes directories for the specified number of levels from the end of the username. Some examples: <ul><li>1: user -> <a href="#home">/home</a>/u/user<li>2: user -> <a href="#home">/home</a>/u/s/user<li>-1: user -> <a href="#home">/home</a>/r/user<li>-2: user -> <a href="#home">home</a>/r/e/user</ul>',
1051 'key' => 'disable_cust_attachment',
1052 'section' => 'notes',
1053 'description' => 'Disable customer file attachments',
1054 'type' => 'checkbox',
1058 'key' => 'max_attachment_size',
1059 'section' => 'notes',
1060 'description' => 'Maximum size for customer file attachments (leave blank for unlimited)',
1065 'key' => 'disable_customer_referrals',
1066 'section' => 'customer_fields',
1067 'description' => 'Disable new customer-to-customer referrals in the web interface',
1068 'type' => 'checkbox',
1072 'key' => 'editreferrals',
1073 'section' => 'customer_fields',
1074 'description' => 'Enable advertising source modification for existing customers',
1075 'type' => 'checkbox',
1079 'key' => 'emailinvoiceonly',
1080 'section' => 'invoice_email',
1081 'description' => 'Disables postal mail invoices',
1082 'type' => 'checkbox',
1086 'key' => 'disablepostalinvoicedefault',
1087 'section' => 'invoicing',
1088 'description' => 'Disables postal mail invoices as the default option in the UI. Be careful not to setup customers which are not sent invoices. See <a href ="#emailinvoiceauto">emailinvoiceauto</a>.',
1089 'type' => 'checkbox',
1093 'key' => 'emailinvoiceauto',
1094 'section' => 'invoice_email',
1095 'description' => 'Automatically adds new accounts to the email invoice list',
1096 'type' => 'checkbox',
1100 'key' => 'emailinvoiceautoalways',
1101 'section' => 'invoice_email',
1102 'description' => 'Automatically adds new accounts to the email invoice list even when the list contains email addresses',
1103 'type' => 'checkbox',
1107 'key' => 'emailinvoice-apostrophe',
1108 'section' => 'invoice_email',
1109 'description' => 'Allows the apostrophe (single quote) character in the email addresses in the email invoice list.',
1110 'type' => 'checkbox',
1114 'key' => 'svc_acct-ip_addr',
1115 'section' => 'services',
1116 'description' => 'Enable IP address management on login services like for broadband services.',
1117 'type' => 'checkbox',
1121 'key' => 'exclude_ip_addr',
1122 'section' => 'services',
1123 'description' => 'Exclude these from the list of available IP addresses. (One per line)',
1124 'type' => 'textarea',
1128 'key' => 'auto_router',
1129 'section' => 'wireless_broadband',
1130 'description' => 'Automatically choose the correct router/block based on supplied ip address when possible while provisioning broadband services',
1131 'type' => 'checkbox',
1135 'key' => 'hidecancelledpackages',
1136 'section' => 'cancellation',
1137 'description' => 'Prevent cancelled packages from showing up in listings (though they will still be in the database)',
1138 'type' => 'checkbox',
1142 'key' => 'hidecancelledcustomers',
1143 'section' => 'cancellation',
1144 'description' => 'Prevent customers with only cancelled packages from showing up in listings (though they will still be in the database)',
1145 'type' => 'checkbox',
1150 'section' => 'shell',
1151 'description' => 'For new users, prefixed to username to create a directory name. Should have a leading but not a trailing slash.',
1156 'key' => 'invoice_from',
1157 'section' => 'important',
1158 'description' => 'Return address on email invoices ("user@domain" only)',
1161 'validate' => $validate_email,
1165 'key' => 'invoice_from_name',
1166 'section' => 'invoice_email',
1167 'description' => 'Return name on email invoices (set address in invoice_from)',
1170 'validate' => sub { (($_[0] =~ /[^[:alnum:][:space:]]/) && ($_[0] !~ /^\".*\"$/))
1171 ? 'Invalid name. Use quotation marks around names that contain punctuation.'
1176 'key' => 'quotation_from',
1177 'section' => 'quotations',
1178 'description' => 'Return address on email quotations',
1185 'key' => 'invoice_subject',
1186 'section' => 'invoice_email',
1187 'description' => 'Subject: header on email invoices. Defaults to "Invoice". The following substitutions are available: $name, $name_short, $invoice_number, and $invoice_date.',
1194 'key' => 'quotation_subject',
1195 'section' => 'quotations',
1196 'description' => 'Subject: header on email quotations. Defaults to "Quotation".', # The following substitutions are available: $name, $name_short, $invoice_number, and $invoice_date.',
1203 'key' => 'invoice_usesummary',
1204 'section' => 'invoicing',
1205 'description' => 'Indicates that html and latex invoices should be in summary style and make use of invoice_latexsummary.',
1206 'type' => 'checkbox',
1210 'key' => 'invoice_template',
1211 'section' => 'invoice_templates',
1212 'description' => 'Text template file for invoices. Used if no invoice_html template is defined, and also seen by users using non-HTML capable mail clients. See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:Administration#Plaintext_invoice_templates">billing documentation</a> for details.',
1213 'type' => 'textarea',
1217 'key' => 'invoice_html',
1218 'section' => 'invoice_templates',
1219 'description' => 'HTML template for invoices. See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:Administration#HTML_invoice_templates">billing documentation</a> for details.',
1221 'type' => 'textarea',
1225 'key' => 'quotation_html',
1226 'section' => 'quotations',
1227 'description' => 'HTML template for quotations.',
1229 'type' => 'textarea',
1233 'key' => 'invoice_htmlnotes',
1234 'section' => 'invoice_templates',
1235 'description' => 'Notes section for HTML invoices. Defaults to the same data in invoice_latexnotes if not specified.',
1236 'type' => 'textarea',
1242 'key' => 'invoice_htmlfooter',
1243 'section' => 'invoice_templates',
1244 'description' => 'Footer for HTML invoices. Defaults to the same data in invoice_latexfooter if not specified.',
1245 'type' => 'textarea',
1251 'key' => 'invoice_htmlsummary',
1252 'section' => 'invoice_templates',
1253 'description' => 'Summary initial page for HTML invoices.',
1254 'type' => 'textarea',
1260 'key' => 'invoice_htmlreturnaddress',
1261 'section' => 'invoice_templates',
1262 'description' => 'Return address for HTML invoices. Defaults to the same data in invoice_latexreturnaddress if not specified.',
1263 'type' => 'textarea',
1268 'key' => 'invoice_htmlwatermark',
1269 'section' => 'invoice_templates',
1270 'description' => 'Watermark for HTML invoices. Appears in a semitransparent positioned DIV overlaid on the main invoice container.',
1271 'type' => 'textarea',
1277 'key' => 'invoice_latex',
1278 'section' => 'invoice_templates',
1279 'description' => 'Optional LaTeX template for typeset PostScript invoices. See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:Administration#Typeset_.28LaTeX.29_invoice_templates">billing documentation</a> for details.',
1280 'type' => 'textarea',
1284 'key' => 'quotation_latex',
1285 'section' => 'quotations',
1286 'description' => 'LaTeX template for typeset PostScript quotations.',
1287 'type' => 'textarea',
1291 'key' => 'invoice_latextopmargin',
1292 'section' => 'invoicing',
1293 'description' => 'Optional LaTeX invoice topmargin setting. Include units.',
1296 'validate' => sub { shift =~
1297 /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1298 ? '' : 'Invalid LaTex length';
1303 'key' => 'invoice_latexheadsep',
1304 'section' => 'invoicing',
1305 'description' => 'Optional LaTeX invoice headsep setting. Include units.',
1308 'validate' => sub { shift =~
1309 /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1310 ? '' : 'Invalid LaTex length';
1315 'key' => 'invoice_latexaddresssep',
1316 'section' => 'invoicing',
1317 'description' => 'Optional LaTeX invoice separation between invoice header
1318 and customer address. Include units.',
1321 'validate' => sub { shift =~
1322 /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1323 ? '' : 'Invalid LaTex length';
1328 'key' => 'invoice_latextextheight',
1329 'section' => 'invoicing',
1330 'description' => 'Optional LaTeX invoice textheight setting. Include units.',
1333 'validate' => sub { shift =~
1334 /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1335 ? '' : 'Invalid LaTex length';
1340 'key' => 'invoice_latexnotes',
1341 'section' => 'invoice_templates',
1342 'description' => 'Notes section for LaTeX typeset PostScript invoices.',
1343 'type' => 'textarea',
1349 'key' => 'quotation_latexnotes',
1350 'section' => 'quotations',
1351 'description' => 'Notes section for LaTeX typeset PostScript quotations.',
1352 'type' => 'textarea',
1358 'key' => 'invoice_latexfooter',
1359 'section' => 'invoice_templates',
1360 'description' => 'Footer for LaTeX typeset PostScript invoices.',
1361 'type' => 'textarea',
1367 'key' => 'invoice_latexsummary',
1368 'section' => 'invoice_templates',
1369 'description' => 'Summary initial page for LaTeX typeset PostScript invoices.',
1370 'type' => 'textarea',
1376 'key' => 'invoice_latexcoupon',
1377 'section' => 'invoice_templates',
1378 'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.',
1379 'type' => 'textarea',
1385 'key' => 'invoice_latexextracouponspace',
1386 'section' => 'invoicing',
1387 'description' => 'Optional LaTeX invoice textheight space to reserve for a tear off coupon. Include units. Default is 2.7 inches.',
1390 'validate' => sub { shift =~
1391 /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1392 ? '' : 'Invalid LaTex length';
1397 'key' => 'invoice_latexcouponfootsep',
1398 'section' => 'invoicing',
1399 'description' => 'Optional LaTeX invoice separation between bottom of coupon address and footer. Include units. Default is 0.2 inches.',
1402 'validate' => sub { shift =~
1403 /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1404 ? '' : 'Invalid LaTex length';
1409 'key' => 'invoice_latexcouponamountenclosedsep',
1410 'section' => 'invoicing',
1411 'description' => 'Optional LaTeX invoice separation between total due and amount enclosed line. Include units. Default is 2.25 em.',
1414 'validate' => sub { shift =~
1415 /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1416 ? '' : 'Invalid LaTex length';
1420 'key' => 'invoice_latexcoupontoaddresssep',
1421 'section' => 'invoicing',
1422 'description' => 'Optional LaTeX invoice separation between invoice data and the address (usually invoice_latexreturnaddress). Include units. Default is 1 inch.',
1425 'validate' => sub { shift =~
1426 /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1427 ? '' : 'Invalid LaTex length';
1432 'key' => 'invoice_latexreturnaddress',
1433 'section' => 'invoice_templates',
1434 'description' => 'Return address for LaTeX typeset PostScript invoices.',
1435 'type' => 'textarea',
1439 'key' => 'invoice_latexverticalreturnaddress',
1440 'section' => 'deprecated',
1441 'description' => 'Deprecated. With old invoice_latex template, places the return address under the company logo rather than beside it.',
1442 'type' => 'checkbox',
1447 'key' => 'invoice_latexcouponaddcompanytoaddress',
1448 'section' => 'invoicing',
1449 'description' => 'Add the company name to the To address on the remittance coupon because the return address does not contain it.',
1450 'type' => 'checkbox',
1455 'key' => 'invoice_latexsmallfooter',
1456 'section' => 'invoice_templates',
1457 'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',
1458 'type' => 'textarea',
1464 'key' => 'invoice_latexwatermark',
1465 'section' => 'invocie_templates',
1466 'description' => 'Watermark for LaTeX invoices. See "texdoc background" for information on what this can contain. The content itself should be enclosed in braces, optionally followed by a comma and any formatting options.',
1467 'type' => 'textarea',
1473 'key' => 'invoice_email_pdf',
1474 'section' => 'invoice_email',
1475 'description' => 'Send PDF invoice as an attachment to emailed invoices. By default, includes the HTML invoice as the email body, unless invoice_email_pdf_note is set.',
1476 'type' => 'checkbox'
1480 'key' => 'quotation_email_pdf',
1481 'section' => 'quotations',
1482 'description' => 'Send PDF quotations as an attachment to emailed quotations. By default, includes the HTML quotation as the email body, unless quotation_email_pdf_note is set.',
1483 'type' => 'checkbox'
1487 'key' => 'invoice_email_pdf_msgnum',
1488 'section' => 'invoice_email',
1489 'description' => 'Message template to send as the text and HTML part of PDF invoices. If not selected, a text and HTML version of the invoice will be sent.',
1490 %msg_template_options,
1494 'key' => 'invoice_email_pdf_note',
1495 'section' => 'invoice_email',
1496 'description' => 'If defined, this text will replace the default HTML invoice as the body of emailed PDF invoices.',
1497 'type' => 'textarea'
1501 'key' => 'quotation_email_pdf_note',
1502 'section' => 'quotations',
1503 'description' => 'If defined, this text will replace the default HTML quotation as the body of emailed PDF quotations.',
1504 'type' => 'textarea'
1508 'key' => 'invoice_print_pdf',
1509 'section' => 'printing',
1510 'description' => 'For all invoice print operations, store postal invoices for download in PDF format rather than printing them directly.',
1511 'type' => 'checkbox',
1515 'key' => 'invoice_print_pdf-spoolagent',
1516 'section' => 'printing',
1517 'description' => 'Store postal invoices PDF downloads in per-agent spools.',
1518 'type' => 'checkbox',
1522 'key' => 'invoice_print_pdf-duplex',
1523 'section' => 'printing',
1524 'description' => 'Insert blank pages so that spooled invoices are each an even number of pages. Use this for double-sided printing.',
1525 'type' => 'checkbox',
1529 'key' => 'invoice_default_terms',
1530 'section' => 'invoicing',
1531 'description' => 'Optional default invoice term, used to calculate a due date printed on invoices.',
1534 'select_enum' => \@invoice_terms,
1538 'key' => 'invoice_show_prior_due_date',
1539 'section' => 'invoice_balances',
1540 'description' => 'Show previous invoice due dates when showing prior balances. Default is to show invoice date.',
1541 'type' => 'checkbox',
1545 'key' => 'invoice_sections',
1546 'section' => 'invoicing',
1547 'description' => 'Split invoice into sections and label according to package category when enabled.',
1548 'type' => 'checkbox',
1553 'key' => 'invoice_include_aging',
1554 'section' => 'invoice_balances',
1555 'description' => 'Show an aging line after the prior balance section. Only valid when invoice_sections is enabled.',
1556 'type' => 'checkbox',
1560 'key' => 'invoice_sections_method',
1561 'section' => 'invoicing',
1562 'description' => 'How to group line items on multi-section invoices.',
1564 'select_enum' => [ qw(category location) ],
1568 'key' => 'summary_subtotals_method',
1569 'section' => 'invoicing',
1570 'description' => 'How to group line items when calculating summary subtotals. By default, it will be the same method used for grouping invoice sections.',
1572 'select_enum' => [ qw(category location) ],
1575 #quotations seem broken-ish with sections ATM?
1577 # 'key' => 'quotation_sections',
1578 # 'section' => 'invoicing',
1579 # 'description' => 'Split quotations into sections and label according to package category when enabled.',
1580 # 'type' => 'checkbox',
1585 'key' => 'usage_class_summary',
1586 'section' => 'telephony',
1587 'description' => 'On invoices, summarize total usage by usage class in a separate section',
1588 'type' => 'checkbox',
1592 'key' => 'usage_class_as_a_section',
1593 'section' => 'telephony',
1594 'description' => 'On invoices, split usage into sections and label according to usage class name when enabled. Only valid when invoice_sections is enabled.',
1595 'type' => 'checkbox',
1599 'key' => 'phone_usage_class_summary',
1600 'section' => 'telephony',
1601 'description' => 'On invoices, summarize usage per DID by usage class and display all CDRs together regardless of usage class. Only valid when svc_phone_sections is enabled.',
1602 'type' => 'checkbox',
1606 'key' => 'svc_phone_sections',
1607 'section' => 'telephony',
1608 'description' => 'On invoices, create a section for each svc_phone when enabled. Only valid when invoice_sections is enabled.',
1609 'type' => 'checkbox',
1613 'key' => 'finance_pkgclass',
1614 'section' => 'billing',
1615 'description' => 'The default package class for late fee charges, used if the fee event does not specify a package class itself.',
1616 'type' => 'select-pkg_class',
1620 'key' => 'separate_usage',
1621 'section' => 'telephony',
1622 'description' => 'On invoices, split the rated call usage into a separate line from the recurring charges.',
1623 'type' => 'checkbox',
1627 'key' => 'payment_receipt',
1628 'section' => 'notification',
1629 'description' => 'Send payment receipts.',
1630 'type' => 'checkbox',
1636 'key' => 'payment_receipt_statement_mode',
1637 'section' => 'notification',
1638 'description' => 'Automatic payments will cause a post-payment statement to be sent to the customer. Select the invoice mode to use for this statement. If unspecified, it will use the "_statement" versions of invoice configuration settings, and have the notice name "Statement".',
1639 %invoice_mode_options,
1643 'key' => 'payment_receipt_msgnum',
1644 'section' => 'notification',
1645 'description' => 'Template to use for manual payment receipts.',
1646 %msg_template_options,
1650 'key' => 'payment_receipt_from',
1651 'section' => 'notification',
1652 'description' => 'From: address for payment receipts, if not specified in the template.',
1658 'key' => 'payment_receipt-trigger',
1659 'section' => 'notification',
1660 'description' => 'When payment receipts are triggered. Defaults to when payment is made.',
1663 'cust_pay' => 'When payment is made.',
1664 'cust_bill_pay_pkg' => 'When payment is applied.',
1670 'key' => 'refund_receipt_msgnum',
1671 'section' => 'notification',
1672 'description' => 'Template to use for manual refund receipts.',
1673 %msg_template_options,
1677 'key' => 'trigger_export_insert_on_payment',
1678 'section' => 'payments',
1679 'description' => 'Enable exports on payment application.',
1680 'type' => 'checkbox',
1685 'section' => 'printing',
1686 'description' => 'Print command for paper invoices, for example `lpr -h\'',
1692 'key' => 'lpr-postscript_prefix',
1693 'section' => 'printing',
1694 'description' => 'Raw printer commands prepended to the beginning of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
1699 'key' => 'lpr-postscript_suffix',
1700 'section' => 'printing',
1701 'description' => 'Raw printer commands added to the end of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
1706 'key' => 'papersize',
1707 'section' => 'printing',
1708 'description' => 'Invoice paper size. Default is "letter" (U.S. standard). The LaTeX template must be configured to match this size.',
1710 'select_enum' => [ qw(letter a4) ],
1714 'key' => 'money_char',
1715 'section' => 'localization',
1716 'description' => 'Currency symbol - defaults to `$\'',
1721 'key' => 'defaultrecords',
1722 'section' => 'BIND',
1723 'description' => 'DNS entries to add automatically when creating a domain',
1724 'type' => 'editlist',
1725 'editlist_parts' => [ { type=>'text' },
1726 { type=>'immutable', value=>'IN' },
1730 #@{ FS::domain_record->rectypes }
1731 qw(A AAAA CNAME MX NS PTR SPF SRV TXT)
1734 { type=> 'text' }, ],
1738 'key' => 'passwordmin',
1739 'section' => 'password',
1740 'description' => 'Minimum password length (default 6)',
1745 'key' => 'passwordmax',
1746 'section' => 'password',
1747 'description' => 'Maximum password length (default 12) (don\'t set this over 12 if you need to import or export crypt() passwords)',
1752 'key' => 'sip_passwordmin',
1753 'section' => 'telephony',
1754 'description' => 'Minimum SIP password length (default 6)',
1759 'key' => 'sip_passwordmax',
1760 'section' => 'telephony',
1761 'description' => 'Maximum SIP password length (default 80)',
1767 'key' => 'password-noampersand',
1768 'section' => 'password',
1769 'description' => 'Disallow ampersands in passwords',
1770 'type' => 'checkbox',
1774 'key' => 'password-noexclamation',
1775 'section' => 'password',
1776 'description' => 'Disallow exclamations in passwords (Not setting this could break old text Livingston or Cistron Radius servers)',
1777 'type' => 'checkbox',
1781 'key' => 'default-password-encoding',
1782 'section' => 'password',
1783 'description' => 'Default storage format for passwords',
1786 'plain' => 'Plain text',
1787 'crypt-des' => 'Unix password (DES encrypted)',
1788 'crypt-md5' => 'Unix password (MD5 digest)',
1789 'ldap-plain' => 'LDAP (plain text)',
1790 'ldap-crypt' => 'LDAP (DES encrypted)',
1791 'ldap-md5' => 'LDAP (MD5 digest)',
1792 'ldap-sha1' => 'LDAP (SHA1 digest)',
1793 'legacy' => 'Legacy mode',
1798 'key' => 'referraldefault',
1799 'section' => 'customer_fields',
1800 'description' => 'Default referral, specified by refnum',
1801 'type' => 'select-sub',
1802 'options_sub' => sub { require FS::Record;
1803 require FS::part_referral;
1804 map { $_->refnum => $_->referral }
1805 FS::Record::qsearch( 'part_referral',
1806 { 'disabled' => '' }
1809 'option_sub' => sub { require FS::Record;
1810 require FS::part_referral;
1811 my $part_referral = FS::Record::qsearchs(
1812 'part_referral', { 'refnum'=>shift } );
1813 $part_referral ? $part_referral->referral : '';
1818 'key' => 'maxsearchrecordsperpage',
1819 'section' => 'reporting',
1820 'description' => 'If set, number of search records to return per page.',
1825 'key' => 'cust_main-packages-num_per_page',
1826 'section' => 'packages',
1827 'description' => 'Number of packages to display per page on customer view (default 10).',
1832 'key' => 'disable_maxselect',
1833 'section' => 'reporting',
1834 'description' => 'Prevent changing the number of records per page.',
1835 'type' => 'checkbox',
1839 'key' => 'session-start',
1840 'section' => 'deprecated',
1841 'description' => 'Used to define the command which is executed on the Freeside machine when a session begins. The contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$ip</code>, <code>$nasip</code> and <code>$nasfqdn</code>, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on.',
1846 'key' => 'session-stop',
1847 'section' => 'deprecated',
1848 'description' => 'Used to define the command which is executed on the Freeside machine when a session ends. The contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$ip</code>, <code>$nasip</code> and <code>$nasfqdn</code>, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on.',
1854 'section' => 'shell',
1855 'description' => 'Legal shells (think /etc/shells). You probably want to `cut -d: -f7 /etc/passwd | sort | uniq\' initially so that importing doesn\'t fail with `Illegal shell\' errors, then remove any special entries afterwords. A blank line specifies that an empty shell is permitted.',
1856 'type' => 'textarea',
1860 'key' => 'showpasswords',
1861 'section' => 'password',
1862 'description' => 'Display unencrypted user passwords in the backend (employee) web interface',
1863 'type' => 'checkbox',
1867 'key' => 'report-showpasswords',
1868 'section' => 'password',
1869 'description' => 'This is a terrible idea. Do not enable it. STRONGLY NOT RECOMMENDED. Enables display of passwords on services reports.',
1870 'type' => 'checkbox',
1874 'key' => 'signupurl',
1875 'section' => 'signup',
1876 'description' => 'if you are using customer-to-customer referrals, and you enter the URL of your <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:Self-Service_Installation">signup server CGI</a>, the customer view screen will display a customized link to self-signup with the appropriate customer as referral',
1881 'key' => 'smtpmachine',
1882 'section' => 'important',
1883 'description' => 'SMTP relay for Freeside\'s outgoing mail',
1888 'key' => 'smtp-username',
1889 'section' => 'notification',
1890 'description' => 'Optional SMTP username for Freeside\'s outgoing mail',
1895 'key' => 'smtp-password',
1896 'section' => 'notification',
1897 'description' => 'Optional SMTP password for Freeside\'s outgoing mail',
1902 'key' => 'smtp-encryption',
1903 'section' => 'notification',
1904 'description' => 'Optional SMTP encryption method. The STARTTLS methods require smtp-username and smtp-password to be set.',
1906 'select_hash' => [ '25' => 'None (port 25)',
1907 '25-starttls' => 'STARTTLS (port 25)',
1908 '587-starttls' => 'STARTTLS / submission (port 587)',
1909 '465-tls' => 'SMTPS (SSL) (port 465)',
1914 'key' => 'soadefaultttl',
1915 'section' => 'BIND',
1916 'description' => 'SOA default TTL for new domains.',
1921 'key' => 'soaemail',
1922 'section' => 'BIND',
1923 'description' => 'SOA email for new domains, in BIND form (`.\' instead of `@\'), with trailing `.\'',
1928 'key' => 'soaexpire',
1929 'section' => 'BIND',
1930 'description' => 'SOA expire for new domains',
1935 'key' => 'soamachine',
1936 'section' => 'BIND',
1937 'description' => 'SOA machine for new domains, with trailing `.\'',
1942 'key' => 'soarefresh',
1943 'section' => 'BIND',
1944 'description' => 'SOA refresh for new domains',
1949 'key' => 'soaretry',
1950 'section' => 'BIND',
1951 'description' => 'SOA retry for new domains',
1956 'key' => 'statedefault',
1957 'section' => 'localization',
1958 'description' => 'Default state or province (if not supplied, the default is `CA\')',
1963 'key' => 'unsuspend_balance',
1964 'section' => 'suspension',
1965 'description' => 'Enables the automatic unsuspension of suspended packages when a customer\'s balance due is at or below the specified amount after a payment or credit',
1968 '', 'Zero', 'Latest invoice charges', 'Charges not past due'
1973 'key' => 'unsuspend-always_adjust_next_bill_date',
1974 'section' => 'suspension',
1975 'description' => 'Global override that causes unsuspensions to always adjust the next bill date under any circumstances. This is now controlled on a per-package bases - probably best not to use this option unless you are a legacy installation that requires this behaviour.',
1976 'type' => 'checkbox',
1980 'key' => 'usernamemin',
1981 'section' => 'username',
1982 'description' => 'Minimum username length (default 2)',
1987 'key' => 'usernamemax',
1988 'section' => 'username',
1989 'description' => 'Maximum username length',
1994 'key' => 'username-ampersand',
1995 'section' => 'username',
1996 'description' => 'Allow the ampersand character (&) in usernames. Be careful when using this option in conjunction with <a href="../browse/part_export.cgi">exports</a> which execute shell commands, as the ampersand will be interpreted by the shell if not quoted.',
1997 'type' => 'checkbox',
2001 'key' => 'username-letter',
2002 'section' => 'username',
2003 'description' => 'Usernames must contain at least one letter',
2004 'type' => 'checkbox',
2009 'key' => 'username-letterfirst',
2010 'section' => 'username',
2011 'description' => 'Usernames must start with a letter',
2012 'type' => 'checkbox',
2016 'key' => 'username-noperiod',
2017 'section' => 'username',
2018 'description' => 'Disallow periods in usernames',
2019 'type' => 'checkbox',
2023 'key' => 'username-nounderscore',
2024 'section' => 'username',
2025 'description' => 'Disallow underscores in usernames',
2026 'type' => 'checkbox',
2030 'key' => 'username-nodash',
2031 'section' => 'username',
2032 'description' => 'Disallow dashes in usernames',
2033 'type' => 'checkbox',
2037 'key' => 'username-uppercase',
2038 'section' => 'username',
2039 'description' => 'Allow uppercase characters in usernames. Not recommended for use with FreeRADIUS with MySQL backend, which is case-insensitive by default.',
2040 'type' => 'checkbox',
2045 'key' => 'username-percent',
2046 'section' => 'username',
2047 'description' => 'Allow the percent character (%) in usernames.',
2048 'type' => 'checkbox',
2052 'key' => 'username-colon',
2053 'section' => 'username',
2054 'description' => 'Allow the colon character (:) in usernames.',
2055 'type' => 'checkbox',
2059 'key' => 'username-slash',
2060 'section' => 'username',
2061 'description' => 'Allow the slash character (/) in usernames. When using, make sure to set "Home directory" to fixed and blank in all svc_acct service definitions.',
2062 'type' => 'checkbox',
2066 'key' => 'username-equals',
2067 'section' => 'username',
2068 'description' => 'Allow the equal sign character (=) in usernames.',
2069 'type' => 'checkbox',
2073 'key' => 'google_maps_api_key',
2074 'section' => 'addresses',
2075 'description' => 'API key for google maps. This must be set for map and directions links to work. See <a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_top">Getting a Google Maps API Key</a>',
2080 'key' => 'company_physical_address',
2081 'section' => 'addresses',
2082 'description' => 'Your physical company address, for use in supplying google map directions, defaults to company_address',
2083 'type' => 'textarea',
2088 'key' => 'show_ship_company',
2089 'section' => 'addresses',
2090 'description' => 'Turns on display/collection of a "service company name" field for customers.',
2091 'type' => 'checkbox',
2096 'section' => 'e-checks',
2097 'description' => 'Turns on display/collection of social security numbers in the web interface. Sometimes required by electronic check (ACH) processors.',
2098 'type' => 'checkbox',
2102 'key' => 'unmask_ss',
2103 'section' => 'e-checks',
2104 'description' => "Don't mask social security numbers in the web interface.",
2105 'type' => 'checkbox',
2109 'key' => 'show_stateid',
2110 'section' => 'e-checks',
2111 'description' => "Turns on display/collection of driver's license/state issued id numbers in the web interface. Sometimes required by electronic check (ACH) processors.",
2112 'type' => 'checkbox',
2116 'key' => 'national_id-country',
2117 'section' => 'localization',
2118 'description' => 'Track a national identification number, for specific countries.',
2120 'select_enum' => [ '', 'MY' ],
2124 'key' => 'show_bankstate',
2125 'section' => 'e-checks',
2126 'description' => "Turns on display/collection of state for bank accounts in the web interface. Sometimes required by electronic check (ACH) processors.",
2127 'type' => 'checkbox',
2131 'key' => 'agent_defaultpkg',
2132 'section' => 'packages',
2133 'description' => 'Setting this option will cause new packages to be available to all agent types by default.',
2134 'type' => 'checkbox',
2138 'key' => 'legacy_link',
2140 'description' => 'Display options in the web interface to link legacy pre-Freeside services.',
2141 'type' => 'checkbox',
2145 'key' => 'legacy_link-steal',
2147 'description' => 'Allow "stealing" an already-audited service from one customer (or package) to another using the link function.',
2148 'type' => 'checkbox',
2152 'key' => 'queue_dangerous_controls',
2153 'section' => 'development',
2154 'description' => 'Enable queue modification controls on account pages and for new jobs. Unless you are a developer working on new export code, you should probably leave this off to avoid causing provisioning problems.',
2155 'type' => 'checkbox',
2159 'key' => 'security_phrase',
2160 'section' => 'password',
2161 'description' => 'Enable the tracking of a "security phrase" with each account. Not recommended, as it is vulnerable to social engineering.',
2162 'type' => 'checkbox',
2167 'section' => 'localization',
2168 'description' => 'Default locale',
2169 'type' => 'select-sub',
2170 'options_sub' => sub {
2171 map { $_ => FS::Locales->description($_) } FS::Locales->locales;
2173 'option_sub' => sub {
2174 FS::Locales->description(shift)
2179 'key' => 'signup_server-payby',
2180 'section' => 'signup',
2181 'description' => 'Acceptable payment types for self-signup',
2182 'type' => 'selectmultiple',
2183 'select_enum' => [ qw(CARD DCRD CHEK DCHK PREPAY PPAL ) ], # BILL COMP) ],
2187 'key' => 'selfservice-payment_gateway',
2188 'section' => 'self-service',
2189 'description' => 'Force the use of this payment gateway for self-service.',
2190 %payment_gateway_options,
2194 'key' => 'selfservice-save_unchecked',
2195 'section' => 'self-service',
2196 'description' => 'In self-service, uncheck "Remember information" checkboxes by default (normally, they are checked by default).',
2197 'type' => 'checkbox',
2201 'key' => 'default_agentnum',
2202 'section' => 'customer_fields',
2203 'description' => 'Default agent for the backoffice',
2204 'type' => 'select-agent',
2208 'key' => 'signup_server-default_agentnum',
2209 'section' => 'signup',
2210 'description' => 'Default agent for self-signup',
2211 'type' => 'select-agent',
2215 'key' => 'signup_server-default_refnum',
2216 'section' => 'signup',
2217 'description' => 'Default advertising source for self-signup',
2218 'type' => 'select-sub',
2219 'options_sub' => sub { require FS::Record;
2220 require FS::part_referral;
2221 map { $_->refnum => $_->referral }
2222 FS::Record::qsearch( 'part_referral',
2223 { 'disabled' => '' }
2226 'option_sub' => sub { require FS::Record;
2227 require FS::part_referral;
2228 my $part_referral = FS::Record::qsearchs(
2229 'part_referral', { 'refnum'=>shift } );
2230 $part_referral ? $part_referral->referral : '';
2235 'key' => 'signup_server-default_pkgpart',
2236 'section' => 'signup',
2237 'description' => 'Default package for self-signup',
2238 'type' => 'select-part_pkg',
2242 'key' => 'signup_server-default_svcpart',
2243 'section' => 'signup',
2244 'description' => 'Default service definition for self-signup - only necessary for services that trigger special provisioning widgets (such as DID provisioning or domain selection).',
2245 'type' => 'select-part_svc',
2249 'key' => 'signup_server-default_domsvc',
2250 'section' => 'signup',
2251 'description' => 'If specified, the default domain svcpart for self-signup (useful when domain is set to selectable choice).',
2256 'key' => 'signup_server-mac_addr_svcparts',
2257 'section' => 'signup',
2258 'description' => 'Service definitions which can receive mac addresses (current mapped to username for svc_acct).',
2259 'type' => 'select-part_svc',
2264 'key' => 'signup_server-nomadix',
2265 'section' => 'deprecated',
2266 'description' => 'Signup page Nomadix integration',
2267 'type' => 'checkbox',
2271 'key' => 'signup_server-service',
2272 'section' => 'signup',
2273 'description' => 'Service for the self-signup - "Account (svc_acct)" is the default setting, or "Phone number (svc_phone)" for ITSP signup',
2276 'svc_acct' => 'Account (svc_acct)',
2277 'svc_phone' => 'Phone number (svc_phone)',
2278 'svc_pbx' => 'PBX (svc_pbx)',
2279 'none' => 'None - package only',
2284 'key' => 'signup_server-prepaid-template-custnum',
2285 'section' => 'signup',
2286 'description' => 'When self-signup is used with prepaid cards and customer info is not required for signup, the contact/address info will be copied from this customer, if specified',
2291 'key' => 'signup_server-terms_of_service',
2292 'section' => 'signup',
2293 'description' => 'Terms of Service for self-signup. May contain HTML.',
2294 'type' => 'textarea',
2299 'key' => 'selfservice_server-base_url',
2300 'section' => 'self-service',
2301 'description' => 'Base URL for the self-service web interface - necessary for some widgets to find their way, including retrieval of non-US state information and phone number provisioning.',
2306 'key' => 'show-msgcat-codes',
2307 'section' => 'development',
2308 'description' => 'Show msgcat codes in error messages. Turn this option on before reporting errors to the mailing list.',
2309 'type' => 'checkbox',
2313 'key' => 'signup_server-realtime',
2314 'section' => 'signup',
2315 'description' => 'Run billing for self-signups immediately, and do not provision accounts which subsequently have a balance.',
2316 'type' => 'checkbox',
2320 'key' => 'signup_server-classnum2',
2321 'section' => 'signup',
2322 'description' => 'Package Class for first optional purchase',
2323 'type' => 'select-pkg_class',
2327 'key' => 'signup_server-classnum3',
2328 'section' => 'signup',
2329 'description' => 'Package Class for second optional purchase',
2330 'type' => 'select-pkg_class',
2334 'key' => 'signup_server-third_party_as_card',
2335 'section' => 'signup',
2336 'description' => 'Allow customer payment type to be set to CARD even when using third-party credit card billing.',
2337 'type' => 'checkbox',
2341 'key' => 'selfservice-xmlrpc',
2343 'description' => 'Run a standalone self-service XML-RPC server on the backend (on port 8080).',
2344 'type' => 'checkbox',
2348 'key' => 'selfservice-timeout',
2349 'section' => 'self-service',
2350 'description' => 'Timeout for the self-service login cookie, in seconds. Defaults to 1 hour.',
2355 'key' => 'backend-realtime',
2356 'section' => 'billing',
2357 'description' => 'Run billing for backend signups immediately.',
2358 'type' => 'checkbox',
2362 'key' => 'decline_msgnum',
2363 'section' => 'notification',
2364 'description' => 'Template to use for credit card and electronic check decline messages.',
2365 %msg_template_options,
2369 'key' => 'emaildecline',
2370 'section' => 'notification',
2371 'description' => 'Enable emailing of credit card and electronic check decline notices.',
2372 'type' => 'checkbox',
2377 'key' => 'emaildecline-exclude',
2378 'section' => 'notification',
2379 'description' => 'List of error messages that should not trigger email decline notices, one per line.',
2380 'type' => 'textarea',
2385 'key' => 'cancel_msgnum',
2386 'section' => 'cancellation',
2387 'description' => 'Template to use for cancellation emails.',
2388 %msg_template_options,
2392 'key' => 'emailcancel',
2393 'section' => 'cancellation',
2394 'description' => 'Enable emailing of cancellation notices. Make sure to select the template in the cancel_msgnum option.',
2395 'type' => 'checkbox',
2400 'key' => 'bill_usage_on_cancel',
2401 'section' => 'cancellation',
2402 'description' => 'Enable automatic generation of an invoice for usage when a package is cancelled. Not all packages can do this. Usage data must already be available.',
2403 'type' => 'checkbox',
2407 'key' => 'require_cardname',
2408 'section' => 'credit_cards',
2409 'description' => 'Require an "Exact name on card" to be entered explicitly; don\'t default to using the first and last name.',
2410 'type' => 'checkbox',
2414 'key' => 'enable_taxclasses',
2415 'section' => 'taxation',
2416 'description' => 'Enable per-package tax classes',
2417 'type' => 'checkbox',
2421 'key' => 'require_taxclasses',
2422 'section' => 'taxation',
2423 'description' => 'Require a taxclass to be entered for every package',
2424 'type' => 'checkbox',
2428 'key' => 'tax_data_vendor',
2429 'section' => 'taxation',
2430 'description' => 'Tax data vendor you are using.',
2432 'select_enum' => [ '', 'cch', 'billsoft', 'avalara', 'suretax' ],
2436 'key' => 'taxdatadirectdownload',
2437 'section' => 'taxation',
2438 'description' => 'Enable downloading tax data directly from CCH. at least three lines: URL, username, and password.j',
2439 'type' => 'textarea',
2443 'key' => 'ignore_incalculable_taxes',
2444 'section' => 'taxation',
2445 'description' => 'Prefer to invoice without tax over not billing at all',
2446 'type' => 'checkbox',
2450 'key' => 'billsoft-company_code',
2451 'section' => 'taxation',
2452 'description' => 'Billsoft tax service company code (3 letters)',
2457 'key' => 'avalara-taxconfig',
2458 'section' => 'taxation',
2459 'description' => 'Avalara tax service configuration. Four lines: company code, account number, license key, test mode (1 to enable).',
2460 'type' => 'textarea',
2464 'key' => 'suretax-hostname',
2465 'section' => 'taxation',
2466 'description' => 'SureTax server name; defaults to the test server.',
2471 'key' => 'suretax-client_number',
2472 'section' => 'taxation',
2473 'description' => 'SureTax tax service client ID.',
2477 'key' => 'suretax-validation_key',
2478 'section' => 'taxation',
2479 'description' => 'SureTax validation key (UUID).',
2483 'key' => 'suretax-business_unit',
2484 'section' => 'taxation',
2485 'description' => 'SureTax client business unit name; optional.',
2490 'key' => 'suretax-regulatory_code',
2491 'section' => 'taxation',
2492 'description' => 'SureTax client regulatory status.',
2494 'select_enum' => [ '', 'ILEC', 'IXC', 'CLEC', 'VOIP', 'ISP', 'Wireless' ],
2500 'key' => 'welcome_msgnum',
2501 'section' => 'deprecated',
2502 'description' => 'Deprecated; use a billing event instead. Used to be the template to use for welcome messages when a svc_acct record is created.',
2503 %msg_template_options,
2507 'key' => 'svc_acct_welcome_exclude',
2508 'section' => 'deprecated',
2509 'description' => 'Deprecated; use a billing event instead. A list of svc_acct services for which no welcome email is to be sent.',
2510 'type' => 'select-part_svc',
2515 'key' => 'welcome_letter',
2516 'section' => 'notification',
2517 'description' => 'Optional LaTex template file for a printed welcome letter. A welcome letter is printed the first time a cust_pkg record is created. See the <a href="http://search.cpan.org/dist/Text-Template/lib/Text/Template.pm">Text::Template</a> documentation and the billing documentation for details on the template substitution language. A variable exists for each fieldname in the customer record (<code>$first, $last, etc</code>). The following additional variables are available<ul><li><code>$payby</code> - a friendler represenation of the field<li><code>$payinfo</code> - the masked payment information<li><code>$expdate</code> - the time at which the payment method expires (a UNIX timestamp)<li><code>$returnaddress</code> - the invoice return address for this customer\'s agent</ul>',
2518 'type' => 'textarea',
2522 'key' => 'threshold_warning_msgnum',
2523 'section' => 'notification',
2524 'description' => 'Template to use for warning messages sent to the customer email invoice destination(s) when a svc_acct record has its usage drop below a threshold. Extra substitutions available: $column, $amount, $threshold',
2525 %msg_template_options,
2530 'section' => 'payments',
2531 'description' => 'Available payment types.',
2532 'type' => 'selectmultiple',
2533 'select_enum' => [ qw(CARD DCRD CHEK DCHK) ], #BILL CASH WEST MCRD MCHK PPAL) ],
2537 'key' => 'banned_pay-pad',
2538 'section' => 'credit_cards',
2539 'description' => 'Padding for encrypted storage of banned credit card hashes. If you already have new-style SHA512 entries in the banned_pay table, do not change as this will invalidate the old entries.',
2544 'key' => 'payby-default',
2545 'section' => 'deprecated',
2546 'description' => 'Deprecated; in 4.x there is no longer the concept of a single "payment type". Used to indicate the default payment type. HIDE disables display of billing information and sets customers to BILL.',
2548 'select_enum' => [ '', qw(CARD DCRD CHEK DCHK BILL CASH WEST MCRD PPAL COMP HIDE) ],
2552 'key' => 'require_cash_deposit_info',
2553 'section' => 'payments',
2554 'description' => 'When recording cash payments, display bank deposit information fields.',
2555 'type' => 'checkbox',
2559 'key' => 'svc_acct-notes',
2560 'section' => 'deprecated',
2561 'description' => 'Extra HTML to be displayed on the Account View screen.',
2562 'type' => 'textarea',
2566 'key' => 'radius-password',
2567 'section' => 'RADIUS',
2568 'description' => 'RADIUS attribute for plain-text passwords.',
2570 'select_enum' => [ 'Password', 'User-Password', 'Cleartext-Password' ],
2574 'key' => 'radius-ip',
2575 'section' => 'RADIUS',
2576 'description' => 'RADIUS attribute for IP addresses.',
2578 'select_enum' => [ 'Framed-IP-Address', 'Framed-Address' ],
2581 #http://dev.coova.org/svn/coova-chilli/doc/dictionary.chillispot
2583 'key' => 'radius-chillispot-max',
2584 'section' => 'RADIUS',
2585 'description' => 'Enable ChilliSpot (and CoovaChilli) Max attributes, specifically ChilliSpot-Max-{Input,Output,Total}-{Octets,Gigawords}.',
2586 'type' => 'checkbox',
2590 'key' => 'radius-canopy',
2591 'section' => 'RADIUS',
2592 'description' => 'Enable RADIUS attributes for Cambium (formerly Motorola) Canopy (Motorola-Canopy-Gateway).',
2593 'type' => 'checkbox',
2597 'key' => 'svc_broadband-radius',
2598 'section' => 'RADIUS',
2599 'description' => 'Enable RADIUS groups for broadband services.',
2600 'type' => 'checkbox',
2604 'key' => 'svc_acct-alldomains',
2605 'section' => 'services',
2606 'description' => 'Allow accounts to select any domain in the database. Normally accounts can only select from the domain set in the service definition and those purchased by the customer.',
2607 'type' => 'checkbox',
2611 'key' => 'dump-localdest',
2612 'section' => 'backup',
2613 'description' => 'Destination for local database dumps (full path)',
2618 'key' => 'dump-scpdest',
2619 'section' => 'backup',
2620 'description' => 'Destination for scp database dumps: user@host:/path',
2625 'key' => 'dump-pgpid',
2626 'section' => 'backup',
2627 'description' => "Optional PGP public key user or key id for database dumps. The public key should exist on the freeside user's public keyring, and the gpg binary and GnuPG perl module should be installed.",
2632 'key' => 'credit_card-recurring_billing_flag',
2633 'section' => 'credit_cards',
2634 'description' => 'This controls when the system passes the "recurring_billing" flag on credit card transactions. If supported by your processor (and the Business::OnlinePayment processor module), passing the flag indicates this is a recurring transaction and may turn off the CVV requirement. ',
2637 'actual_oncard' => 'Default/classic behavior: set the flag if a customer has actual previous charges on the card.',
2638 'transaction_is_recur' => 'Set the flag if the transaction itself is recurring, regardless of previous charges on the card.',
2643 'key' => 'credit_card-recurring_billing_acct_code',
2644 'section' => 'credit_cards',
2645 'description' => 'When the "recurring billing" flag is set, also set the "acct_code" to "rebill". Useful for reporting purposes with supported gateways (PlugNPay, others?)',
2646 'type' => 'checkbox',
2650 'key' => 'cvv-save',
2651 'section' => 'credit_cards',
2652 'description' => 'NOT RECOMMENDED. Saves CVV2 information after the initial transaction for the selected credit card types. Enabling this option is almost certainly in violation of your merchant agreement(s), so please check them carefully before enabling this option for any credit card types.',
2653 'type' => 'selectmultiple',
2654 'select_enum' => \@card_types,
2658 'key' => 'signup-require_cvv',
2659 'section' => 'credit_cards',
2660 'description' => 'Require CVV for credit card signup.',
2661 'type' => 'checkbox',
2665 'key' => 'backoffice-require_cvv',
2666 'section' => 'credit_cards',
2667 'description' => 'Require CVV for manual credit card entry.',
2668 'type' => 'checkbox',
2672 'key' => 'selfservice-onfile_require_cvv',
2673 'section' => 'credit_cards',
2674 'description' => 'Require CVV for on-file credit card during self-service payments.',
2675 'type' => 'checkbox',
2679 'key' => 'selfservice-require_cvv',
2680 'section' => 'credit_cards',
2681 'description' => 'Require CVV for credit card self-service payments, except for cards on-file.',
2682 'type' => 'checkbox',
2686 'key' => 'manual_process-single_invoice_amount',
2687 'section' => 'payments',
2688 'description' => 'When entering manual credit card and ACH payments, amount will not autofill if the customer has more than one open invoice',
2689 'type' => 'checkbox',
2693 'key' => 'manual_process-pkgpart',
2694 'section' => 'payments',
2695 'description' => 'Package to add to each manual credit card and ACH payment entered by employees from the backend. WARNING: Although recently permitted to US merchants in general, specific consumer protection laws may prohibit or restrict this practice in California, Colorado, Connecticut, Florda, Kansas, Maine, Massachusetts, New York, Oklahome, and Texas. Surcharging is also generally prohibited in most countries outside the US, AU and UK.',
2696 'type' => 'select-part_pkg',
2701 'key' => 'manual_process-display',
2702 'section' => 'payments',
2703 'description' => 'When using manual_process-pkgpart, add the fee to the amount entered (default), or subtract the fee from the amount entered.',
2706 'add' => 'Add fee to amount entered',
2707 'subtract' => 'Subtract fee from amount entered',
2712 'key' => 'manual_process-skip_first',
2713 'section' => 'payments',
2714 'description' => "When using manual_process-pkgpart, omit the fee if it is the customer's first payment.",
2715 'type' => 'checkbox',
2719 'key' => 'selfservice_immutable-package',
2720 'section' => 'self-service',
2721 'description' => 'Disable package changes in self-service interface.',
2722 'type' => 'checkbox',
2727 'key' => 'selfservice_hide-usage',
2728 'section' => 'self-service',
2729 'description' => 'Hide usage data in self-service interface.',
2730 'type' => 'checkbox',
2735 'key' => 'selfservice_process-pkgpart',
2736 'section' => 'payments',
2737 'description' => 'Package to add to each manual credit card and ACH payment entered by the customer themselves in the self-service interface. Enabling this option may be in violation of your merchant agreement(s), so please check it(/them) carefully before enabling this option.',
2738 'type' => 'select-part_pkg',
2743 'key' => 'selfservice_process-display',
2744 'section' => 'payments',
2745 'description' => 'When using selfservice_process-pkgpart, add the fee to the amount entered (default), or subtract the fee from the amount entered.',
2748 'add' => 'Add fee to amount entered',
2749 'subtract' => 'Subtract fee from amount entered',
2754 'key' => 'selfservice_process-skip_first',
2755 'section' => 'payments',
2756 'description' => "When using selfservice_process-pkgpart, omit the fee if it is the customer's first payment.",
2757 'type' => 'checkbox',
2761 # 'key' => 'auto_process-pkgpart',
2762 # 'section' => 'billing',
2763 # 'description' => 'Package to add to each automatic credit card and ACH payment processed by billing events. Enabling this option may be in violation of your merchant agreement(s), so please check them carefully before enabling this option.',
2764 # 'type' => 'select-part_pkg',
2768 ## 'key' => 'auto_process-display',
2769 ## 'section' => 'billing',
2770 ## 'description' => 'When using auto_process-pkgpart, add the fee to the amount entered (default), or subtract the fee from the amount entered.',
2771 ## 'type' => 'select',
2772 ## 'select_hash' => [
2773 ## 'add' => 'Add fee to amount entered',
2774 ## 'subtract' => 'Subtract fee from amount entered',
2779 # 'key' => 'auto_process-skip_first',
2780 # 'section' => 'billing',
2781 # 'description' => "When using auto_process-pkgpart, omit the fee if it is the customer's first payment.",
2782 # 'type' => 'checkbox',
2786 'key' => 'allow_negative_charges',
2787 'section' => 'deprecated',
2788 'description' => 'Allow negative charges. Normally not used unless importing data from a legacy system that requires this.',
2789 'type' => 'checkbox',
2792 'key' => 'auto_unset_catchall',
2793 'section' => 'cancellation',
2794 'description' => 'When canceling a svc_acct that is the email catchall for one or more svc_domains, automatically set their catchall fields to null. If this option is not set, the attempt will simply fail.',
2795 'type' => 'checkbox',
2799 'key' => 'system_usernames',
2800 'section' => 'username',
2801 'description' => 'A list of system usernames that cannot be edited or removed, one per line. Use a bare username to prohibit modification/deletion of the username in any domain, or username@domain to prohibit modification/deletetion of a specific username and domain.',
2802 'type' => 'textarea',
2806 'key' => 'cust_pkg-change_svcpart',
2807 'section' => 'packages',
2808 'description' => "When changing packages, move services even if svcparts don't match between old and new pacakge definitions.",
2809 'type' => 'checkbox',
2813 'key' => 'cust_pkg-change_pkgpart-bill_now',
2814 'section' => 'RADIUS',
2815 'description' => "When changing packages, bill the new package immediately. Useful for prepaid situations with RADIUS where an Expiration attribute based on the package must be present at all times.",
2816 'type' => 'checkbox',
2820 'key' => 'disable_autoreverse',
2821 'section' => 'BIND',
2822 'description' => 'Disable automatic synchronization of reverse-ARPA entries.',
2823 'type' => 'checkbox',
2827 'key' => 'svc_www-enable_subdomains',
2828 'section' => 'services',
2829 'description' => 'Enable selection of specific subdomains for virtual host creation.',
2830 'type' => 'checkbox',
2834 'key' => 'svc_www-usersvc_svcpart',
2835 'section' => 'services',
2836 'description' => 'Allowable service definition svcparts for virtual hosts, one per line.',
2837 'type' => 'select-part_svc',
2842 'key' => 'selfservice_server-primary_only',
2843 'section' => 'self-service',
2844 'description' => 'Only allow primary accounts to access self-service functionality.',
2845 'type' => 'checkbox',
2849 'key' => 'selfservice_server-phone_login',
2850 'section' => 'self-service',
2851 'description' => 'Allow login to self-service with phone number and PIN.',
2852 'type' => 'checkbox',
2856 'key' => 'selfservice_server-single_domain',
2857 'section' => 'self-service',
2858 'description' => 'If specified, only use this one domain for self-service access.',
2863 'key' => 'selfservice_server-login_svcpart',
2864 'section' => 'self-service',
2865 'description' => 'If specified, only allow the specified svcparts to login to self-service.',
2866 'type' => 'select-part_svc',
2871 'key' => 'selfservice-svc_forward_svcpart',
2872 'section' => 'self-service',
2873 'description' => 'Service for self-service forward editing.',
2874 'type' => 'select-part_svc',
2878 'key' => 'selfservice-password_reset_verification',
2879 'section' => 'self-service',
2880 'description' => 'If enabled, specifies the type of verification required for self-service password resets.',
2882 'select_hash' => [ '' => 'Password reset disabled',
2883 'email' => 'Click on a link in email',
2884 'paymask,amount,zip' => 'Click on a link in email, and also verify with credit card (or bank account) last 4 digits, payment amount and zip code. Note: Do not use if you have multi-customer contacts, as they will be unable to reset their passwords.',
2889 'key' => 'selfservice-password_reset_msgnum',
2890 'section' => 'self-service',
2891 'description' => 'Template to use for password reset emails.',
2892 %msg_template_options,
2896 'key' => 'selfservice-password_change_oldpass',
2897 'section' => 'self-service',
2898 'description' => 'Require old password to be entered again for password changes (in addition to being logged in), at the API level.',
2899 'type' => 'checkbox',
2903 'key' => 'selfservice-hide_invoices-taxclass',
2904 'section' => 'self-service',
2905 'description' => 'Hide invoices with only this package tax class from self-service and supress sending (emailing, printing, faxing) them. Typically set to something like "Previous balance" and used when importing legacy invoices into legacy_cust_bill.',
2910 'key' => 'selfservice-recent-did-age',
2911 'section' => 'self-service',
2912 'description' => 'If specified, defines "recent", in number of seconds, for "Download recently allocated DIDs" in self-service.',
2917 'key' => 'selfservice_server-view-wholesale',
2918 'section' => 'self-service',
2919 'description' => 'If enabled, use a wholesale package view in the self-service.',
2920 'type' => 'checkbox',
2924 'key' => 'selfservice-agent_signup',
2925 'section' => 'self-service',
2926 'description' => 'Allow agent signup via self-service.',
2927 'type' => 'checkbox',
2931 'key' => 'selfservice-agent_signup-agent_type',
2932 'section' => 'self-service',
2933 'description' => 'Agent type when allowing agent signup via self-service.',
2934 'type' => 'select-sub',
2935 'options_sub' => sub { require FS::Record;
2936 require FS::agent_type;
2937 map { $_->typenum => $_->atype }
2938 FS::Record::qsearch('agent_type', {} ); # disabled=>'' } );
2940 'option_sub' => sub { require FS::Record;
2941 require FS::agent_type;
2942 my $agent_type = FS::Record::qsearchs(
2943 'agent_type', { 'typenum'=>shift }
2945 $agent_type ? $agent_type->atype : '';
2950 'key' => 'selfservice-agent_login',
2951 'section' => 'self-service',
2952 'description' => 'Allow agent login via self-service.',
2953 'type' => 'checkbox',
2957 'key' => 'selfservice-self_suspend_reason',
2958 'section' => 'self-service',
2959 'description' => 'Suspend reason when customers suspend their own packages. Set to nothing to disallow self-suspension.',
2960 'type' => 'select-sub',
2961 #false laziness w/api_credit_reason
2962 'options_sub' => sub { require FS::Record;
2964 my $type = qsearchs('reason_type',
2967 map { $_->reasonnum => $_->reason }
2968 FS::Record::qsearch('reason',
2969 { reason_type => $type->typenum }
2972 'option_sub' => sub { require FS::Record;
2974 my $reason = FS::Record::qsearchs(
2975 'reason', { 'reasonnum' => shift }
2977 $reason ? $reason->reason : '';
2984 'key' => 'card_refund-days',
2985 'section' => 'credit_cards',
2986 'description' => 'After a payment, the number of days a refund link will be available for that payment. Defaults to 120.',
2991 'key' => 'agent-showpasswords',
2992 'section' => 'deprecated',
2993 'description' => 'Display unencrypted user passwords in the agent (reseller) interface',
2994 'type' => 'checkbox',
2998 'key' => 'global_unique-username',
2999 'section' => 'username',
3000 'description' => 'Global username uniqueness control: none (usual setting - check uniqueness per exports), username (all usernames are globally unique, regardless of domain or exports), or username@domain (all username@domain pairs are globally unique, regardless of exports). disabled turns off duplicate checking completely and is STRONGLY NOT RECOMMENDED unless you REALLY need to turn this off.',
3002 'select_enum' => [ 'none', 'username', 'username@domain', 'disabled' ],
3006 'key' => 'global_unique-phonenum',
3007 'section' => 'telephony',
3008 'description' => 'Global phone number uniqueness control: none (usual setting - check countrycode+phonenumun uniqueness per exports), or countrycode+phonenum (all countrycode+phonenum pairs are globally unique, regardless of exports). disabled turns off duplicate checking completely and is STRONGLY NOT RECOMMENDED unless you REALLY need to turn this off.',
3010 'select_enum' => [ 'none', 'countrycode+phonenum', 'disabled' ],
3014 'key' => 'global_unique-pbx_title',
3015 'section' => 'telephony',
3016 'description' => 'Global phone number uniqueness control: none (check uniqueness per exports), enabled (check across all services), or disabled (no duplicate checking).',
3018 'select_enum' => [ 'enabled', 'disabled' ],
3022 'key' => 'global_unique-pbx_id',
3023 'section' => 'telephony',
3024 'description' => 'Global PBX id uniqueness control: none (check uniqueness per exports), enabled (check across all services), or disabled (no duplicate checking).',
3026 'select_enum' => [ 'enabled', 'disabled' ],
3030 'key' => 'svc_external-skip_manual',
3032 'description' => 'When provisioning svc_external services, skip manual entry of id and title fields in the UI. Usually used in conjunction with an export that populates these fields (i.e. artera_turbo).',
3033 'type' => 'checkbox',
3037 'key' => 'svc_external-display_type',
3039 'description' => 'Select a specific svc_external type to enable some UI changes specific to that type (i.e. artera_turbo).',
3041 'select_enum' => [ 'generic', 'artera_turbo', ],
3045 'key' => 'ticket_system',
3046 'section' => 'ticketing',
3047 'description' => 'Ticketing system integration. <b>RT_Internal</b> uses the built-in RT ticketing system (see the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:RT_Installation">integrated ticketing installation instructions</a>). <b>RT_External</b> accesses an external RT installation in a separate database (local or remote).',
3049 #'select_enum' => [ '', qw(RT_Internal RT_Libs RT_External) ],
3050 'select_enum' => [ '', qw(RT_Internal RT_External) ],
3054 'key' => 'network_monitoring_system',
3055 'section' => 'network_monitoring',
3056 'description' => 'Networking monitoring system (NMS) integration. <b>Torrus_Internal</b> uses the built-in Torrus network monitoring system (see the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:Torrus_Installation">installation instructions</a>).',
3058 'select_enum' => [ '', qw(Torrus_Internal) ],
3062 'key' => 'nms-auto_add-svc_ips',
3063 'section' => 'network_monitoring',
3064 'description' => 'Automatically add (and remove) IP addresses from these service tables to the network monitoring system.',
3065 'type' => 'selectmultiple',
3066 'select_enum' => [ 'svc_acct', 'svc_broadband', 'svc_dsl' ],
3070 'key' => 'nms-auto_add-community',
3071 'section' => 'network_monitoring',
3072 'description' => 'SNMP community string to use when automatically adding IP addresses from these services to the network monitoring system.',
3077 'key' => 'pingd-interval',
3078 'section' => 'network_monitoring',
3079 'description' => 'Run ping scans of broadband services at this interval.',
3081 'select_hash' => [ '' => '',
3094 'key' => 'ticket_system-default_queueid',
3095 'section' => 'ticketing',
3096 'description' => 'Default queue used when creating new customer tickets.',
3097 'type' => 'select-sub',
3098 'options_sub' => sub {
3099 my $conf = new FS::Conf;
3100 if ( $conf->config('ticket_system') ) {
3101 eval "use FS::TicketSystem;";
3103 FS::TicketSystem->queues();
3108 'option_sub' => sub {
3109 my $conf = new FS::Conf;
3110 if ( $conf->config('ticket_system') ) {
3111 eval "use FS::TicketSystem;";
3113 FS::TicketSystem->queue(shift);
3121 'key' => 'ticket_system-force_default_queueid',
3122 'section' => 'ticketing',
3123 'description' => 'Disallow queue selection when creating new tickets from customer view.',
3124 'type' => 'checkbox',
3128 'key' => 'ticket_system-selfservice_queueid',
3129 'section' => 'ticketing',
3130 'description' => 'Queue used when creating new customer tickets from self-service. Defautls to ticket_system-default_queueid if not specified.',
3131 #false laziness w/above
3132 'type' => 'select-sub',
3133 'options_sub' => sub {
3134 my $conf = new FS::Conf;
3135 if ( $conf->config('ticket_system') ) {
3136 eval "use FS::TicketSystem;";
3138 FS::TicketSystem->queues();
3143 'option_sub' => sub {
3144 my $conf = new FS::Conf;
3145 if ( $conf->config('ticket_system') ) {
3146 eval "use FS::TicketSystem;";
3148 FS::TicketSystem->queue(shift);
3156 'key' => 'ticket_system-requestor',
3157 'section' => 'ticketing',
3158 'description' => 'Email address to use as the requestor for new tickets. If blank, the customer\'s invoicing address(es) will be used.',
3163 'key' => 'ticket_system-priority_reverse',
3164 'section' => 'ticketing',
3165 'description' => 'Enable this to consider lower numbered priorities more important. A bad habit we picked up somewhere. You probably want to avoid it and use the default.',
3166 'type' => 'checkbox',
3170 'key' => 'ticket_system-custom_priority_field',
3171 'section' => 'ticketing',
3172 'description' => 'Custom field from the ticketing system to use as a custom priority classification.',
3177 'key' => 'ticket_system-custom_priority_field-values',
3178 'section' => 'ticketing',
3179 'description' => 'Values for the custom field from the ticketing system to break down and sort customer ticket lists.',
3180 'type' => 'textarea',
3184 'key' => 'ticket_system-custom_priority_field_queue',
3185 'section' => 'ticketing',
3186 'description' => 'Ticketing system queue in which the custom field specified in ticket_system-custom_priority_field is located.',
3191 'key' => 'ticket_system-selfservice_priority_field',
3192 'section' => 'ticketing',
3193 'description' => 'Custom field from the ticket system to use as a customer-managed priority field.',
3198 'key' => 'ticket_system-selfservice_edit_subject',
3199 'section' => 'ticketing',
3200 'description' => 'Allow customers to edit ticket subjects through selfservice.',
3201 'type' => 'checkbox',
3205 'key' => 'ticket_system-appointment-queueid',
3206 'section' => 'appointments',
3207 'description' => 'Ticketing queue to use for appointments.',
3208 #false laziness w/above
3209 'type' => 'select-sub',
3210 'options_sub' => sub {
3211 my $conf = new FS::Conf;
3212 if ( $conf->config('ticket_system') ) {
3213 eval "use FS::TicketSystem;";
3215 FS::TicketSystem->queues();
3220 'option_sub' => sub {
3221 my $conf = new FS::Conf;
3222 if ( $conf->config('ticket_system') ) {
3223 eval "use FS::TicketSystem;";
3225 FS::TicketSystem->queue(shift);
3233 'key' => 'ticket_system-appointment-custom_field',
3234 'section' => 'appointments',
3235 'description' => 'Ticketing custom field to use as an appointment classification.',
3240 'key' => 'ticket_system-escalation',
3241 'section' => 'ticketing',
3242 'description' => 'Enable priority escalation of tickets as part of daily batch processing.',
3243 'type' => 'checkbox',
3247 'key' => 'ticket_system-rt_external_datasrc',
3248 'section' => 'ticketing',
3249 'description' => 'With external RT integration, the DBI data source for the external RT installation, for example, <code>DBI:Pg:user=rt_user;password=rt_word;host=rt.example.com;dbname=rt</code>',
3255 'key' => 'ticket_system-rt_external_url',
3256 'section' => 'ticketing',
3257 'description' => 'With external RT integration, the URL for the external RT installation, for example, <code>https://rt.example.com/rt</code>',
3262 'key' => 'company_name',
3263 'section' => 'important',
3264 'description' => 'Your company name',
3266 'per_agent' => 1, #XXX just FS/FS/ClientAPI/Signup.pm
3270 'key' => 'company_url',
3272 'description' => 'Your company URL',
3278 'key' => 'company_address',
3279 'section' => 'important',
3280 'description' => 'Your company address',
3281 'type' => 'textarea',
3286 'key' => 'company_phonenum',
3287 'section' => 'important',
3288 'description' => 'Your company phone number',
3294 'key' => 'address1-search',
3295 'section' => 'addresses',
3296 'description' => 'Enable the ability to search the address1 field from the quick customer search. Not recommended in most cases as it tends to bring up too many search results - use explicit address searching from the advanced customer search instead.',
3297 'type' => 'checkbox',
3301 'key' => 'address2-search',
3302 'section' => 'addresses',
3303 'description' => 'Enable a "Unit" search box which searches the second address field. Useful for multi-tenant applications. See also: cust_main-require_address2',
3304 'type' => 'checkbox',
3308 'key' => 'cust_main-require_address2',
3309 'section' => 'addresses',
3310 'description' => 'Second address field is required. Also enables "Unit" labeling of address2 on customer view and edit pages. Useful for multi-tenant applications. See also: address2-search', # service address only part not working in the modern world, see #41184 (on service address only, if billing and service addresses differ)
3311 'type' => 'checkbox',
3315 'key' => 'agent-ship_address',
3316 'section' => 'addresses',
3317 'description' => "Use the agent's master service address as the service address (only ship_address2 can be entered, if blank on the master address). Useful for multi-tenant applications.",
3318 'type' => 'checkbox',
3322 { 'key' => 'selfservice_server-cache_module',
3323 'section' => 'self-service',
3324 'description' => 'Module used to store self-service session information. All modules handle any number of self-service servers. Cache::SharedMemoryCache is appropriate for a single database / single Freeside server. Cache::FileCache is useful for multiple databases on a single server, or when IPC::ShareLite is not available (i.e. FreeBSD).', # _Database stores session information in the database and is appropriate for multiple Freeside servers, but may be slower.',
3326 'select_enum' => [ 'Cache::SharedMemoryCache', 'Cache::FileCache', ], # '_Database' ],
3331 'section' => 'deprecated',
3332 'description' => 'Options for a HylaFAX server to enable the FAX invoice destination. They should be in the form of a space separated list of arguments to the Fax::Hylafax::Client::sendfax subroutine. You probably shouldn\'t override things like \'docfile\'. *Note* Only supported when using typeset invoices (see the invoice_latex configuration option).',
3333 'type' => [qw( checkbox textarea )],
3337 'key' => 'cust_bill-ftpformat',
3338 'section' => 'print_services',
3339 'description' => 'Enable FTP of raw invoice data - format.',
3341 'options' => [ spool_formats() ],
3345 'key' => 'cust_bill-ftpserver',
3346 'section' => 'print_services',
3347 'description' => 'Enable FTP of raw invoice data - server.',
3352 'key' => 'cust_bill-ftpusername',
3353 'section' => 'print_services',
3354 'description' => 'Enable FTP of raw invoice data - server.',
3359 'key' => 'cust_bill-ftppassword',
3360 'section' => 'print_services',
3361 'description' => 'Enable FTP of raw invoice data - server.',
3366 'key' => 'cust_bill-ftpdir',
3367 'section' => 'print_services',
3368 'description' => 'Enable FTP of raw invoice data - server.',
3373 'key' => 'cust_bill-spoolformat',
3374 'section' => 'print_services',
3375 'description' => 'Enable spooling of raw invoice data - format.',
3377 'options' => [ spool_formats() ],
3381 'key' => 'cust_bill-spoolagent',
3382 'section' => 'print_services',
3383 'description' => 'Enable per-agent spooling of raw invoice data.',
3384 'type' => 'checkbox',
3388 'key' => 'bridgestone-batch_counter',
3389 'section' => 'print_services',
3390 'description' => 'Batch counter for spool files. Increments every time a spool file is uploaded.',
3396 'key' => 'bridgestone-prefix',
3397 'section' => 'print_services',
3398 'description' => 'Agent identifier for uploading to BABT printing service.',
3404 'key' => 'bridgestone-confirm_template',
3405 'section' => 'print_services',
3406 'description' => 'Confirmation email template for uploading to BABT service. Text::Template format, with variables "$zipfile" (name of the zipped file), "$seq" (sequence number), "$prefix" (user ID string), and "$rows" (number of records in the file). Should include Subject: and To: headers, separated from the rest of the message by a blank line.',
3407 # this could use a true message template, but it's hard to see how that
3408 # would make the world a better place
3409 'type' => 'textarea',
3414 'key' => 'ics-confirm_template',
3415 'section' => 'print_services',
3416 'description' => 'Confirmation email template for uploading to ICS invoice printing. Text::Template format, with variables "%count" and "%sum".',
3417 'type' => 'textarea',
3422 'key' => 'svc_acct-usage_suspend',
3423 'section' => 'suspension',
3424 'description' => 'Suspends the package an account belongs to when svc_acct.seconds or a bytecount is decremented to 0 or below (accounts with an empty seconds and up|down|totalbytes value are ignored). Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.',
3425 'type' => 'checkbox',
3429 'key' => 'svc_acct-usage_unsuspend',
3430 'section' => 'suspension',
3431 'description' => 'Unuspends the package an account belongs to when svc_acct.seconds or a bytecount is incremented from 0 or below to a positive value (accounts with an empty seconds and up|down|totalbytes value are ignored). Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.',
3432 'type' => 'checkbox',
3436 'key' => 'svc_acct-usage_threshold',
3437 'section' => 'notification',
3438 'description' => 'The threshold (expressed as percentage) of acct.seconds or acct.up|down|totalbytes at which a warning message is sent to a service holder. Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.',
3443 'key' => 'overlimit_groups',
3444 'section' => 'suspension',
3445 'description' => 'RADIUS group(s) to assign to svc_acct which has exceeded its bandwidth or time limit.',
3446 'type' => 'select-sub',
3449 'options_sub' => sub { require FS::Record;
3450 require FS::radius_group;
3451 map { $_->groupnum => $_->long_description }
3452 FS::Record::qsearch('radius_group', {} );
3454 'option_sub' => sub { require FS::Record;
3455 require FS::radius_group;
3456 my $radius_group = FS::Record::qsearchs(
3457 'radius_group', { 'groupnum' => shift }
3459 $radius_group ? $radius_group->long_description : '';
3464 'key' => 'cust-fields',
3465 'section' => 'reporting',
3466 'description' => 'Which customer fields to display on reports by default',
3468 'select_hash' => [ FS::ConfDefaults->cust_fields_avail() ],
3472 'key' => 'cust_location-label_prefix',
3473 'section' => 'addresses',
3474 'description' => 'Optional "site ID" to show in the location label',
3476 'select_hash' => [ '' => '',
3477 'CoStAg' => 'CoStAgXXXXX (country, state, agent name, locationnum)',
3478 '_location' => 'Manually defined per location',
3483 'key' => 'cust_pkg-display_times',
3484 'section' => 'packages',
3485 'description' => 'Display full timestamps (not just dates) for customer packages. Useful if you are doing real-time things like hourly prepaid.',
3486 'type' => 'checkbox',
3490 'key' => 'cust_pkg-group_by_location',
3491 'section' => 'packages',
3492 'description' => "Group packages by location.",
3493 'type' => 'checkbox',
3497 'key' => 'cust_pkg-large_pkg_size',
3498 'section' => 'scalability',
3499 'description' => "In customer view, summarize packages with more than this many services. Set to zero to never summarize packag