recurring indicator for Paymentech batches, #19571
[freeside.git] / FS / FS / Conf.pm
1 package FS::Conf;
2
3 use vars qw($base_dir @config_items @base_items @card_types $DEBUG);
4 use Carp;
5 use IO::File;
6 use File::Basename;
7 use MIME::Base64;
8 use FS::ConfItem;
9 use FS::ConfDefaults;
10 use FS::Conf_compat17;
11 use FS::Locales;
12 use FS::payby;
13 use FS::conf;
14 use FS::Record qw(qsearch qsearchs);
15 use FS::UID qw(dbh datasrc use_confcompat);
16 use FS::Misc::Invoicing qw( spool_formats );
17 use FS::Misc::Geo;
18
19 $base_dir = '%%%FREESIDE_CONF%%%';
20
21 $DEBUG = 0;
22
23 =head1 NAME
24
25 FS::Conf - Freeside configuration values
26
27 =head1 SYNOPSIS
28
29   use FS::Conf;
30
31   $conf = new FS::Conf;
32
33   $value = $conf->config('key');
34   @list  = $conf->config('key');
35   $bool  = $conf->exists('key');
36
37   $conf->touch('key');
38   $conf->set('key' => 'value');
39   $conf->delete('key');
40
41   @config_items = $conf->config_items;
42
43 =head1 DESCRIPTION
44
45 Read and write Freeside configuration values.  Keys currently map to filenames,
46 but this may change in the future.
47
48 =head1 METHODS
49
50 =over 4
51
52 =item new [ HASHREF ]
53
54 Create a new configuration object.
55
56 HASHREF may contain options to set the configuration context.  Currently 
57 accepts C<locale>, and C<localeonly> to disable fallback to the null locale.
58
59 =cut
60
61 sub new {
62   my($proto) = shift;
63   my $opts = shift || {};
64   my($class) = ref($proto) || $proto;
65   my $self = {
66     'base_dir'    => $base_dir,
67     'locale'      => $opts->{locale},
68     'localeonly'  => $opts->{localeonly}, # for config-view.cgi ONLY
69   };
70   warn "FS::Conf created with no locale fallback.\n" if $self->{localeonly};
71   bless ($self, $class);
72 }
73
74 =item base_dir
75
76 Returns the base directory.  By default this is /usr/local/etc/freeside.
77
78 =cut
79
80 sub base_dir {
81   my($self) = @_;
82   my $base_dir = $self->{base_dir};
83   -e $base_dir or die "FATAL: $base_dir doesn't exist!";
84   -d $base_dir or die "FATAL: $base_dir isn't a directory!";
85   -r $base_dir or die "FATAL: Can't read $base_dir!";
86   -x $base_dir or die "FATAL: $base_dir not searchable (executable)!";
87   $base_dir =~ /^(.*)$/;
88   $1;
89 }
90
91 =item conf KEY [ AGENTNUM [ NODEFAULT ] ]
92
93 Returns the L<FS::conf> record for the key and agent.
94
95 =cut
96
97 sub conf {
98   my $self = shift;
99   $self->_config(@_);
100 }
101
102 =item config KEY [ AGENTNUM [ NODEFAULT ] ]
103
104 Returns the configuration value or values (depending on context) for key.
105 The optional agent number selects an agent specific value instead of the
106 global default if one is present.  If NODEFAULT is true only the agent
107 specific value(s) is returned.
108
109 =cut
110
111 sub _usecompat {
112   my ($self, $method) = (shift, shift);
113   carp "NO CONFIGURATION RECORDS FOUND -- USING COMPATIBILITY MODE"
114     if use_confcompat;
115   my $compat = new FS::Conf_compat17 ("$base_dir/conf." . datasrc);
116   $compat->$method(@_);
117 }
118
119 sub _config {
120   my($self,$name,$agentnum,$agentonly)=@_;
121   my $hashref = { 'name' => $name };
122   local $FS::Record::conf = undef;  # XXX evil hack prevents recursion
123   my $cv;
124   my @a = (
125     ($agentnum || ()),
126     ($agentonly && $agentnum ? () : '')
127   );
128   my @l = (
129     ($self->{locale} || ()),
130     ($self->{localeonly} && $self->{locale} ? () : '')
131   );
132   # try with the agentnum first, then fall back to no agentnum if allowed
133   foreach my $a (@a) {
134     $hashref->{agentnum} = $a;
135     foreach my $l (@l) {
136       $hashref->{locale} = $l;
137       $cv = FS::Record::qsearchs('conf', $hashref);
138       return $cv if $cv;
139     }
140   }
141   return undef;
142 }
143
144 sub config {
145   my $self = shift;
146   return $self->_usecompat('config', @_) if use_confcompat;
147
148   carp "FS::Conf->config(". join(', ', @_). ") called"
149     if $DEBUG > 1;
150
151   my $cv = $self->_config(@_) or return;
152
153   if ( wantarray ) {
154     my $v = $cv->value;
155     chomp $v;
156     (split "\n", $v, -1);
157   } else {
158     (split("\n", $cv->value))[0];
159   }
160 }
161
162 =item config_binary KEY [ AGENTNUM [ NODEFAULT ] ]
163
164 Returns the exact scalar value for key.
165
166 =cut
167
168 sub config_binary {
169   my $self = shift;
170   return $self->_usecompat('config_binary', @_) if use_confcompat;
171
172   my $cv = $self->_config(@_) or return;
173   length($cv->value) ? decode_base64($cv->value) : '';
174 }
175
176 =item exists KEY [ AGENTNUM [ NODEFAULT ] ]
177
178 Returns true if the specified key exists, even if the corresponding value
179 is undefined.
180
181 =cut
182
183 sub exists {
184   my $self = shift;
185   return $self->_usecompat('exists', @_) if use_confcompat;
186
187   #my($name, $agentnum)=@_;
188
189   carp "FS::Conf->exists(". join(', ', @_). ") called"
190     if $DEBUG > 1;
191
192   defined($self->_config(@_));
193 }
194
195 #maybe this should just be the new exists instead of getting a method of its
196 #own, but i wanted to avoid possible fallout
197
198 sub config_bool {
199   my $self = shift;
200   return $self->_usecompat('exists', @_) if use_confcompat;
201
202   my($name,$agentnum,$agentonly) = @_;
203
204   carp "FS::Conf->config_bool(". join(', ', @_). ") called"
205     if $DEBUG > 1;
206
207   #defined($self->_config(@_));
208
209   #false laziness w/_config
210   my $hashref = { 'name' => $name };
211   local $FS::Record::conf = undef;  # XXX evil hack prevents recursion
212   my $cv;
213   my @a = (
214     ($agentnum || ()),
215     ($agentonly && $agentnum ? () : '')
216   );
217   my @l = (
218     ($self->{locale} || ()),
219     ($self->{localeonly} && $self->{locale} ? () : '')
220   );
221   # try with the agentnum first, then fall back to no agentnum if allowed
222   foreach my $a (@a) {
223     $hashref->{agentnum} = $a;
224     foreach my $l (@l) {
225       $hashref->{locale} = $l;
226       $cv = FS::Record::qsearchs('conf', $hashref);
227       if ( $cv ) {
228         if ( $cv->value eq '0'
229                && ($hashref->{agentnum} || $hashref->{locale} )
230            ) 
231         {
232           return 0; #an explicit false override, don't continue looking
233         } else {
234           return 1;
235         }
236       }
237     }
238   }
239   return 0;
240
241 }
242
243 =item config_orbase KEY SUFFIX
244
245 Returns the configuration value or values (depending on context) for 
246 KEY_SUFFIX, if it exists, otherwise for KEY
247
248 =cut
249
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
253 sub config_orbase {
254   my $self = shift;
255   return $self->_usecompat('config_orbase', @_) if use_confcompat;
256
257   my( $name, $suffix ) = @_;
258   if ( $self->exists("${name}_$suffix") ) {
259     $self->config("${name}_$suffix");
260   } else {
261     $self->config($name);
262   }
263 }
264
265 =item key_orbase KEY SUFFIX
266
267 If the config value KEY_SUFFIX exists, returns KEY_SUFFIX, otherwise returns
268 KEY.  Useful for determining which exact configuration option is returned by
269 config_orbase.
270
271 =cut
272
273 sub key_orbase {
274   my $self = shift;
275   #no compat for this...return $self->_usecompat('config_orbase', @_) if use_confcompat;
276
277   my( $name, $suffix ) = @_;
278   if ( $self->exists("${name}_$suffix") ) {
279     "${name}_$suffix";
280   } else {
281     $name;
282   }
283 }
284
285 =item invoice_templatenames
286
287 Returns all possible invoice template names.
288
289 =cut
290
291 sub invoice_templatenames {
292   my( $self ) = @_;
293
294   my %templatenames = ();
295   foreach my $item ( $self->config_items ) {
296     foreach my $base ( @base_items ) {
297       my( $main, $ext) = split(/\./, $base);
298       $ext = ".$ext" if $ext;
299       if ( $item->key =~ /^${main}_(.+)$ext$/ ) {
300       $templatenames{$1}++;
301       }
302     }
303   }
304   
305   map { $_ } #handle scalar context
306   sort keys %templatenames;
307
308 }
309
310 =item touch KEY [ AGENT ];
311
312 Creates the specified configuration key if it does not exist.
313
314 =cut
315
316 sub touch {
317   my $self = shift;
318   return $self->_usecompat('touch', @_) if use_confcompat;
319
320   my($name, $agentnum) = @_;
321   #unless ( $self->exists($name, $agentnum) ) {
322   unless ( $self->config_bool($name, $agentnum) ) {
323     if ( $agentnum && $self->exists($name) && $self->config($name,$agentnum) eq '0' ) {
324       $self->delete($name, $agentnum);
325     } else {
326       $self->set($name, '', $agentnum);
327     }
328   }
329 }
330
331 =item set KEY VALUE [ AGENTNUM ];
332
333 Sets the specified configuration key to the given value.
334
335 =cut
336
337 sub set {
338   my $self = shift;
339   return $self->_usecompat('set', @_) if use_confcompat;
340
341   my($name, $value, $agentnum) = @_;
342   $value =~ /^(.*)$/s;
343   $value = $1;
344
345   warn "[FS::Conf] SET $name\n" if $DEBUG;
346
347   my $hashref = {
348     name => $name,
349     agentnum => $agentnum,
350     locale => $self->{locale}
351   };
352
353   my $old = FS::Record::qsearchs('conf', $hashref);
354   my $new = new FS::conf { $old ? $old->hash : %$hashref };
355   $new->value($value);
356
357   my $error;
358   if ($old) {
359     $error = $new->replace($old);
360   } else {
361     $error = $new->insert;
362   }
363
364   die "error setting configuration value: $error \n"
365     if $error;
366
367 }
368
369 =item set_binary KEY VALUE [ AGENTNUM ]
370
371 Sets the specified configuration key to an exact scalar value which
372 can be retrieved with config_binary.
373
374 =cut
375
376 sub set_binary {
377   my $self  = shift;
378   return if use_confcompat;
379
380   my($name, $value, $agentnum)=@_;
381   $self->set($name, encode_base64($value), $agentnum);
382 }
383
384 =item delete KEY [ AGENTNUM ];
385
386 Deletes the specified configuration key.
387
388 =cut
389
390 sub delete {
391   my $self = shift;
392   return $self->_usecompat('delete', @_) if use_confcompat;
393
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;
397
398     my $oldAutoCommit = $FS::UID::AutoCommit;
399     local $FS::UID::AutoCommit = 0;
400     my $dbh = dbh;
401
402     my $error = $cv->delete;
403
404     if ( $error ) {
405       $dbh->rollback if $oldAutoCommit;
406       die "error setting configuration value: $error \n"
407     }
408
409     $dbh->commit or die $dbh->errstr if $oldAutoCommit;
410
411   }
412 }
413
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
416
417 sub delete_bool {
418   my $self = shift;
419   return $self->_usecompat('delete', @_) if use_confcompat;
420
421   my($name, $agentnum) = @_;
422
423   warn "[FS::Conf] DELETE $name\n" if $DEBUG;
424
425   my $cv = FS::Record::qsearchs('conf', { name     => $name,
426                                           agentnum => $agentnum,
427                                           locale   => $self->{locale},
428                                         });
429
430   if ( $cv ) {
431     my $error = $cv->delete;
432     die $error if $error;
433   } elsif ( $agentnum ) {
434     $self->set($name, '0', $agentnum);
435   }
436
437 }
438
439 =item import_config_item CONFITEM DIR 
440
441   Imports the item specified by the CONFITEM (see L<FS::ConfItem>) into
442 the database as a conf record (see L<FS::conf>).  Imports from the file
443 in the directory DIR.
444
445 =cut
446
447 sub import_config_item { 
448   my ($self,$item,$dir) = @_;
449   my $key = $item->key;
450   if ( -e "$dir/$key" && ! use_confcompat ) {
451     warn "Inserting $key\n" if $DEBUG;
452     local $/;
453     my $value = readline(new IO::File "$dir/$key");
454     if ($item->type =~ /^(binary|image)$/ ) {
455       $self->set_binary($key, $value);
456     }else{
457       $self->set($key, $value);
458     }
459   }else {
460     warn "Not inserting $key\n" if $DEBUG;
461   }
462 }
463
464 =item verify_config_item CONFITEM DIR 
465
466   Compares the item specified by the CONFITEM (see L<FS::ConfItem>) in
467 the database to the legacy file value in DIR.
468
469 =cut
470
471 sub verify_config_item { 
472   return '' if use_confcompat;
473   my ($self,$item,$dir) = @_;
474   my $key = $item->key;
475   my $type = $item->type;
476
477   my $compat = new FS::Conf_compat17 $dir;
478   my $error = '';
479   
480   $error .= "$key fails existential comparison; "
481     if $self->exists($key) xor $compat->exists($key);
482
483   if ( $type !~ /^(binary|image)$/ ) {
484
485     {
486       no warnings;
487       $error .= "$key fails scalar comparison; "
488         unless scalar($self->config($key)) eq scalar($compat->config($key));
489     }
490
491     my (@new) = $self->config($key);
492     my (@old) = $compat->config($key);
493     unless ( scalar(@new) == scalar(@old)) { 
494       $error .= "$key fails list comparison; ";
495     }else{
496       my $r=1;
497       foreach (@old) { $r=0 if ($_ cmp shift(@new)); }
498       $error .= "$key fails list comparison; "
499         unless $r;
500     }
501
502   } else {
503
504     no warnings 'uninitialized';
505     $error .= "$key fails binary comparison; "
506       unless scalar($self->config_binary($key)) eq scalar($compat->config_binary($key));
507
508   }
509
510 #remove deprecated config on our own terms, not freeside-upgrade's
511 #  if ($error =~ /existential comparison/ && $item->section eq 'deprecated') {
512 #    my $proto;
513 #    for ( @config_items ) { $proto = $_; last if $proto->key eq $key;  }
514 #    unless ($proto->key eq $key) { 
515 #      warn "removed config item $error\n" if $DEBUG;
516 #      $error = '';
517 #    }
518 #  }
519
520   $error;
521 }
522
523 #item _orbase_items OPTIONS
524 #
525 #Returns all of the possible extensible config items as FS::ConfItem objects.
526 #See #L<FS::ConfItem>.  OPTIONS consists of name value pairs.  Possible
527 #options include
528 #
529 # dir - the directory to search for configuration option files instead
530 #       of using the conf records in the database
531 #
532 #cut
533
534 #quelle kludge
535 sub _orbase_items {
536   my ($self, %opt) = @_; 
537
538   my $listmaker = sub { my $v = shift;
539                         $v =~ s/_/!_/g;
540                         if ( $v =~ /\.(png|eps)$/ ) {
541                           $v =~ s/\./!_%./;
542                         }else{
543                           $v .= '!_%';
544                         }
545                         map { $_->name }
546                           FS::Record::qsearch( 'conf',
547                                                {},
548                                                '',
549                                                "WHERE name LIKE '$v' ESCAPE '!'"
550                                              );
551                       };
552
553   if (exists($opt{dir}) && $opt{dir}) {
554     $listmaker = sub { my $v = shift;
555                        if ( $v =~ /\.(png|eps)$/ ) {
556                          $v =~ s/\./_*./;
557                        }else{
558                          $v .= '_*';
559                        }
560                        map { basename $_ } glob($opt{dir}. "/$v" );
561                      };
562   }
563
564   ( map { 
565           my $proto;
566           my $base = $_;
567           for ( @config_items ) { $proto = $_; last if $proto->key eq $base;  }
568           die "don't know about $base items" unless $proto->key eq $base;
569
570           map { new FS::ConfItem { 
571                   'key'         => $_,
572                   'base_key'    => $proto->key,
573                   'section'     => $proto->section,
574                   'description' => 'Alternate ' . $proto->description . '  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:2.1:Documentation:Administration#Invoice_templates">billing documentation</a> for details.',
575                   'type'        => $proto->type,
576                 };
577               } &$listmaker($base);
578         } @base_items,
579   );
580 }
581
582 =item config_items
583
584 Returns all of the possible global/default configuration items as
585 FS::ConfItem objects.  See L<FS::ConfItem>.
586
587 =cut
588
589 sub config_items {
590   my $self = shift; 
591   return $self->_usecompat('config_items', @_) if use_confcompat;
592
593   ( @config_items, $self->_orbase_items(@_) );
594 }
595
596 =back
597
598 =head1 SUBROUTINES
599
600 =over 4
601
602 =item init-config DIR
603
604 Imports the configuration items from DIR (1.7 compatible)
605 to conf records in the database.
606
607 =cut
608
609 sub init_config {
610   my $dir = shift;
611
612   {
613     local $FS::UID::use_confcompat = 0;
614     my $conf = new FS::Conf;
615     foreach my $item ( $conf->config_items(dir => $dir) ) {
616       $conf->import_config_item($item, $dir);
617       my $error = $conf->verify_config_item($item, $dir);
618       return $error if $error;
619     }
620   
621     my $compat = new FS::Conf_compat17 $dir;
622     foreach my $item ( $compat->config_items ) {
623       my $error = $conf->verify_config_item($item, $dir);
624       return $error if $error;
625     }
626   }
627
628   $FS::UID::use_confcompat = 0;
629   '';  #success
630 }
631
632 =back
633
634 =head1 BUGS
635
636 If this was more than just crud that will never be useful outside Freeside I'd
637 worry that config_items is freeside-specific and icky.
638
639 =head1 SEE ALSO
640
641 "Configuration" in the web interface (config/config.cgi).
642
643 =cut
644
645 #Business::CreditCard
646 @card_types = (
647   "VISA card",
648   "MasterCard",
649   "Discover card",
650   "American Express card",
651   "Diner's Club/Carte Blanche",
652   "enRoute",
653   "JCB",
654   "BankCard",
655   "Switch",
656   "Solo",
657 );
658
659 @base_items = qw(
660 invoice_template
661 invoice_latex
662 invoice_latexreturnaddress
663 invoice_latexfooter
664 invoice_latexsmallfooter
665 invoice_latexnotes
666 invoice_latexcoupon
667 invoice_html
668 invoice_htmlreturnaddress
669 invoice_htmlfooter
670 invoice_htmlnotes
671 logo.png
672 logo.eps
673 );
674
675 my %msg_template_options = (
676   'type'        => 'select-sub',
677   'options_sub' => sub { 
678     my @templates = qsearch({
679         'table' => 'msg_template', 
680         'hashref' => { 'disabled' => '' },
681         'extra_sql' => ' AND '. 
682           $FS::CurrentUser::CurrentUser->agentnums_sql(null => 1),
683         });
684     map { $_->msgnum, $_->msgname } @templates;
685   },
686   'option_sub'  => sub { 
687                          my $msg_template = FS::msg_template->by_key(shift);
688                          $msg_template ? $msg_template->msgname : ''
689                        },
690   'per_agent' => 1,
691 );
692
693 my %payment_gateway_options = (
694   'type'        => 'select-sub',
695   'options_sub' => sub {
696     my @gateways = qsearch({
697         'table' => 'payment_gateway',
698         'hashref' => { 'disabled' => '' },
699       });
700     map { $_->gatewaynum, $_->label } @gateways;
701   },
702   'option_sub'  => sub {
703     my $gateway = FS::payment_gateway->by_key(shift);
704     $gateway ? $gateway->label : ''
705   },
706 );
707
708 my %batch_gateway_options = (
709   %payment_gateway_options,
710   'options_sub' => sub {
711     my @gateways = qsearch('payment_gateway',
712       {
713         'disabled'          => '',
714         'gateway_namespace' => 'Business::BatchPayment',
715       }
716     );
717     map { $_->gatewaynum, $_->label } @gateways;
718   },
719 );
720
721 # takes the reason class (C, R, S) as an argument
722 sub reason_type_options {
723   my $reason_class = shift;
724
725   'type'        => 'select-sub',
726   'options_sub' => sub {
727     map { $_->typenum => $_->type } 
728       qsearch('reason_type', { class => $reason_class });
729   },
730   'option_sub'  => sub {
731     my $type = FS::reason_type->by_key(shift);
732     $type ? $type->type : '';
733   }
734 }
735
736 #Billing (81 items)
737 #Invoicing (50 items)
738 #UI (69 items)
739 #Self-service (29 items)
740 #...
741 #Unclassified (77 items)
742
743 @config_items = map { new FS::ConfItem $_ } (
744
745   {
746     'key'         => 'address',
747     'section'     => 'deprecated',
748     'description' => 'This configuration option is no longer used.  See <a href="#invoice_template">invoice_template</a> instead.',
749     'type'        => 'text',
750   },
751
752   {
753     'key'         => 'log_sent_mail',
754     'section'     => 'notification',
755     'description' => 'Enable logging of template-generated email.',
756     'type'        => 'checkbox',
757   },
758
759   {
760     'key'         => 'alert_expiration',
761     'section'     => 'notification',
762     'description' => 'Enable alerts about billing method expiration (i.e. expiring credit cards).',
763     'type'        => 'checkbox',
764     'per_agent'   => 1,
765   },
766
767   {
768     'key'         => 'alerter_template',
769     'section'     => 'deprecated',
770     'description' => 'Template file for billing method expiration alerts (i.e. expiring credit cards).',
771     'type'        => 'textarea',
772     'per_agent'   => 1,
773   },
774   
775   {
776     'key'         => 'alerter_msgnum',
777     'section'     => 'notification',
778     'description' => 'Template to use for credit card expiration alerts.',
779     %msg_template_options,
780   },
781
782   {
783     'key'         => 'part_pkg-lineage',
784     'section'     => '',
785     'description' => 'When editing a package definition, if setup or recur fees are changed, create a new package rather than changing the existing package.',
786     'type'        => 'checkbox',
787   },
788
789   {
790     'key'         => 'apacheip',
791     #not actually deprecated yet
792     #'section'     => 'deprecated',
793     #'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',
794     'section'     => '',
795     'description' => 'IP address to assign to new virtual hosts',
796     'type'        => 'text',
797   },
798   
799   {
800     'key'         => 'credits-auto-apply-disable',
801     'section'     => 'billing',
802     'description' => 'Disable the "Auto-Apply to invoices" UI option for new credits',
803     'type'        => 'checkbox',
804   },
805   
806   {
807     'key'         => 'credit-card-surcharge-percentage',
808     'section'     => 'billing',
809     'description' => 'Add a credit card surcharge to invoices, as a % of the invoice total. WARNING: this is usually prohibited by merchant account / other agreements and/or law, but is currently lawful in AU and UK.',
810     'type'        => 'text',
811   },
812
813   {
814     'key'         => 'discount-show-always',
815     'section'     => 'billing',
816     'description' => 'Generate a line item on an invoice even when a package is discounted 100%',
817     'type'        => 'checkbox',
818   },
819
820   {
821     'key'         => 'discount-show_available',
822     'section'     => 'billing',
823     'description' => 'Show available prepayment discounts on invoices.',
824     'type'        => 'checkbox',
825   },
826
827   {
828     'key'         => 'invoice-barcode',
829     'section'     => 'billing',
830     'description' => 'Display a barcode on HTML and PDF invoices',
831     'type'        => 'checkbox',
832   },
833   
834   {
835     'key'         => 'cust_main-select-billday',
836     'section'     => 'billing',
837     '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',
838     'type'        => 'checkbox',
839   },
840
841   {
842     'key'         => 'cust_main-select-prorate_day',
843     'section'     => 'billing',
844     'description' => 'When used with prorate or anniversary packages, allows the selection of the prorate day of month, on a per-customer basis',
845     'type'        => 'checkbox',
846   },
847
848   {
849     'key'         => 'encryption',
850     'section'     => 'billing',
851     'description' => 'Enable encryption of credit cards and echeck numbers',
852     'type'        => 'checkbox',
853   },
854
855   {
856     'key'         => 'encryptionmodule',
857     'section'     => 'billing',
858     'description' => 'Use which module for encryption?',
859     'type'        => 'select',
860     'select_enum' => [ '', 'Crypt::OpenSSL::RSA', ],
861   },
862
863   {
864     'key'         => 'encryptionpublickey',
865     'section'     => 'billing',
866     'description' => 'Encryption public key',
867     'type'        => 'textarea',
868   },
869
870   {
871     'key'         => 'encryptionprivatekey',
872     'section'     => 'billing',
873     'description' => 'Encryption private key',
874     'type'        => 'textarea',
875   },
876
877   {
878     'key'         => 'billco-url',
879     'section'     => 'billing',
880     'description' => 'The url to use for performing uploads to the invoice mailing service.',
881     'type'        => 'text',
882     'per_agent'   => 1,
883   },
884
885   {
886     'key'         => 'billco-username',
887     'section'     => 'billing',
888     'description' => 'The login name to use for uploads to the invoice mailing service.',
889     'type'        => 'text',
890     'per_agent'   => 1,
891     'agentonly'   => 1,
892   },
893
894   {
895     'key'         => 'billco-password',
896     'section'     => 'billing',
897     'description' => 'The password to use for uploads to the invoice mailing service.',
898     'type'        => 'text',
899     'per_agent'   => 1,
900     'agentonly'   => 1,
901   },
902
903   {
904     'key'         => 'billco-clicode',
905     'section'     => 'billing',
906     'description' => 'The clicode to use for uploads to the invoice mailing service.',
907     'type'        => 'text',
908     'per_agent'   => 1,
909   },
910   
911   {
912     'key'         => 'next-bill-ignore-time',
913     'section'     => 'billing',
914     '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.',
915     'type'        => 'checkbox',
916   },
917   
918   {
919     'key'         => 'business-onlinepayment',
920     'section'     => 'billing',
921     '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.',
922     'type'        => 'textarea',
923   },
924
925   {
926     'key'         => 'business-onlinepayment-ach',
927     'section'     => 'billing',
928     '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.',
929     'type'        => 'textarea',
930   },
931
932   {
933     'key'         => 'business-onlinepayment-namespace',
934     'section'     => 'billing',
935     'description' => 'Specifies which perl module namespace (which group of collection routines) is used by default.',
936     'type'        => 'select',
937     'select_hash' => [
938                        'Business::OnlinePayment' => 'Direct API (Business::OnlinePayment)',
939                        'Business::OnlineThirdPartyPayment' => 'Web API (Business::ThirdPartyPayment)',
940                      ],
941   },
942
943   {
944     'key'         => 'business-onlinepayment-description',
945     'section'     => 'billing',
946     '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)',
947     'type'        => 'text',
948   },
949
950   {
951     'key'         => 'business-onlinepayment-email-override',
952     'section'     => 'billing',
953     'description' => 'Email address used instead of customer email address when submitting a BOP transaction.',
954     'type'        => 'text',
955   },
956
957   {
958     'key'         => 'business-onlinepayment-email_customer',
959     'section'     => 'billing',
960     'description' => 'Controls the "email_customer" flag used by some Business::OnlinePayment processors to enable customer receipts.',
961     'type'        => 'checkbox',
962   },
963
964   {
965     'key'         => 'business-onlinepayment-test_transaction',
966     'section'     => 'billing',
967     '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.',
968     'type'        => 'checkbox',
969   },
970
971   {
972     'key'         => 'business-onlinepayment-currency',
973     'section'     => 'billing',
974     'description' => 'Currency parameter for Business::OnlinePayment transactions.',
975     'type'        => 'select',
976     'select_enum' => [ '', qw( USD AUD CAD DKK EUR GBP ILS JPY NZD ) ],
977   },
978
979   {
980     'key'         => 'business-batchpayment-test_transaction',
981     'section'     => 'billing',
982     '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.',
983     'type'        => 'checkbox',
984   },
985
986   {
987     'key'         => 'countrydefault',
988     'section'     => 'UI',
989     'description' => 'Default two-letter country code (if not supplied, the default is `US\')',
990     'type'        => 'text',
991   },
992
993   {
994     'key'         => 'date_format',
995     'section'     => 'UI',
996     'description' => 'Format for displaying dates',
997     'type'        => 'select',
998     'select_hash' => [
999                        '%m/%d/%Y' => 'MM/DD/YYYY',
1000                        '%d/%m/%Y' => 'DD/MM/YYYY',
1001                        '%Y/%m/%d' => 'YYYY/MM/DD',
1002                      ],
1003   },
1004
1005   {
1006     'key'         => 'date_format_long',
1007     'section'     => 'UI',
1008     'description' => 'Verbose format for displaying dates',
1009     'type'        => 'select',
1010     'select_hash' => [
1011                        '%b %o, %Y' => 'Mon DDth, YYYY',
1012                        '%e %b %Y'  => 'DD Mon YYYY',
1013                      ],
1014   },
1015
1016   {
1017     'key'         => 'deletecustomers',
1018     'section'     => 'UI',
1019     'description' => 'Enable customer deletions.  Be very careful!  Deleting a customer will remove all traces that the customer ever existed!  It should probably only be used when auditing a legacy database.  Normally, you cancel all of a customers\' packages if they cancel service.',
1020     'type'        => 'checkbox',
1021   },
1022
1023   {
1024     'key'         => 'deleteinvoices',
1025     'section'     => 'UI',
1026     'description' => 'Enable invoices deletions.  Be very careful!  Deleting an invoice will remove all traces that the invoice ever existed!  Normally, you would apply a credit against the invoice instead.',  #invoice voiding?
1027     'type'        => 'checkbox',
1028   },
1029
1030   {
1031     'key'         => 'deletepayments',
1032     'section'     => 'billing',
1033     'description' => 'Enable deletion of unclosed payments.  Really, with voids this is pretty much not recommended in any situation anymore.  Be very careful!  Only delete payments that were data-entry errors, not adjustments.  Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.',
1034     'type'        => [qw( checkbox text )],
1035   },
1036
1037   {
1038     'key'         => 'deletecredits',
1039     #not actually deprecated yet
1040     #'section'     => 'deprecated',
1041     #'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable deletion of unclosed credits.  Be very careful!  Only delete credits that were data-entry errors, not adjustments.  Optionally specify one or more comma-separated email addresses to be notified when a credit is deleted.',
1042     'section'     => '',
1043     'description' => 'One or more comma-separated email addresses to be notified when a credit is deleted.',
1044     'type'        => [qw( checkbox text )],
1045   },
1046
1047   {
1048     'key'         => 'deleterefunds',
1049     'section'     => 'billing',
1050     'description' => 'Enable deletion of unclosed refunds.  Be very careful!  Only delete refunds that were data-entry errors, not adjustments.',
1051     'type'        => 'checkbox',
1052   },
1053
1054   {
1055     'key'         => 'unapplypayments',
1056     'section'     => 'deprecated',
1057     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable "unapplication" of unclosed payments.',
1058     'type'        => 'checkbox',
1059   },
1060
1061   {
1062     'key'         => 'unapplycredits',
1063     'section'     => 'deprecated',
1064     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to nable "unapplication" of unclosed credits.',
1065     'type'        => 'checkbox',
1066   },
1067
1068   {
1069     'key'         => 'dirhash',
1070     'section'     => 'shell',
1071     '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>',
1072     'type'        => 'text',
1073   },
1074
1075   {
1076     'key'         => 'disable_cust_attachment',
1077     'section'     => '',
1078     'description' => 'Disable customer file attachments',
1079     'type'        => 'checkbox',
1080   },
1081
1082   {
1083     'key'         => 'max_attachment_size',
1084     'section'     => '',
1085     'description' => 'Maximum size for customer file attachments (leave blank for unlimited)',
1086     'type'        => 'text',
1087   },
1088
1089   {
1090     'key'         => 'disable_customer_referrals',
1091     'section'     => 'UI',
1092     'description' => 'Disable new customer-to-customer referrals in the web interface',
1093     'type'        => 'checkbox',
1094   },
1095
1096   {
1097     'key'         => 'editreferrals',
1098     'section'     => 'UI',
1099     'description' => 'Enable advertising source modification for existing customers',
1100     'type'        => 'checkbox',
1101   },
1102
1103   {
1104     'key'         => 'emailinvoiceonly',
1105     'section'     => 'invoicing',
1106     'description' => 'Disables postal mail invoices',
1107     'type'        => 'checkbox',
1108   },
1109
1110   {
1111     'key'         => 'disablepostalinvoicedefault',
1112     'section'     => 'invoicing',
1113     '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>.',
1114     'type'        => 'checkbox',
1115   },
1116
1117   {
1118     'key'         => 'emailinvoiceauto',
1119     'section'     => 'invoicing',
1120     'description' => 'Automatically adds new accounts to the email invoice list',
1121     'type'        => 'checkbox',
1122   },
1123
1124   {
1125     'key'         => 'emailinvoiceautoalways',
1126     'section'     => 'invoicing',
1127     'description' => 'Automatically adds new accounts to the email invoice list even when the list contains email addresses',
1128     'type'        => 'checkbox',
1129   },
1130
1131   {
1132     'key'         => 'emailinvoice-apostrophe',
1133     'section'     => 'invoicing',
1134     'description' => 'Allows the apostrophe (single quote) character in the email addresses in the email invoice list.',
1135     'type'        => 'checkbox',
1136   },
1137
1138   {
1139     'key'         => 'exclude_ip_addr',
1140     'section'     => '',
1141     'description' => 'Exclude these from the list of available broadband service IP addresses. (One per line)',
1142     'type'        => 'textarea',
1143   },
1144   
1145   {
1146     'key'         => 'auto_router',
1147     'section'     => '',
1148     'description' => 'Automatically choose the correct router/block based on supplied ip address when possible while provisioning broadband services',
1149     'type'        => 'checkbox',
1150   },
1151   
1152   {
1153     'key'         => 'hidecancelledpackages',
1154     'section'     => 'UI',
1155     'description' => 'Prevent cancelled packages from showing up in listings (though they will still be in the database)',
1156     'type'        => 'checkbox',
1157   },
1158
1159   {
1160     'key'         => 'hidecancelledcustomers',
1161     'section'     => 'UI',
1162     'description' => 'Prevent customers with only cancelled packages from showing up in listings (though they will still be in the database)',
1163     'type'        => 'checkbox',
1164   },
1165
1166   {
1167     'key'         => 'home',
1168     'section'     => 'shell',
1169     'description' => 'For new users, prefixed to username to create a directory name.  Should have a leading but not a trailing slash.',
1170     'type'        => 'text',
1171   },
1172
1173   {
1174     'key'         => 'invoice_from',
1175     'section'     => 'required',
1176     'description' => 'Return address on email invoices',
1177     'type'        => 'text',
1178     'per_agent'   => 1,
1179   },
1180
1181   {
1182     'key'         => 'invoice_subject',
1183     'section'     => 'invoicing',
1184     'description' => 'Subject: header on email invoices.  Defaults to "Invoice".  The following substitutions are available: $name, $name_short, $invoice_number, and $invoice_date.',
1185     'type'        => 'text',
1186     'per_agent'   => 1,
1187     'per_locale'  => 1,
1188   },
1189
1190   {
1191     'key'         => 'invoice_usesummary',
1192     'section'     => 'invoicing',
1193     'description' => 'Indicates that html and latex invoices should be in summary style and make use of invoice_latexsummary.',
1194     'type'        => 'checkbox',
1195   },
1196
1197   {
1198     'key'         => 'invoice_template',
1199     'section'     => 'invoicing',
1200     '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:2.1:Documentation:Administration#Plaintext_invoice_templates">billing documentation</a> for details.',
1201     'type'        => 'textarea',
1202   },
1203
1204   {
1205     'key'         => 'invoice_html',
1206     'section'     => 'invoicing',
1207     'description' => 'HTML template for invoices.  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:2.1:Documentation:Administration#HTML_invoice_templates">billing documentation</a> for details.',
1208
1209     'type'        => 'textarea',
1210   },
1211
1212   {
1213     'key'         => 'quotation_html',
1214     'section'     => '',
1215     'description' => 'HTML template for quotations.',
1216
1217     'type'        => 'textarea',
1218   },
1219
1220   {
1221     'key'         => 'invoice_htmlnotes',
1222     'section'     => 'invoicing',
1223     'description' => 'Notes section for HTML invoices.  Defaults to the same data in invoice_latexnotes if not specified.',
1224     'type'        => 'textarea',
1225     'per_agent'   => 1,
1226     'per_locale'  => 1,
1227   },
1228
1229   {
1230     'key'         => 'invoice_htmlfooter',
1231     'section'     => 'invoicing',
1232     'description' => 'Footer for HTML invoices.  Defaults to the same data in invoice_latexfooter if not specified.',
1233     'type'        => 'textarea',
1234     'per_agent'   => 1,
1235     'per_locale'  => 1,
1236   },
1237
1238   {
1239     'key'         => 'invoice_htmlsummary',
1240     'section'     => 'invoicing',
1241     'description' => 'Summary initial page for HTML invoices.',
1242     'type'        => 'textarea',
1243     'per_agent'   => 1,
1244     'per_locale'  => 1,
1245   },
1246
1247   {
1248     'key'         => 'invoice_htmlreturnaddress',
1249     'section'     => 'invoicing',
1250     'description' => 'Return address for HTML invoices.  Defaults to the same data in invoice_latexreturnaddress if not specified.',
1251     'type'        => 'textarea',
1252     'per_locale'  => 1,
1253   },
1254
1255   {
1256     'key'         => 'invoice_latex',
1257     'section'     => 'invoicing',
1258     'description' => 'Optional LaTeX template for typeset PostScript invoices.  See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:2.1:Documentation:Administration#Typeset_.28LaTeX.29_invoice_templates">billing documentation</a> for details.',
1259     'type'        => 'textarea',
1260   },
1261
1262   {
1263     'key'         => 'quotation_latex',
1264     'section'     => '',
1265     'description' => 'LaTeX template for typeset PostScript quotations.',
1266     'type'        => 'textarea',
1267   },
1268
1269   {
1270     'key'         => 'invoice_latextopmargin',
1271     'section'     => 'invoicing',
1272     'description' => 'Optional LaTeX invoice topmargin setting. Include units.',
1273     'type'        => 'text',
1274     'per_agent'   => 1,
1275     'validate'    => sub { shift =~
1276                              /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1277                              ? '' : 'Invalid LaTex length';
1278                          },
1279   },
1280
1281   {
1282     'key'         => 'invoice_latexheadsep',
1283     'section'     => 'invoicing',
1284     'description' => 'Optional LaTeX invoice headsep setting. Include units.',
1285     'type'        => 'text',
1286     'per_agent'   => 1,
1287     'validate'    => sub { shift =~
1288                              /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1289                              ? '' : 'Invalid LaTex length';
1290                          },
1291   },
1292
1293   {
1294     'key'         => 'invoice_latexaddresssep',
1295     'section'     => 'invoicing',
1296     'description' => 'Optional LaTeX invoice separation between invoice header
1297 and customer address. Include units.',
1298     'type'        => 'text',
1299     'per_agent'   => 1,
1300     'validate'    => sub { shift =~
1301                              /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1302                              ? '' : 'Invalid LaTex length';
1303                          },
1304   },
1305
1306   {
1307     'key'         => 'invoice_latextextheight',
1308     'section'     => 'invoicing',
1309     'description' => 'Optional LaTeX invoice textheight setting. Include units.',
1310     'type'        => 'text',
1311     'per_agent'   => 1,
1312     'validate'    => sub { shift =~
1313                              /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1314                              ? '' : 'Invalid LaTex length';
1315                          },
1316   },
1317
1318   {
1319     'key'         => 'invoice_latexnotes',
1320     'section'     => 'invoicing',
1321     'description' => 'Notes section for LaTeX typeset PostScript invoices.',
1322     'type'        => 'textarea',
1323     'per_agent'   => 1,
1324     'per_locale'  => 1,
1325   },
1326
1327   {
1328     'key'         => 'quotation_latexnotes',
1329     'section'     => '',
1330     'description' => 'Notes section for LaTeX typeset PostScript quotations.',
1331     'type'        => 'textarea',
1332     'per_agent'   => 1,
1333     'per_locale'  => 1,
1334   },
1335
1336   {
1337     'key'         => 'invoice_latexfooter',
1338     'section'     => 'invoicing',
1339     'description' => 'Footer for LaTeX typeset PostScript invoices.',
1340     'type'        => 'textarea',
1341     'per_agent'   => 1,
1342     'per_locale'  => 1,
1343   },
1344
1345   {
1346     'key'         => 'invoice_latexsummary',
1347     'section'     => 'invoicing',
1348     'description' => 'Summary initial page for LaTeX typeset PostScript invoices.',
1349     'type'        => 'textarea',
1350     'per_agent'   => 1,
1351     'per_locale'  => 1,
1352   },
1353
1354   {
1355     'key'         => 'invoice_latexcoupon',
1356     'section'     => 'invoicing',
1357     'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.',
1358     'type'        => 'textarea',
1359     'per_agent'   => 1,
1360     'per_locale'  => 1,
1361   },
1362
1363   {
1364     'key'         => 'invoice_latexextracouponspace',
1365     'section'     => 'invoicing',
1366     'description' => 'Optional LaTeX invoice textheight space to reserve for a tear off coupon.  Include units.  Default is 3.6cm',
1367     'type'        => 'text',
1368     'per_agent'   => 1,
1369     'validate'    => sub { shift =~
1370                              /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1371                              ? '' : 'Invalid LaTex length';
1372                          },
1373   },
1374
1375   {
1376     'key'         => 'invoice_latexcouponfootsep',
1377     'section'     => 'invoicing',
1378     'description' => 'Optional LaTeX invoice separation between tear off coupon and footer. Include units.',
1379     'type'        => 'text',
1380     'per_agent'   => 1,
1381     'validate'    => sub { shift =~
1382                              /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1383                              ? '' : 'Invalid LaTex length';
1384                          },
1385   },
1386
1387   {
1388     'key'         => 'invoice_latexcouponamountenclosedsep',
1389     'section'     => 'invoicing',
1390     'description' => 'Optional LaTeX invoice separation between total due and amount enclosed line. Include units.',
1391     'type'        => 'text',
1392     'per_agent'   => 1,
1393     'validate'    => sub { shift =~
1394                              /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1395                              ? '' : 'Invalid LaTex length';
1396                          },
1397   },
1398   {
1399     'key'         => 'invoice_latexcoupontoaddresssep',
1400     'section'     => 'invoicing',
1401     'description' => 'Optional LaTeX invoice separation between invoice data and the to address (usually invoice_latexreturnaddress).  Include units.',
1402     'type'        => 'text',
1403     'per_agent'   => 1,
1404     'validate'    => sub { shift =~
1405                              /^-?\d*\.?\d+(in|mm|cm|pt|em|ex|pc|bp|dd|cc|sp)$/
1406                              ? '' : 'Invalid LaTex length';
1407                          },
1408   },
1409
1410   {
1411     'key'         => 'invoice_latexreturnaddress',
1412     'section'     => 'invoicing',
1413     'description' => 'Return address for LaTeX typeset PostScript invoices.',
1414     'type'        => 'textarea',
1415   },
1416
1417   {
1418     'key'         => 'invoice_latexverticalreturnaddress',
1419     'section'     => 'invoicing',
1420     'description' => 'Place the return address under the company logo rather than beside it.',
1421     'type'        => 'checkbox',
1422     'per_agent'   => 1,
1423   },
1424
1425   {
1426     'key'         => 'invoice_latexcouponaddcompanytoaddress',
1427     'section'     => 'invoicing',
1428     'description' => 'Add the company name to the To address on the remittance coupon because the return address does not contain it.',
1429     'type'        => 'checkbox',
1430     'per_agent'   => 1,
1431   },
1432
1433   {
1434     'key'         => 'invoice_latexsmallfooter',
1435     'section'     => 'invoicing',
1436     'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',
1437     'type'        => 'textarea',
1438     'per_agent'   => 1,
1439     'per_locale'  => 1,
1440   },
1441
1442   {
1443     'key'         => 'invoice_email_pdf',
1444     'section'     => 'invoicing',
1445     'description' => 'Send PDF invoice as an attachment to emailed invoices.  By default, includes the plain text invoice as the email body, unless invoice_email_pdf_note is set.',
1446     'type'        => 'checkbox'
1447   },
1448
1449   {
1450     'key'         => 'invoice_email_pdf_note',
1451     'section'     => 'invoicing',
1452     'description' => 'If defined, this text will replace the default plain text invoice as the body of emailed PDF invoices.',
1453     'type'        => 'textarea'
1454   },
1455
1456   {
1457     'key'         => 'invoice_print_pdf',
1458     'section'     => 'invoicing',
1459     'description' => 'For all invoice print operations, store postal invoices for download in PDF format rather than printing them directly.',
1460     'type'        => 'checkbox',
1461   },
1462
1463   {
1464     'key'         => 'invoice_print_pdf-spoolagent',
1465     'section'     => 'invoicing',
1466     'description' => 'Store postal invoices PDF downloads in per-agent spools.',
1467     'type'        => 'checkbox',
1468   },
1469
1470   { 
1471     'key'         => 'invoice_default_terms',
1472     'section'     => 'invoicing',
1473     'description' => 'Optional default invoice term, used to calculate a due date printed on invoices.',
1474     'type'        => 'select',
1475     'select_enum' => [ '', 'Payable upon receipt', 'Net 0', 'Net 3', 'Net 9', 'Net 10', 'Net 15', 'Net 20', 'Net 21', 'Net 30', 'Net 45', 'Net 60', 'Net 90' ],
1476   },
1477
1478   { 
1479     'key'         => 'invoice_show_prior_due_date',
1480     'section'     => 'invoicing',
1481     'description' => 'Show previous invoice due dates when showing prior balances.  Default is to show invoice date.',
1482     'type'        => 'checkbox',
1483   },
1484
1485   { 
1486     'key'         => 'invoice_include_aging',
1487     'section'     => 'invoicing',
1488     'description' => 'Show an aging line after the prior balance section.  Only valud when invoice_sections is enabled.',
1489     'type'        => 'checkbox',
1490   },
1491
1492   { 
1493     'key'         => 'invoice_sections',
1494     'section'     => 'invoicing',
1495     'description' => 'Split invoice into sections and label according to package category when enabled.',
1496     'type'        => 'checkbox',
1497   },
1498
1499   { 
1500     'key'         => 'usage_class_as_a_section',
1501     'section'     => 'invoicing',
1502     'description' => 'Split usage into sections and label according to usage class name when enabled.  Only valid when invoice_sections is enabled.',
1503     'type'        => 'checkbox',
1504   },
1505
1506   { 
1507     'key'         => 'phone_usage_class_summary',
1508     'section'     => 'invoicing',
1509     'description' => 'Summarize usage per DID by usage class and display all CDRs together regardless of usage class. Only valid when svc_phone_sections is enabled.',
1510     'type'        => 'checkbox',
1511   },
1512
1513   { 
1514     'key'         => 'svc_phone_sections',
1515     'section'     => 'invoicing',
1516     'description' => 'Create a section for each svc_phone when enabled.  Only valid when invoice_sections is enabled.',
1517     'type'        => 'checkbox',
1518   },
1519
1520   {
1521     'key'         => 'finance_pkgclass',
1522     'section'     => 'billing',
1523     'description' => 'The default package class for late fee charges, used if the fee event does not specify a package class itself.',
1524     'type'        => 'select-pkg_class',
1525   },
1526
1527   { 
1528     'key'         => 'separate_usage',
1529     'section'     => 'invoicing',
1530     'description' => 'Split the rated call usage into a separate line from the recurring charges.',
1531     'type'        => 'checkbox',
1532   },
1533
1534   {
1535     'key'         => 'invoice_send_receipts',
1536     'section'     => 'deprecated',
1537     'description' => '<b>DEPRECATED</b>, this used to send an invoice copy on payments and credits.  See the payment_receipt_email and XXXX instead.',
1538     'type'        => 'checkbox',
1539   },
1540
1541   {
1542     'key'         => 'payment_receipt',
1543     'section'     => 'notification',
1544     'description' => 'Send payment receipts.',
1545     'type'        => 'checkbox',
1546     'per_agent'   => 1,
1547     'agent_bool'  => 1,
1548   },
1549
1550   {
1551     'key'         => 'payment_receipt_msgnum',
1552     'section'     => 'notification',
1553     'description' => 'Template to use for payment receipts.',
1554     %msg_template_options,
1555   },
1556   
1557   {
1558     'key'         => 'payment_receipt_from',
1559     'section'     => 'notification',
1560     'description' => 'From: address for payment receipts, if not specified in the template.',
1561     'type'        => 'text',
1562     'per_agent'   => 1,
1563   },
1564
1565   {
1566     'key'         => 'payment_receipt_email',
1567     'section'     => 'deprecated',
1568     'description' => 'Template file for payment receipts.  Payment receipts are sent to the customer email invoice destination(s) when a payment is received.',
1569     'type'        => [qw( checkbox textarea )],
1570   },
1571
1572   {
1573     'key'         => 'payment_receipt-trigger',
1574     'section'     => 'notification',
1575     'description' => 'When payment receipts are triggered.  Defaults to when payment is made.',
1576     'type'        => 'select',
1577     'select_hash' => [
1578                        'cust_pay'          => 'When payment is made.',
1579                        'cust_bill_pay_pkg' => 'When payment is applied.',
1580                      ],
1581     'per_agent'   => 1,
1582   },
1583
1584   {
1585     'key'         => 'trigger_export_insert_on_payment',
1586     'section'     => 'billing',
1587     'description' => 'Enable exports on payment application.',
1588     'type'        => 'checkbox',
1589   },
1590
1591   {
1592     'key'         => 'lpr',
1593     'section'     => 'required',
1594     'description' => 'Print command for paper invoices, for example `lpr -h\'',
1595     'type'        => 'text',
1596   },
1597
1598   {
1599     'key'         => 'lpr-postscript_prefix',
1600     'section'     => 'billing',
1601     'description' => 'Raw printer commands prepended to the beginning of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
1602     'type'        => 'text',
1603   },
1604
1605   {
1606     'key'         => 'lpr-postscript_suffix',
1607     'section'     => 'billing',
1608     'description' => 'Raw printer commands added to the end of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
1609     'type'        => 'text',
1610   },
1611
1612   {
1613     'key'         => 'money_char',
1614     'section'     => '',
1615     'description' => 'Currency symbol - defaults to `$\'',
1616     'type'        => 'text',
1617   },
1618
1619   {
1620     'key'         => 'defaultrecords',
1621     'section'     => 'BIND',
1622     'description' => 'DNS entries to add automatically when creating a domain',
1623     'type'        => 'editlist',
1624     'editlist_parts' => [ { type=>'text' },
1625                           { type=>'immutable', value=>'IN' },
1626                           { type=>'select',
1627                             select_enum => {
1628                               map { $_=>$_ }
1629                                   #@{ FS::domain_record->rectypes }
1630                                   qw(A AAAA CNAME MX NS PTR SPF SRV TXT)
1631                             },
1632                           },
1633                           { type=> 'text' }, ],
1634   },
1635
1636   {
1637     'key'         => 'passwordmin',
1638     'section'     => 'password',
1639     'description' => 'Minimum password length (default 6)',
1640     'type'        => 'text',
1641   },
1642
1643   {
1644     'key'         => 'passwordmax',
1645     'section'     => 'password',
1646     'description' => 'Maximum password length (default 8) (don\'t set this over 12 if you need to import or export crypt() passwords)',
1647     'type'        => 'text',
1648   },
1649
1650   {
1651     'key'         => 'password-noampersand',
1652     'section'     => 'password',
1653     'description' => 'Disallow ampersands in passwords',
1654     'type'        => 'checkbox',
1655   },
1656
1657   {
1658     'key'         => 'password-noexclamation',
1659     'section'     => 'password',
1660     'description' => 'Disallow exclamations in passwords (Not setting this could break old text Livingston or Cistron Radius servers)',
1661     'type'        => 'checkbox',
1662   },
1663
1664   {
1665     'key'         => 'default-password-encoding',
1666     'section'     => 'password',
1667     'description' => 'Default storage format for passwords',
1668     'type'        => 'select',
1669     'select_hash' => [
1670       'plain'       => 'Plain text',
1671       'crypt-des'   => 'Unix password (DES encrypted)',
1672       'crypt-md5'   => 'Unix password (MD5 digest)',
1673       'ldap-plain'  => 'LDAP (plain text)',
1674       'ldap-crypt'  => 'LDAP (DES encrypted)',
1675       'ldap-md5'    => 'LDAP (MD5 digest)',
1676       'ldap-sha1'   => 'LDAP (SHA1 digest)',
1677       'legacy'      => 'Legacy mode',
1678     ],
1679   },
1680
1681   {
1682     'key'         => 'referraldefault',
1683     'section'     => 'UI',
1684     'description' => 'Default referral, specified by refnum',
1685     'type'        => 'select-sub',
1686     'options_sub' => sub { require FS::Record;
1687                            require FS::part_referral;
1688                            map { $_->refnum => $_->referral }
1689                                FS::Record::qsearch( 'part_referral', 
1690                                                     { 'disabled' => '' }
1691                                                   );
1692                          },
1693     'option_sub'  => sub { require FS::Record;
1694                            require FS::part_referral;
1695                            my $part_referral = FS::Record::qsearchs(
1696                              'part_referral', { 'refnum'=>shift } );
1697                            $part_referral ? $part_referral->referral : '';
1698                          },
1699   },
1700
1701 #  {
1702 #    'key'         => 'registries',
1703 #    'section'     => 'required',
1704 #    'description' => 'Directory which contains domain registry information.  Each registry is a directory.',
1705 #  },
1706
1707   {
1708     'key'         => 'report_template',
1709     'section'     => 'deprecated',
1710     'description' => 'Deprecated template file for reports.',
1711     'type'        => 'textarea',
1712   },
1713
1714   {
1715     'key'         => 'maxsearchrecordsperpage',
1716     'section'     => 'UI',
1717     'description' => 'If set, number of search records to return per page.',
1718     'type'        => 'text',
1719   },
1720
1721   {
1722     'key'         => 'disable_maxselect',
1723     'section'     => 'UI',
1724     'description' => 'Prevent changing the number of records per page.',
1725     'type'        => 'checkbox',
1726   },
1727
1728   {
1729     'key'         => 'session-start',
1730     'section'     => 'session',
1731     'description' => 'If defined, 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.',
1732     'type'        => 'text',
1733   },
1734
1735   {
1736     'key'         => 'session-stop',
1737     'section'     => 'session',
1738     'description' => 'If defined, 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.',
1739     'type'        => 'text',
1740   },
1741
1742   {
1743     'key'         => 'shells',
1744     'section'     => 'shell',
1745     '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.',
1746     'type'        => 'textarea',
1747   },
1748
1749   {
1750     'key'         => 'showpasswords',
1751     'section'     => 'UI',
1752     'description' => 'Display unencrypted user passwords in the backend (employee) web interface',
1753     'type'        => 'checkbox',
1754   },
1755
1756   {
1757     'key'         => 'report-showpasswords',
1758     'section'     => 'UI',
1759     'description' => 'This is a terrible idea.  Do not enable it.  STRONGLY NOT RECOMMENDED.  Enables display of passwords on services reports.',
1760     'type'        => 'checkbox',
1761   },
1762
1763   {
1764     'key'         => 'signupurl',
1765     'section'     => 'UI',
1766     '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:2.1:Documentation:Self-Service_Installation">signup server CGI</a>, the customer view screen will display a customized link to the signup server with the appropriate customer as referral',
1767     'type'        => 'text',
1768   },
1769
1770   {
1771     'key'         => 'smtpmachine',
1772     'section'     => 'required',
1773     'description' => 'SMTP relay for Freeside\'s outgoing mail',
1774     'type'        => 'text',
1775   },
1776
1777   {
1778     'key'         => 'smtp-username',
1779     'section'     => '',
1780     'description' => 'Optional SMTP username for Freeside\'s outgoing mail',
1781     'type'        => 'text',
1782   },
1783
1784   {
1785     'key'         => 'smtp-password',
1786     'section'     => '',
1787     'description' => 'Optional SMTP password for Freeside\'s outgoing mail',
1788     'type'        => 'text',
1789   },
1790
1791   {
1792     'key'         => 'smtp-encryption',
1793     'section'     => '',
1794     'description' => 'Optional SMTP encryption method.  The STARTTLS methods require smtp-username and smtp-password to be set.',
1795     'type'        => 'select',
1796     'select_hash' => [ '25'           => 'None (port 25)',
1797                        '25-starttls'  => 'STARTTLS (port 25)',
1798                        '587-starttls' => 'STARTTLS / submission (port 587)',
1799                        '465-tls'      => 'SMTPS (SSL) (port 465)',
1800                      ],
1801   },
1802
1803   {
1804     'key'         => 'soadefaultttl',
1805     'section'     => 'BIND',
1806     'description' => 'SOA default TTL for new domains.',
1807     'type'        => 'text',
1808   },
1809
1810   {
1811     'key'         => 'soaemail',
1812     'section'     => 'BIND',
1813     'description' => 'SOA email for new domains, in BIND form (`.\' instead of `@\'), with trailing `.\'',
1814     'type'        => 'text',
1815   },
1816
1817   {
1818     'key'         => 'soaexpire',
1819     'section'     => 'BIND',
1820     'description' => 'SOA expire for new domains',
1821     'type'        => 'text',
1822   },
1823
1824   {
1825     'key'         => 'soamachine',
1826     'section'     => 'BIND',
1827     'description' => 'SOA machine for new domains, with trailing `.\'',
1828     'type'        => 'text',
1829   },
1830
1831   {
1832     'key'         => 'soarefresh',
1833     'section'     => 'BIND',
1834     'description' => 'SOA refresh for new domains',
1835     'type'        => 'text',
1836   },
1837
1838   {
1839     'key'         => 'soaretry',
1840     'section'     => 'BIND',
1841     'description' => 'SOA retry for new domains',
1842     'type'        => 'text',
1843   },
1844
1845   {
1846     'key'         => 'statedefault',
1847     'section'     => 'UI',
1848     'description' => 'Default state or province (if not supplied, the default is `CA\')',
1849     'type'        => 'text',
1850   },
1851
1852   {
1853     'key'         => 'unsuspendauto',
1854     'section'     => 'billing',
1855     'description' => 'Enables the automatic unsuspension of suspended packages when a customer\'s balance due changes from positive to zero or negative as the result of a payment or credit',
1856     'type'        => 'checkbox',
1857   },
1858
1859   {
1860     'key'         => 'unsuspend-always_adjust_next_bill_date',
1861     'section'     => 'billing',
1862     '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.',
1863     'type'        => 'checkbox',
1864   },
1865
1866   {
1867     'key'         => 'usernamemin',
1868     'section'     => 'username',
1869     'description' => 'Minimum username length (default 2)',
1870     'type'        => 'text',
1871   },
1872
1873   {
1874     'key'         => 'usernamemax',
1875     'section'     => 'username',
1876     'description' => 'Maximum username length',
1877     'type'        => 'text',
1878   },
1879
1880   {
1881     'key'         => 'username-ampersand',
1882     'section'     => 'username',
1883     'description' => 'Allow the ampersand character (&amp;) 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.',
1884     'type'        => 'checkbox',
1885   },
1886
1887   {
1888     'key'         => 'username-letter',
1889     'section'     => 'username',
1890     'description' => 'Usernames must contain at least one letter',
1891     'type'        => 'checkbox',
1892     'per_agent'   => 1,
1893   },
1894
1895   {
1896     'key'         => 'username-letterfirst',
1897     'section'     => 'username',
1898     'description' => 'Usernames must start with a letter',
1899     'type'        => 'checkbox',
1900   },
1901
1902   {
1903     'key'         => 'username-noperiod',
1904     'section'     => 'username',
1905     'description' => 'Disallow periods in usernames',
1906     'type'        => 'checkbox',
1907   },
1908
1909   {
1910     'key'         => 'username-nounderscore',
1911     'section'     => 'username',
1912     'description' => 'Disallow underscores in usernames',
1913     'type'        => 'checkbox',
1914   },
1915
1916   {
1917     'key'         => 'username-nodash',
1918     'section'     => 'username',
1919     'description' => 'Disallow dashes in usernames',
1920     'type'        => 'checkbox',
1921   },
1922
1923   {
1924     'key'         => 'username-uppercase',
1925     'section'     => 'username',
1926     'description' => 'Allow uppercase characters in usernames.  Not recommended for use with FreeRADIUS with MySQL backend, which is case-insensitive by default.',
1927     'type'        => 'checkbox',
1928     'per_agent'   => 1,
1929   },
1930
1931   { 
1932     'key'         => 'username-percent',
1933     'section'     => 'username',
1934     'description' => 'Allow the percent character (%) in usernames.',
1935     'type'        => 'checkbox',
1936   },
1937
1938   { 
1939     'key'         => 'username-colon',
1940     'section'     => 'username',
1941     'description' => 'Allow the colon character (:) in usernames.',
1942     'type'        => 'checkbox',
1943   },
1944
1945   { 
1946     'key'         => 'username-slash',
1947     'section'     => 'username',
1948     '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.',
1949     'type'        => 'checkbox',
1950   },
1951
1952   { 
1953     'key'         => 'username-equals',
1954     'section'     => 'username',
1955     'description' => 'Allow the equal sign character (=) in usernames.',
1956     'type'        => 'checkbox',
1957   },
1958
1959   {
1960     'key'         => 'safe-part_bill_event',
1961     'section'     => 'UI',
1962     'description' => 'Validates invoice event expressions against a preset list.  Useful for webdemos, annoying to powerusers.',
1963     'type'        => 'checkbox',
1964   },
1965
1966   {
1967     'key'         => 'show_ss',
1968     'section'     => 'UI',
1969     'description' => 'Turns on display/collection of social security numbers in the web interface.  Sometimes required by electronic check (ACH) processors.',
1970     'type'        => 'checkbox',
1971   },
1972
1973   {
1974     'key'         => 'unmask_ss',
1975     'section'     => 'UI',
1976     'description' => "Don't mask social security numbers in the web interface.",
1977     'type'        => 'checkbox',
1978   },
1979
1980   {
1981     'key'         => 'show_stateid',
1982     'section'     => 'UI',
1983     'description' => "Turns on display/collection of driver's license/state issued id numbers in the web interface.  Sometimes required by electronic check (ACH) processors.",
1984     'type'        => 'checkbox',
1985   },
1986
1987   {
1988     'key'         => 'national_id-country',
1989     'section'     => 'UI',
1990     'description' => 'Track a national identification number, for specific countries.',
1991     'type'        => 'select',
1992     'select_enum' => [ '', 'MY' ],
1993   },
1994
1995   {
1996     'key'         => 'show_bankstate',
1997     'section'     => 'UI',
1998     'description' => "Turns on display/collection of state for bank accounts in the web interface.  Sometimes required by electronic check (ACH) processors.",
1999     'type'        => 'checkbox',
2000   },
2001
2002   { 
2003     'key'         => 'agent_defaultpkg',
2004     'section'     => 'UI',
2005     'description' => 'Setting this option will cause new packages to be available to all agent types by default.',
2006     'type'        => 'checkbox',
2007   },
2008
2009   {
2010     'key'         => 'legacy_link',
2011     'section'     => 'UI',
2012     'description' => 'Display options in the web interface to link legacy pre-Freeside services.',
2013     'type'        => 'checkbox',
2014   },
2015
2016   {
2017     'key'         => 'legacy_link-steal',
2018     'section'     => 'UI',
2019     'description' => 'Allow "stealing" an already-audited service from one customer (or package) to another using the link function.',
2020     'type'        => 'checkbox',
2021   },
2022
2023   {
2024     'key'         => 'queue_dangerous_controls',
2025     'section'     => 'UI',
2026     '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.',
2027     'type'        => 'checkbox',
2028   },
2029
2030   {
2031     'key'         => 'security_phrase',
2032     'section'     => 'password',
2033     'description' => 'Enable the tracking of a "security phrase" with each account.  Not recommended, as it is vulnerable to social engineering.',
2034     'type'        => 'checkbox',
2035   },
2036
2037   {
2038     'key'         => 'locale',
2039     'section'     => 'UI',
2040     'description' => 'Default locale',
2041     'type'        => 'select',
2042     'options_sub' => sub {
2043       map { $_ => FS::Locales->description($_) } FS::Locales->locales;
2044     },
2045     'option_sub'  => sub {
2046       FS::Locales->description(shift)
2047     },
2048   },
2049
2050   {
2051     'key'         => 'signup_server-payby',
2052     'section'     => 'self-service',
2053     'description' => 'Acceptable payment types for the signup server',
2054     'type'        => 'selectmultiple',
2055     'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB PREPAY BILL COMP) ],
2056   },
2057
2058   {
2059     'key'         => 'selfservice-payment_gateway',
2060     'section'     => 'self-service',
2061     'description' => 'Force the use of this payment gateway for self-service.',
2062     %payment_gateway_options,
2063   },
2064
2065   {
2066     'key'         => 'selfservice-save_unchecked',
2067     'section'     => 'self-service',
2068     'description' => 'In self-service, uncheck "Remember information" checkboxes by default (normally, they are checked by default).',
2069     'type'        => 'checkbox',
2070   },
2071
2072   {
2073     'key'         => 'default_agentnum',
2074     'section'     => 'UI',
2075     'description' => 'Default agent for the backoffice',
2076     'type'        => 'select-agent',
2077   },
2078
2079   {
2080     'key'         => 'signup_server-default_agentnum',
2081     'section'     => 'self-service',
2082     'description' => 'Default agent for the signup server',
2083     'type'        => 'select-agent',
2084   },
2085
2086   {
2087     'key'         => 'signup_server-default_refnum',
2088     'section'     => 'self-service',
2089     'description' => 'Default advertising source for the signup server',
2090     'type'        => 'select-sub',
2091     'options_sub' => sub { require FS::Record;
2092                            require FS::part_referral;
2093                            map { $_->refnum => $_->referral }
2094                                FS::Record::qsearch( 'part_referral', 
2095                                                     { 'disabled' => '' }
2096                                                   );
2097                          },
2098     'option_sub'  => sub { require FS::Record;
2099                            require FS::part_referral;
2100                            my $part_referral = FS::Record::qsearchs(
2101                              'part_referral', { 'refnum'=>shift } );
2102                            $part_referral ? $part_referral->referral : '';
2103                          },
2104   },
2105
2106   {
2107     'key'         => 'signup_server-default_pkgpart',
2108     'section'     => 'self-service',
2109     'description' => 'Default package for the signup server',
2110     'type'        => 'select-part_pkg',
2111   },
2112
2113   {
2114     'key'         => 'signup_server-default_svcpart',
2115     'section'     => 'self-service',
2116     'description' => 'Default service definition for the signup server - only necessary for services that trigger special provisioning widgets (such as DID provisioning).',
2117     'type'        => 'select-part_svc',
2118   },
2119
2120   {
2121     'key'         => 'signup_server-mac_addr_svcparts',
2122     'section'     => 'self-service',
2123     'description' => 'Service definitions which can receive mac addresses (current mapped to username for svc_acct).',
2124     'type'        => 'select-part_svc',
2125     'multiple'    => 1,
2126   },
2127
2128   {
2129     'key'         => 'signup_server-nomadix',
2130     'section'     => 'self-service',
2131     'description' => 'Signup page Nomadix integration',
2132     'type'        => 'checkbox',
2133   },
2134
2135   {
2136     'key'         => 'signup_server-service',
2137     'section'     => 'self-service',
2138     'description' => 'Service for the signup server - "Account (svc_acct)" is the default setting, or "Phone number (svc_phone)" for ITSP signup',
2139     'type'        => 'select',
2140     'select_hash' => [
2141                        'svc_acct'  => 'Account (svc_acct)',
2142                        'svc_phone' => 'Phone number (svc_phone)',
2143                        'svc_pbx'   => 'PBX (svc_pbx)',
2144                      ],
2145   },
2146   
2147   {
2148     'key'         => 'signup_server-prepaid-template-custnum',
2149     'section'     => 'self-service',
2150     'description' => 'When the signup server 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',
2151     'type'        => 'text',
2152   },
2153
2154   {
2155     'key'         => 'signup_server-terms_of_service',
2156     'section'     => 'self-service',
2157     'description' => 'Terms of Service for the signup server.  May contain HTML.',
2158     'type'        => 'textarea',
2159     'per_agent'   => 1,
2160   },
2161
2162   {
2163     'key'         => 'selfservice_server-base_url',
2164     'section'     => 'self-service',
2165     '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.',
2166     'type'        => 'text',
2167   },
2168
2169   {
2170     'key'         => 'show-msgcat-codes',
2171     'section'     => 'UI',
2172     'description' => 'Show msgcat codes in error messages.  Turn this option on before reporting errors to the mailing list.',
2173     'type'        => 'checkbox',
2174   },
2175
2176   {
2177     'key'         => 'signup_server-realtime',
2178     'section'     => 'self-service',
2179     'description' => 'Run billing for signup server signups immediately, and do not provision accounts which subsequently have a balance.',
2180     'type'        => 'checkbox',
2181   },
2182
2183   {
2184     'key'         => 'signup_server-classnum2',
2185     'section'     => 'self-service',
2186     'description' => 'Package Class for first optional purchase',
2187     'type'        => 'select-pkg_class',
2188   },
2189
2190   {
2191     'key'         => 'signup_server-classnum3',
2192     'section'     => 'self-service',
2193     'description' => 'Package Class for second optional purchase',
2194     'type'        => 'select-pkg_class',
2195   },
2196
2197   {
2198     'key'         => 'signup_server-third_party_as_card',
2199     'section'     => 'self-service',
2200     'description' => 'Allow customer payment type to be set to CARD even when using third-party credit card billing.',
2201     'type'        => 'checkbox',
2202   },
2203
2204   {
2205     'key'         => 'selfservice-xmlrpc',
2206     'section'     => 'self-service',
2207     'description' => 'Run a standalone self-service XML-RPC server on the backend (on port 8080).',
2208     'type'        => 'checkbox',
2209   },
2210
2211   {
2212     'key'         => 'backend-realtime',
2213     'section'     => 'billing',
2214     'description' => 'Run billing for backend signups immediately.',
2215     'type'        => 'checkbox',
2216   },
2217
2218   {
2219     'key'         => 'decline_msgnum',
2220     'section'     => 'notification',
2221     'description' => 'Template to use for credit card and electronic check decline messages.',
2222     %msg_template_options,
2223   },
2224
2225   {
2226     'key'         => 'declinetemplate',
2227     'section'     => 'deprecated',
2228     'description' => 'Template file for credit card and electronic check decline emails.',
2229     'type'        => 'textarea',
2230   },
2231
2232   {
2233     'key'         => 'emaildecline',
2234     'section'     => 'notification',
2235     'description' => 'Enable emailing of credit card and electronic check decline notices.',
2236     'type'        => 'checkbox',
2237     'per_agent'   => 1,
2238   },
2239
2240   {
2241     'key'         => 'emaildecline-exclude',
2242     'section'     => 'notification',
2243     'description' => 'List of error messages that should not trigger email decline notices, one per line.',
2244     'type'        => 'textarea',
2245     'per_agent'   => 1,
2246   },
2247
2248   {
2249     'key'         => 'cancel_msgnum',
2250     'section'     => 'notification',
2251     'description' => 'Template to use for cancellation emails.',
2252     %msg_template_options,
2253   },
2254
2255   {
2256     'key'         => 'cancelmessage',
2257     'section'     => 'deprecated',
2258     'description' => 'Template file for cancellation emails.',
2259     'type'        => 'textarea',
2260   },
2261
2262   {
2263     'key'         => 'cancelsubject',
2264     'section'     => 'deprecated',
2265     'description' => 'Subject line for cancellation emails.',
2266     'type'        => 'text',
2267   },
2268
2269   {
2270     'key'         => 'emailcancel',
2271     'section'     => 'notification',
2272     'description' => 'Enable emailing of cancellation notices.  Make sure to select the template in the cancel_msgnum option.',
2273     'type'        => 'checkbox',
2274     'per_agent'   => 1,
2275   },
2276
2277   {
2278     'key'         => 'bill_usage_on_cancel',
2279     'section'     => 'billing',
2280     '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.',
2281     'type'        => 'checkbox',
2282   },
2283
2284   {
2285     'key'         => 'require_cardname',
2286     'section'     => 'billing',
2287     'description' => 'Require an "Exact name on card" to be entered explicitly; don\'t default to using the first and last name.',
2288     'type'        => 'checkbox',
2289   },
2290
2291   {
2292     'key'         => 'enable_taxclasses',
2293     'section'     => 'billing',
2294     'description' => 'Enable per-package tax classes',
2295     'type'        => 'checkbox',
2296   },
2297
2298   {
2299     'key'         => 'require_taxclasses',
2300     'section'     => 'billing',
2301     'description' => 'Require a taxclass to be entered for every package',
2302     'type'        => 'checkbox',
2303   },
2304
2305   {
2306     'key'         => 'enable_taxproducts',
2307     'section'     => 'billing',
2308     'description' => 'Enable per-package mapping to vendor tax data from CCH or elsewhere.',
2309     'type'        => 'checkbox',
2310   },
2311
2312   {
2313     'key'         => 'taxdatadirectdownload',
2314     'section'     => 'billing',  #well
2315     'description' => 'Enable downloading tax data directly from the vendor site. at least three lines: URL, username, and password.j',
2316     'type'        => 'textarea',
2317   },
2318
2319   {
2320     'key'         => 'ignore_incalculable_taxes',
2321     'section'     => 'billing',
2322     'description' => 'Prefer to invoice without tax over not billing at all',
2323     'type'        => 'checkbox',
2324   },
2325
2326   {
2327     'key'         => 'welcome_msgnum',
2328     'section'     => 'notification',
2329     'description' => 'Template to use for welcome messages when a svc_acct record is created.',
2330     %msg_template_options,
2331   },
2332   
2333   {
2334     'key'         => 'svc_acct_welcome_exclude',
2335     'section'     => 'notification',
2336     'description' => 'A list of svc_acct services for which no welcome email is to be sent.',
2337     'type'        => 'select-part_svc',
2338     'multiple'    => 1,
2339   },
2340
2341   {
2342     'key'         => 'welcome_email',
2343     'section'     => 'deprecated',
2344     'description' => 'Template file for welcome email.  Welcome emails are sent to the customer email invoice destination(s) each time a svc_acct record is created.',
2345     'type'        => 'textarea',
2346     'per_agent'   => 1,
2347   },
2348
2349   {
2350     'key'         => 'welcome_email-from',
2351     'section'     => 'deprecated',
2352     'description' => 'From: address header for welcome email',
2353     'type'        => 'text',
2354     'per_agent'   => 1,
2355   },
2356
2357   {
2358     'key'         => 'welcome_email-subject',
2359     'section'     => 'deprecated',
2360     'description' => 'Subject: header for welcome email',
2361     'type'        => 'text',
2362     'per_agent'   => 1,
2363   },
2364   
2365   {
2366     'key'         => 'welcome_email-mimetype',
2367     'section'     => 'deprecated',
2368     'description' => 'MIME type for welcome email',
2369     'type'        => 'select',
2370     'select_enum' => [ 'text/plain', 'text/html' ],
2371     'per_agent'   => 1,
2372   },
2373
2374   {
2375     'key'         => 'welcome_letter',
2376     'section'     => '',
2377     '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>',
2378     'type'        => 'textarea',
2379   },
2380
2381 #  {
2382 #    'key'         => 'warning_msgnum',
2383 #    'section'     => 'notification',
2384 #    '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.',
2385 #    %msg_template_options,
2386 #  },
2387
2388   {
2389     'key'         => 'warning_email',
2390     'section'     => 'notification',
2391     'description' => 'Template file for warning email.  Warning emails are sent to the customer email invoice destination(s) each time a svc_acct record has its usage drop below a threshold or 0.  See the <a href="http://search.cpan.org/dist/Text-Template/lib/Text/Template.pm">Text::Template</a> documentation for details on the template substitution language.  The following variables are available<ul><li><code>$username</code> <li><code>$password</code> <li><code>$first</code> <li><code>$last</code> <li><code>$pkg</code> <li><code>$column</code> <li><code>$amount</code> <li><code>$threshold</code></ul>',
2392     'type'        => 'textarea',
2393   },
2394
2395   {
2396     'key'         => 'warning_email-from',
2397     'section'     => 'notification',
2398     'description' => 'From: address header for warning email',
2399     'type'        => 'text',
2400   },
2401
2402   {
2403     'key'         => 'warning_email-cc',
2404     'section'     => 'notification',
2405     'description' => 'Additional recipient(s) (comma separated) for warning email when remaining usage reaches zero.',
2406     'type'        => 'text',
2407   },
2408
2409   {
2410     'key'         => 'warning_email-subject',
2411     'section'     => 'notification',
2412     'description' => 'Subject: header for warning email',
2413     'type'        => 'text',
2414   },
2415   
2416   {
2417     'key'         => 'warning_email-mimetype',
2418     'section'     => 'notification',
2419     'description' => 'MIME type for warning email',
2420     'type'        => 'select',
2421     'select_enum' => [ 'text/plain', 'text/html' ],
2422   },
2423
2424   {
2425     'key'         => 'payby',
2426     'section'     => 'billing',
2427     'description' => 'Available payment types.',
2428     'type'        => 'selectmultiple',
2429     'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP) ],
2430   },
2431
2432   {
2433     'key'         => 'payby-default',
2434     'section'     => 'UI',
2435     'description' => 'Default payment type.  HIDE disables display of billing information and sets customers to BILL.',
2436     'type'        => 'select',
2437     'select_enum' => [ '', qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP HIDE) ],
2438   },
2439
2440   {
2441     'key'         => 'require_cash_deposit_info',
2442     'section'     => 'billing',
2443     'description' => 'When recording cash payments, display bank deposit information fields.',
2444     'type'        => 'checkbox',
2445   },
2446
2447   {
2448     'key'         => 'paymentforcedtobatch',
2449     'section'     => 'deprecated',
2450     'description' => 'See batch-enable_payby and realtime-disable_payby.  Used to (for CHEK): Cause per customer payment entry to be forced to a batch processor rather than performed realtime.',
2451     'type'        => 'checkbox',
2452   },
2453
2454   {
2455     'key'         => 'svc_acct-notes',
2456     'section'     => 'deprecated',
2457     'description' => 'Extra HTML to be displayed on the Account View screen.',
2458     'type'        => 'textarea',
2459   },
2460
2461   {
2462     'key'         => 'radius-password',
2463     'section'     => '',
2464     'description' => 'RADIUS attribute for plain-text passwords.',
2465     'type'        => 'select',
2466     'select_enum' => [ 'Password', 'User-Password', 'Cleartext-Password' ],
2467   },
2468
2469   {
2470     'key'         => 'radius-ip',
2471     'section'     => '',
2472     'description' => 'RADIUS attribute for IP addresses.',
2473     'type'        => 'select',
2474     'select_enum' => [ 'Framed-IP-Address', 'Framed-Address' ],
2475   },
2476
2477   #http://dev.coova.org/svn/coova-chilli/doc/dictionary.chillispot
2478   {
2479     'key'         => 'radius-chillispot-max',
2480     'section'     => '',
2481     'description' => 'Enable ChilliSpot (and CoovaChilli) Max attributes, specifically ChilliSpot-Max-{Input,Output,Total}-{Octets,Gigawords}.',
2482     'type'        => 'checkbox',
2483   },
2484
2485   {
2486     'key'         => 'svc_broadband-radius',
2487     'section'     => '',
2488     'description' => 'Enable RADIUS groups for broadband services.',
2489     'type'        => 'checkbox',
2490   },
2491
2492   {
2493     'key'         => 'svc_acct-alldomains',
2494     'section'     => '',
2495     '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.',
2496     'type'        => 'checkbox',
2497   },
2498
2499   {
2500     'key'         => 'dump-localdest',
2501     'section'     => '',
2502     'description' => 'Destination for local database dumps (full path)',
2503     'type'        => 'text',
2504   },
2505
2506   {
2507     'key'         => 'dump-scpdest',
2508     'section'     => '',
2509     'description' => 'Destination for scp database dumps: user@host:/path',
2510     'type'        => 'text',
2511   },
2512
2513   {
2514     'key'         => 'dump-pgpid',
2515     'section'     => '',
2516     '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.",
2517     'type'        => 'text',
2518   },
2519
2520   {
2521     'key'         => 'users-allow_comp',
2522     'section'     => 'deprecated',
2523     'description' => '<b>DEPRECATED</b>, enable the <i>Complimentary customer</i> access right instead.  Was: Usernames (Freeside users, created with <a href="../docs/man/bin/freeside-adduser.html">freeside-adduser</a>) which can create complimentary customers, one per line.  If no usernames are entered, all users can create complimentary accounts.',
2524     'type'        => 'textarea',
2525   },
2526
2527   {
2528     'key'         => 'credit_card-recurring_billing_flag',
2529     'section'     => 'billing',
2530     '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. ',
2531     'type'        => 'select',
2532     'select_hash' => [
2533                        'actual_oncard' => 'Default/classic behavior: set the flag if a customer has actual previous charges on the card.',
2534                        'transaction_is_recur' => 'Set the flag if the transaction itself is recurring, irregardless of previous charges on the card.',
2535                      ],
2536   },
2537
2538   {
2539     'key'         => 'credit_card-recurring_billing_acct_code',
2540     'section'     => 'billing',
2541     'description' => 'When the "recurring billing" flag is set, also set the "acct_code" to "rebill".  Useful for reporting purposes with supported gateways (PlugNPay, others?)',
2542     'type'        => 'checkbox',
2543   },
2544
2545   {
2546     'key'         => 'cvv-save',
2547     'section'     => 'billing',
2548     'description' => 'Save CVV2 information after the initial transaction for the selected credit card types.  Enabling this option may be in violation of your merchant agreement(s), so please check them carefully before enabling this option for any credit card types.',
2549     'type'        => 'selectmultiple',
2550     'select_enum' => \@card_types,
2551   },
2552
2553   {
2554     'key'         => 'manual_process-pkgpart',
2555     'section'     => 'billing',
2556     'description' => 'Package to add to each manual credit card and ACH payment entered by employees from the backend.  Enabling this option may be in violation of your merchant agreement(s), so please check it(/them) carefully before enabling this option.',
2557     'type'        => 'select-part_pkg',
2558     'per_agent'   => 1,
2559   },
2560
2561   {
2562     'key'         => 'manual_process-display',
2563     'section'     => 'billing',
2564     'description' => 'When using manual_process-pkgpart, add the fee to the amount entered (default), or subtract the fee from the amount entered.',
2565     'type'        => 'select',
2566     'select_hash' => [
2567                        'add'      => 'Add fee to amount entered',
2568                        'subtract' => 'Subtract fee from amount entered',
2569                      ],
2570   },
2571
2572   {
2573     'key'         => 'manual_process-skip_first',
2574     'section'     => 'billing',
2575     'description' => "When using manual_process-pkgpart, omit the fee if it is the customer's first payment.",
2576     'type'        => 'checkbox',
2577   },
2578
2579   {
2580     'key'         => 'selfservice_process-pkgpart',
2581     'section'     => 'billing',
2582     '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.',
2583     'type'        => 'select-part_pkg',
2584     'per_agent'   => 1,
2585   },
2586
2587   {
2588     'key'         => 'selfservice_process-display',
2589     'section'     => 'billing',
2590     'description' => 'When using selfservice_process-pkgpart, add the fee to the amount entered (default), or subtract the fee from the amount entered.',
2591     'type'        => 'select',
2592     'select_hash' => [
2593                        'add'      => 'Add fee to amount entered',
2594                        'subtract' => 'Subtract fee from amount entered',
2595                      ],
2596   },
2597
2598   {
2599     'key'         => 'selfservice_process-skip_first',
2600     'section'     => 'billing',
2601     'description' => "When using selfservice_process-pkgpart, omit the fee if it is the customer's first payment.",
2602     'type'        => 'checkbox',
2603   },
2604
2605 #  {
2606 #    'key'         => 'auto_process-pkgpart',
2607 #    'section'     => 'billing',
2608 #    '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.',
2609 #    'type'        => 'select-part_pkg',
2610 #  },
2611 #
2612 ##  {
2613 ##    'key'         => 'auto_process-display',
2614 ##    'section'     => 'billing',
2615 ##    'description' => 'When using auto_process-pkgpart, add the fee to the amount entered (default), or subtract the fee from the amount entered.',
2616 ##    'type'        => 'select',
2617 ##    'select_hash' => [
2618 ##                       'add'      => 'Add fee to amount entered',
2619 ##                       'subtract' => 'Subtract fee from amount entered',
2620 ##                     ],
2621 ##  },
2622 #
2623 #  {
2624 #    'key'         => 'auto_process-skip_first',
2625 #    'section'     => 'billing',
2626 #    'description' => "When using auto_process-pkgpart, omit the fee if it is the customer's first payment.",
2627 #    'type'        => 'checkbox',
2628 #  },
2629
2630   {
2631     'key'         => 'allow_negative_charges',
2632     'section'     => 'billing',
2633     'description' => 'Allow negative charges.  Normally not used unless importing data from a legacy system that requires this.',
2634     'type'        => 'checkbox',
2635   },
2636   {
2637       'key'         => 'auto_unset_catchall',
2638       'section'     => '',
2639       '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.',
2640       'type'        => 'checkbox',
2641   },
2642
2643   {
2644     'key'         => 'system_usernames',
2645     'section'     => 'username',
2646     '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.',
2647     'type'        => 'textarea',
2648   },
2649
2650   {
2651     'key'         => 'cust_pkg-change_svcpart',
2652     'section'     => '',
2653     'description' => "When changing packages, move services even if svcparts don't match between old and new pacakge definitions.",
2654     'type'        => 'checkbox',
2655   },
2656
2657   {
2658     'key'         => 'cust_pkg-change_pkgpart-bill_now',
2659     'section'     => '',
2660     '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.",
2661     'type'        => 'checkbox',
2662   },
2663
2664   {
2665     'key'         => 'disable_autoreverse',
2666     'section'     => 'BIND',
2667     'description' => 'Disable automatic synchronization of reverse-ARPA entries.',
2668     'type'        => 'checkbox',
2669   },
2670
2671   {
2672     'key'         => 'svc_www-enable_subdomains',
2673     'section'     => '',
2674     'description' => 'Enable selection of specific subdomains for virtual host creation.',
2675     'type'        => 'checkbox',
2676   },
2677
2678   {
2679     'key'         => 'svc_www-usersvc_svcpart',
2680     'section'     => '',
2681     'description' => 'Allowable service definition svcparts for virtual hosts, one per line.',
2682     'type'        => 'select-part_svc',
2683     'multiple'    => 1,
2684   },
2685
2686   {
2687     'key'         => 'selfservice_server-primary_only',
2688     'section'     => 'self-service',
2689     'description' => 'Only allow primary accounts to access self-service functionality.',
2690     'type'        => 'checkbox',
2691   },
2692
2693   {
2694     'key'         => 'selfservice_server-phone_login',
2695     'section'     => 'self-service',
2696     'description' => 'Allow login to self-service with phone number and PIN.',
2697     'type'        => 'checkbox',
2698   },
2699
2700   {
2701     'key'         => 'selfservice_server-single_domain',
2702     'section'     => 'self-service',
2703     'description' => 'If specified, only use this one domain for self-service access.',
2704     'type'        => 'text',
2705   },
2706
2707   {
2708     'key'         => 'selfservice_server-login_svcpart',
2709     'section'     => 'self-service',
2710     'description' => 'If specified, only allow the specified svcparts to login to self-service.',
2711     'type'        => 'select-part_svc',
2712     'multiple'    => 1,
2713   },
2714
2715   {
2716     'key'         => 'selfservice-svc_forward_svcpart',
2717     'section'     => 'self-service',
2718     'description' => 'Service for self-service forward editing.',
2719     'type'        => 'select-part_svc',
2720   },
2721
2722   {
2723     'key'         => 'selfservice-password_reset_verification',
2724     'section'     => 'self-service',
2725     'description' => 'If enabled, specifies the type of verification required for self-service password resets.',
2726     'type'        => 'select',
2727     'select_hash' => [ '' => 'Password reset disabled',
2728                        'paymask,amount,zip' => 'Verify with credit card (or bank account) last 4 digits, payment amount and zip code',
2729                      ],
2730   },
2731
2732   {
2733     'key'         => 'selfservice-password_reset_msgnum',
2734     'section'     => 'self-service',
2735     'description' => 'Template to use for password reset emails.',
2736     %msg_template_options,
2737   },
2738
2739   {
2740     'key'         => 'selfservice-hide_invoices-taxclass',
2741     'section'     => 'self-service',
2742     '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.',
2743     'type'        => 'text',
2744   },
2745
2746   {
2747     'key'         => 'selfservice-recent-did-age',
2748     'section'     => 'self-service',
2749     'description' => 'If specified, defines "recent", in number of seconds, for "Download recently allocated DIDs" in self-service.',
2750     'type'        => 'text',
2751   },
2752
2753   {
2754     'key'         => 'selfservice_server-view-wholesale',
2755     'section'     => 'self-service',
2756     'description' => 'If enabled, use a wholesale package view in the self-service.',
2757     'type'        => 'checkbox',
2758   },
2759   
2760   {
2761     'key'         => 'selfservice-agent_signup',
2762     'section'     => 'self-service',
2763     'description' => 'Allow agent signup via self-service.',
2764     'type'        => 'checkbox',
2765   },
2766
2767   {
2768     'key'         => 'selfservice-agent_signup-agent_type',
2769     'section'     => 'self-service',
2770     'description' => 'Agent type when allowing agent signup via self-service.',
2771     'type'        => 'select-sub',
2772     'options_sub' => sub { require FS::Record;
2773                            require FS::agent_type;
2774                            map { $_->typenum => $_->atype }
2775                                FS::Record::qsearch('agent_type', {} ); # disabled=>'' } );
2776                          },
2777     'option_sub'  => sub { require FS::Record;
2778                            require FS::agent_type;
2779                            my $agent = FS::Record::qsearchs(
2780                              'agent_type', { 'typenum'=>shift }
2781                            );
2782                            $agent_type ? $agent_type->atype : '';
2783                          },
2784   },
2785
2786   {
2787     'key'         => 'selfservice-agent_login',
2788     'section'     => 'self-service',
2789     'description' => 'Allow agent login via self-service.',
2790     'type'        => 'checkbox',
2791   },
2792
2793   {
2794     'key'         => 'selfservice-self_suspend_reason',
2795     'section'     => 'self-service',
2796     'description' => 'Suspend reason when customers suspend their own packages. Set to nothing to disallow self-suspension.',
2797     'type'        => 'select-sub',
2798     'options_sub' => sub { require FS::Record;
2799                            require FS::reason;
2800                            my $type = qsearchs('reason_type', 
2801                              { class => 'S' }) 
2802                               or return ();
2803                            map { $_->reasonnum => $_->reason }
2804                                FS::Record::qsearch('reason', 
2805                                  { reason_type => $type->typenum } 
2806                                );
2807                          },
2808     'option_sub'  => sub { require FS::Record;
2809                            require FS::reason;
2810                            my $reason = FS::Record::qsearchs(
2811                              'reason', { 'reasonnum' => shift }
2812                            );
2813                            $reason ? $reason->reason : '';
2814                          },
2815
2816     'per_agent'   => 1,
2817   },
2818
2819   {
2820     'key'         => 'card_refund-days',
2821     'section'     => 'billing',
2822     'description' => 'After a payment, the number of days a refund link will be available for that payment.  Defaults to 120.',
2823     'type'        => 'text',
2824   },
2825
2826   {
2827     'key'         => 'agent-showpasswords',
2828     'section'     => '',
2829     'description' => 'Display unencrypted user passwords in the agent (reseller) interface',
2830     'type'        => 'checkbox',
2831   },
2832
2833   {
2834     'key'         => 'global_unique-username',
2835     'section'     => 'username',
2836     '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.',
2837     'type'        => 'select',
2838     'select_enum' => [ 'none', 'username', 'username@domain', 'disabled' ],
2839   },
2840
2841   {
2842     'key'         => 'global_unique-phonenum',
2843     'section'     => '',
2844     '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.',
2845     'type'        => 'select',
2846     'select_enum' => [ 'none', 'countrycode+phonenum', 'disabled' ],
2847   },
2848
2849   {
2850     'key'         => 'global_unique-pbx_title',
2851     'section'     => '',
2852     'description' => 'Global phone number uniqueness control: none (check uniqueness per exports), enabled (check across all services), or disabled (no duplicate checking).',
2853     'type'        => 'select',
2854     'select_enum' => [ 'enabled', 'disabled' ],
2855   },
2856
2857   {
2858     'key'         => 'global_unique-pbx_id',
2859     'section'     => '',
2860     'description' => 'Global PBX id uniqueness control: none (check uniqueness per exports), enabled (check across all services), or disabled (no duplicate checking).',
2861     'type'        => 'select',
2862     'select_enum' => [ 'enabled', 'disabled' ],
2863   },
2864
2865   {
2866     'key'         => 'svc_external-skip_manual',
2867     'section'     => 'UI',
2868     '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).',
2869     'type'        => 'checkbox',
2870   },
2871
2872   {
2873     'key'         => 'svc_external-display_type',
2874     'section'     => 'UI',
2875     'description' => 'Select a specific svc_external type to enable some UI changes specific to that type (i.e. artera_turbo).',
2876     'type'        => 'select',
2877     'select_enum' => [ 'generic', 'artera_turbo', ],
2878   },
2879
2880   {
2881     'key'         => 'ticket_system',
2882     'section'     => 'ticketing',
2883     '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:2.1:Documentation:RT_Installation">integrated ticketing installation instructions</a>).   <b>RT_External</b> accesses an external RT installation in a separate database (local or remote).',
2884     'type'        => 'select',
2885     #'select_enum' => [ '', qw(RT_Internal RT_Libs RT_External) ],
2886     'select_enum' => [ '', qw(RT_Internal RT_External) ],
2887   },
2888
2889   {
2890     'key'         => 'network_monitoring_system',
2891     'section'     => 'network_monitoring',
2892     'description' => 'Networking monitoring system (NMS) integration.  <b>Torrus_Internal</b> uses the built-in Torrus ticketing system (see the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:2.1:Documentation:Torrus_Installation">integrated networking monitoring system installation instructions</a>).',
2893     'type'        => 'select',
2894     'select_enum' => [ '', qw(Torrus_Internal) ],
2895   },
2896
2897   {
2898     'key'         => 'nms-auto_add-svc_ips',
2899     'section'     => 'network_monitoring',
2900     'description' => 'Automatically add (and remove) IP addresses from these service tables to the network monitoring system.',
2901     'type'        => 'selectmultiple',
2902     'select_enum' => [ 'svc_acct', 'svc_broadband', 'svc_dsl' ],
2903   },
2904
2905   {
2906     'key'         => 'nms-auto_add-community',
2907     'section'     => 'network_monitoring',
2908     'description' => 'SNMP community string to use when automatically adding IP addresses from these services to the network monitoring system.',
2909     'type'        => 'text',
2910   },
2911
2912   {
2913     'key'         => 'ticket_system-default_queueid',
2914     'section'     => 'ticketing',
2915     'description' => 'Default queue used when creating new customer tickets.',
2916     'type'        => 'select-sub',
2917     'options_sub' => sub {
2918                            my $conf = new FS::Conf;
2919                            if ( $conf->config('ticket_system') ) {
2920                              eval "use FS::TicketSystem;";
2921                              die $@ if $@;
2922                              FS::TicketSystem->queues();
2923                            } else {
2924                              ();
2925                            }
2926                          },
2927     'option_sub'  => sub { 
2928                            my $conf = new FS::Conf;
2929                            if ( $conf->config('ticket_system') ) {
2930                              eval "use FS::TicketSystem;";
2931                              die $@ if $@;
2932                              FS::TicketSystem->queue(shift);
2933                            } else {
2934                              '';
2935                            }
2936                          },
2937   },
2938   {
2939     'key'         => 'ticket_system-force_default_queueid',
2940     'section'     => 'ticketing',
2941     'description' => 'Disallow queue selection when creating new tickets from customer view.',
2942     'type'        => 'checkbox',
2943   },
2944   {
2945     'key'         => 'ticket_system-selfservice_queueid',
2946     'section'     => 'ticketing',
2947     'description' => 'Queue used when creating new customer tickets from self-service.  Defautls to ticket_system-default_queueid if not specified.',
2948     #false laziness w/above
2949     'type'        => 'select-sub',
2950     'options_sub' => sub {
2951                            my $conf = new FS::Conf;
2952                            if ( $conf->config('ticket_system') ) {
2953                              eval "use FS::TicketSystem;";
2954                              die $@ if $@;
2955                              FS::TicketSystem->queues();
2956                            } else {
2957                              ();
2958                            }
2959                          },
2960     'option_sub'  => sub { 
2961                            my $conf = new FS::Conf;
2962                            if ( $conf->config('ticket_system') ) {
2963                              eval "use FS::TicketSystem;";
2964                              die $@ if $@;
2965                              FS::TicketSystem->queue(shift);
2966                            } else {
2967                              '';
2968                            }
2969                          },
2970   },
2971
2972   {
2973     'key'         => 'ticket_system-requestor',
2974     'section'     => 'ticketing',
2975     'description' => 'Email address to use as the requestor for new tickets.  If blank, the customer\'s invoicing address(es) will be used.',
2976     'type'        => 'text',
2977   },
2978
2979   {
2980     'key'         => 'ticket_system-priority_reverse',
2981     'section'     => 'ticketing',
2982     '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.',
2983     'type'        => 'checkbox',
2984   },
2985
2986   {
2987     'key'         => 'ticket_system-custom_priority_field',
2988     'section'     => 'ticketing',
2989     'description' => 'Custom field from the ticketing system to use as a custom priority classification.',
2990     'type'        => 'text',
2991   },
2992
2993   {
2994     'key'         => 'ticket_system-custom_priority_field-values',
2995     'section'     => 'ticketing',
2996     'description' => 'Values for the custom field from the ticketing system to break down and sort customer ticket lists.',
2997     'type'        => 'textarea',
2998   },
2999
3000   {
3001     'key'         => 'ticket_system-custom_priority_field_queue',
3002     'section'     => 'ticketing',
3003     'description' => 'Ticketing system queue in which the custom field specified in ticket_system-custom_priority_field is located.',
3004     'type'        => 'text',
3005   },
3006
3007   {
3008     'key'         => 'ticket_system-selfservice_priority_field',
3009     'section'     => 'ticketing',
3010     'description' => 'Custom field from the ticket system to use as a customer-managed priority field.',
3011     'type'        => 'text',
3012   },
3013
3014   {
3015     'key'         => 'ticket_system-selfservice_edit_subject',
3016     'section'     => 'ticketing',
3017     'description' => 'Allow customers to edit ticket subjects through selfservice.',
3018     'type'        => 'checkbox',
3019   },
3020
3021   {
3022     'key'         => 'ticket_system-escalation',
3023     'section'     => 'ticketing',
3024     'description' => 'Enable priority escalation of tickets as part of daily batch processing.',
3025     'type'        => 'checkbox',
3026   },
3027
3028   {
3029     'key'         => 'ticket_system-rt_external_datasrc',
3030     'section'     => 'ticketing',
3031     '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>',
3032     'type'        => 'text',
3033
3034   },
3035
3036   {
3037     'key'         => 'ticket_system-rt_external_url',
3038     'section'     => 'ticketing',
3039     'description' => 'With external RT integration, the URL for the external RT installation, for example, <code>https://rt.example.com/rt</code>',
3040     'type'        => 'text',
3041   },
3042
3043   {
3044     'key'         => 'company_name',
3045     'section'     => 'required',
3046     'description' => 'Your company name',
3047     'type'        => 'text',
3048     'per_agent'   => 1, #XXX just FS/FS/ClientAPI/Signup.pm
3049   },
3050
3051   {
3052     'key'         => 'company_url',
3053     'section'     => 'UI',
3054     'description' => 'Your company URL',
3055     'type'        => 'text',
3056     'per_agent'   => 1,
3057   },
3058
3059   {
3060     'key'         => 'company_address',
3061     'section'     => 'required',
3062     'description' => 'Your company address',
3063     'type'        => 'textarea',
3064     'per_agent'   => 1,
3065   },
3066
3067   {
3068     'key'         => 'company_phonenum',
3069     'section'     => 'notification',
3070     'description' => 'Your company phone number',
3071     'type'        => 'text',
3072     'per_agent'   => 1,
3073   },
3074
3075   {
3076     'key'         => 'echeck-void',
3077     'section'     => 'deprecated',
3078     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable local-only voiding of echeck payments in addition to refunds against the payment gateway',
3079     'type'        => 'checkbox',
3080   },
3081
3082   {
3083     'key'         => 'cc-void',
3084     'section'     => 'deprecated',
3085     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable local-only voiding of credit card payments in addition to refunds against the payment gateway',
3086     'type'        => 'checkbox',
3087   },
3088
3089   {
3090     'key'         => 'unvoid',
3091     'section'     => 'deprecated',
3092     'description' => '<B>DEPRECATED</B>, now controlled by ACLs.  Used to enable unvoiding of voided payments',
3093     'type'        => 'checkbox',
3094   },
3095
3096   {
3097     'key'         => 'address1-search',
3098     'section'     => 'UI',
3099     '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.',
3100     'type'        => 'checkbox',
3101   },
3102
3103   {
3104     'key'         => 'address2-search',
3105     'section'     => 'UI',
3106     'description' => 'Enable a "Unit" search box which searches the second address field.  Useful for multi-tenant applications.  See also: cust_main-require_address2',
3107     'type'        => 'checkbox',
3108   },
3109
3110   {
3111     'key'         => 'cust_main-require_address2',
3112     'section'     => 'UI',
3113     'description' => 'Second address field is required (on service address only, if billing and service addresses differ).  Also enables "Unit" labeling of address2 on customer view and edit pages.  Useful for multi-tenant applications.  See also: address2-search',
3114     'type'        => 'checkbox',
3115   },
3116
3117   {
3118     'key'         => 'agent-ship_address',
3119     'section'     => '',
3120     '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.",
3121     'type'        => 'checkbox',
3122     'per_agent'   => 1,
3123   },
3124
3125   { 'key'         => 'referral_credit',
3126     'section'     => 'deprecated',
3127     'description' => "Used to enable one-time referral credits in the amount of one month <i>referred</i> customer's recurring fee (irregardless of frequency).  Replace with a billing event on appropriate packages.",
3128     'type'        => 'checkbox',
3129   },
3130
3131   { 'key'         => 'selfservice_server-cache_module',
3132     'section'     => 'self-service',
3133     '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.',
3134     'type'        => 'select',
3135     'select_enum' => [ 'Cache::SharedMemoryCache', 'Cache::FileCache', ], # '_Database' ],
3136   },
3137
3138   {
3139     'key'         => 'hylafax',
3140     'section'     => 'billing',
3141     '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).',
3142     'type'        => [qw( checkbox textarea )],
3143   },
3144
3145   {
3146     'key'         => 'cust_bill-ftpformat',
3147     'section'     => 'invoicing',
3148     'description' => 'Enable FTP of raw invoice data - format.',
3149     'type'        => 'select',
3150     'options'     => [ spool_formats() ],
3151   },
3152
3153   {
3154     'key'         => 'cust_bill-ftpserver',
3155     'section'     => 'invoicing',
3156     'description' => 'Enable FTP of raw invoice data - server.',
3157     'type'        => 'text',
3158   },
3159
3160   {
3161     'key'         => 'cust_bill-ftpusername',
3162     'section'     => 'invoicing',
3163     'description' => 'Enable FTP of raw invoice data - server.',
3164     'type'        => 'text',
3165   },
3166
3167   {
3168     'key'         => 'cust_bill-ftppassword',
3169     'section'     => 'invoicing',
3170     'description' => 'Enable FTP of raw invoice data - server.',
3171     'type'        => 'text',
3172   },
3173
3174   {
3175     'key'         => 'cust_bill-ftpdir',
3176     'section'     => 'invoicing',
3177     'description' => 'Enable FTP of raw invoice data - server.',
3178     'type'        => 'text',
3179   },
3180
3181   {
3182     'key'         => 'cust_bill-spoolformat',
3183     'section'     => 'invoicing',
3184     'description' => 'Enable spooling of raw invoice data - format.',
3185     'type'        => 'select',
3186     'options'     => [ spool_formats() ],
3187   },
3188
3189   {
3190     'key'         => 'cust_bill-spoolagent',
3191     'section'     => 'invoicing',
3192     'description' => 'Enable per-agent spooling of raw invoice data.',
3193     'type'        => 'checkbox',
3194   },
3195
3196   {
3197     'key'         => 'bridgestone-batch_counter',
3198     'section'     => '',
3199     'description' => 'Batch counter for spool files.  Increments every time a spool file is uploaded.',
3200     'type'        => 'text',
3201     'per_agent'   => 1,
3202   },
3203
3204   {
3205     'key'         => 'bridgestone-prefix',
3206     'section'     => '',
3207     'description' => 'Agent identifier for uploading to BABT printing service.',
3208     'type'        => 'text',
3209     'per_agent'   => 1,
3210   },
3211
3212   {
3213     'key'         => 'bridgestone-confirm_template',
3214     'section'     => '',
3215     '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.',
3216     # this could use a true message template, but it's hard to see how that
3217     # would make the world a better place
3218     'type'        => 'textarea',
3219     'per_agent'   => 1,
3220   },
3221
3222   {
3223     'key'         => 'svc_acct-usage_suspend',
3224     'section'     => 'billing',
3225     '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.',
3226     'type'        => 'checkbox',
3227   },
3228
3229   {
3230     'key'         => 'svc_acct-usage_unsuspend',
3231     'section'     => 'billing',
3232     '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.',
3233     'type'        => 'checkbox',
3234   },
3235
3236   {
3237     'key'         => 'svc_acct-usage_threshold',
3238     'section'     => 'billing',
3239     '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.',
3240     'type'        => 'text',
3241   },
3242
3243   {
3244     'key'         => 'overlimit_groups',
3245     'section'     => '',
3246     'description' => 'RADIUS group(s) to assign to svc_acct which has exceeded its bandwidth or time limit.',
3247     'type'        => 'select-sub',
3248     'per_agent'   => 1,
3249     'multiple'    => 1,
3250     'options_sub' => sub { require FS::Record;
3251                            require FS::radius_group;
3252                            map { $_->groupnum => $_->long_description }
3253                                FS::Record::qsearch('radius_group', {} );
3254                          },
3255     'option_sub'  => sub { require FS::Record;
3256                            require FS::radius_group;
3257                            my $radius_group = FS::Record::qsearchs(
3258                              'radius_group', { 'groupnum' => shift }
3259                            );
3260                $radius_group ? $radius_group->long_description : '';
3261                          },
3262   },
3263
3264   {
3265     'key'         => 'cust-fields',
3266     'section'     => 'UI',
3267     'description' => 'Which customer fields to display on reports by default',
3268     'type'        => 'select',
3269     'select_hash' => [ FS::ConfDefaults->cust_fields_avail() ],
3270   },
3271
3272   {
3273     'key'         => 'cust_location-label_prefix',
3274     'section'     => 'UI',
3275     'description' => 'Optional "site ID" to show in the location label',
3276     'type'        => 'select',
3277     'select_hash' => [ '' => '',
3278                        'CoStAg' => 'CoStAgXXXXX (country, state, agent name, locationnum)',
3279                       ],
3280   },
3281
3282   {
3283     'key'         => 'cust_pkg-display_times',
3284     'section'     => 'UI',
3285     'description' => 'Display full timestamps (not just dates) for customer packages.  Useful if you are doing real-time things like hourly prepaid.',
3286     'type'        => 'checkbox',
3287   },
3288
3289   {
3290     'key'         => 'cust_pkg-always_show_location',
3291     'section'     => 'UI',
3292     'description' => "Always display package locations, even when they're all the default service address.",
3293     'type'        => 'checkbox',
3294   },
3295
3296   {
3297     'key'         => 'cust_pkg-group_by_location',
3298     'section'     => 'UI',
3299     'description' => "Group packages by location.",
3300     'type'        => 'checkbox',
3301   },
3302
3303   {
3304     'key'         => 'cust_pkg-show_fcc_voice_grade_equivalent',
3305     'section'     => 'UI',
3306     'description' => "Show fields on package definitions for FCC Form 477 classification",
3307     'type'        => 'checkbox',
3308   },
3309
3310   {
3311     'key'         => 'cust_pkg-large_pkg_size',
3312     'section'     => 'UI',
3313     'description' => "In customer view, summarize packages with more than this many services.  Set to zero to never summarize packages.",
3314     'type'        => 'text',
3315   },
3316
3317   {
3318     'key'         => 'svc_acct-edit_uid',
3319     'section'     => 'shell',
3320     'description' => 'Allow UID editing.',
3321     'type'        => 'checkbox',
3322   },
3323
3324   {
3325     'key'         => 'svc_acct-edit_gid',
3326     'section'     => 'shell',
3327     'description' => 'Allow GID editing.',
3328     'type'        => 'checkbox',
3329   },
3330
3331   {
3332     'key'         => 'svc_acct-no_edit_username',
3333     'section'     => 'shell',
3334     'description' => 'Disallow username editing.',
3335     'type'        => 'checkbox',
3336   },
3337
3338   {
3339     'key'         => 'zone-underscore',
3340     'section'     => 'BIND',
3341     'description' => 'Allow underscores in zone names.  As underscores are illegal characters in zone names, this option is not recommended.',
3342     'type'        => 'checkbox',
3343   },
3344
3345   {
3346     'key'         => 'echeck-nonus',
3347     'section'     => 'billing',
3348     'description' => 'Disable ABA-format account checking for Electronic Check payment info',
3349     'type'        => 'checkbox',
3350   },
3351
3352   {
3353     'key'         => 'echeck-country',
3354     'section'     => 'billing',
3355     'description' => 'Format electronic check information for the specified country.',
3356     'type'        => 'select',
3357     'select_hash' => [ 'US' => 'United States',
3358                        'CA' => 'Canada (enables branch)',
3359                        'XX' => 'Other',
3360                      ],
3361   },
3362
3363   {
3364     'key'         => 'voip-cust_accountcode_cdr',
3365     'section'     => 'telephony',
3366     'description' => 'Enable the per-customer option for CDR breakdown by accountcode.',
3367     'type'        => 'checkbox',
3368   },
3369
3370   {
3371     'key'         => 'voip-cust_cdr_spools',
3372     'section'     => 'telephony',
3373     'description' => 'Enable the per-customer option for individual CDR spools.',
3374     'type'        => 'checkbox',
3375   },
3376
3377   {
3378     'key'         => 'voip-cust_cdr_squelch',
3379     'section'     => 'telephony',
3380     'description' => 'Enable the per-customer option for not printing CDR on invoices.',
3381     'type'        => 'checkbox',
3382   },
3383
3384   {
3385     'key'         => 'voip-cdr_email',
3386     'section'     => 'telephony',
3387     'description' => 'Include the call details on emailed invoices (and HTML invoices viewed in the backend), even if the customer is configured for not printing them on the invoices.',
3388     'type'        => 'checkbox',
3389   },
3390
3391   {
3392     'key'         => 'voip-cust_email_csv_cdr',
3393     'section'     => 'telephony',
3394     'description' => 'Enable the per-customer option for including CDR information as a CSV attachment on emailed invoices.',
3395     'type'        => 'checkbox',
3396   },
3397
3398   {
3399     'key'         => 'cgp_rule-domain_templates',
3400     'section'     => '',
3401     'description' => 'Communigate Pro rule templates for domains, one per line, "svcnum Name"',
3402     'type'        => 'textarea',
3403   },
3404
3405   {
3406     'key'         => 'svc_forward-no_srcsvc',
3407     'section'     => '',
3408     'description' => "Don't allow forwards from existing accounts, only arbitrary addresses.  Useful when exporting to systems such as Communigate Pro which treat forwards in this fashion.",
3409     'type'        => 'checkbox',
3410   },
3411
3412   {
3413     'key'         => 'svc_forward-arbitrary_dst',
3414     'section'     => '',
3415     'description' => "Allow forwards to point to arbitrary strings that don't necessarily look like email addresses.  Only used when using forwards for weird, non-email things.",
3416     'type'        => 'checkbox',
3417   },
3418
3419   {
3420     'key'         => 'tax-ship_address',
3421     'section'     => 'billing',
3422     'description' => 'By default, tax calculations are done based on the billing address.  Enable this switch to calculate tax based on the shipping address instead.',
3423     'type'        => 'checkbox',
3424   }
3425 ,
3426   {
3427     'key'         => 'tax-pkg_address',
3428     'section'     => 'billing',
3429     'description' => 'By default, tax calculations are done based on the billing address.  Enable this switch to calculate tax based on the package address instead (when present).',
3430     'type'        => 'checkbox',
3431   },
3432
3433   {
3434     'key'         => 'invoice-ship_address',
3435     'section'     => 'invoicing',
3436     'description' => 'Include the shipping address on invoices.',
3437     'type'        => 'checkbox',
3438   },
3439
3440   {
3441     'key'         => 'invoice-unitprice',
3442     'section'     => 'invoicing',
3443     'description' => 'Enable unit pricing on invoices and quantities on packages.',
3444     'type'        => 'checkbox',
3445   },
3446
3447   {
3448     'key'         => 'invoice-smallernotes',
3449     'section'     => 'invoicing',
3450     'description' => 'Display the notes section in a smaller font on invoices.',
3451     'type'        => 'checkbox',
3452   },
3453
3454   {
3455     'key'         => 'invoice-smallerfooter',
3456     'section'     => 'invoicing',
3457     'description' => 'Display footers in a smaller font on invoices.',
3458     'type'        => 'checkbox',
3459   },
3460
3461   {
3462     'key'         => 'postal_invoice-fee_pkgpart',
3463     'section'     => 'billing',
3464     'description' => 'This allows selection of a package to insert on invoices for customers with postal invoices selected.',
3465     'type'        => 'select-part_pkg',
3466     'per_agent'   => 1,
3467   },
3468
3469   {
3470     'key'         => 'postal_invoice-recurring_only',
3471     'section'     => 'billing',
3472     'description' => 'The postal invoice fee is omitted on invoices without recurring charges when this is set.',
3473     'type'        => 'checkbox',
3474   },
3475
3476   {
3477     'key'         => 'batch-enable',
3478     'section'     => 'deprecated', #make sure batch-enable_payby is set for
3479                                    #everyone before removing
3480     'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.',
3481     'type'        => 'checkbox',
3482   },
3483
3484   {
3485     'key'         => 'batch-enable_payby',
3486     'section'     => 'billing',
3487     'description' => 'Enable batch processing for the specified payment types.',
3488     'type'        => 'selectmultiple',
3489     'select_enum' => [qw( CARD CHEK )],
3490   },
3491
3492   {
3493     'key'         => 'realtime-disable_payby',
3494     'section'     => 'billing',
3495     'description' => 'Disable realtime processing for the specified payment types.',
3496     'type'        => 'selectmultiple',
3497     'select_enum' => [qw( CARD CHEK )],
3498   },
3499
3500   {
3501     'key'         => 'batch-default_format',
3502     'section'     => 'billing',
3503     'description' => 'Default format for batches.',
3504     'type'        => 'select',
3505     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch',
3506                        'csv-chase_canada-E-xactBatch', 'BoM', 'PAP',
3507                        'paymentech', 'ach-spiritone', 'RBC'
3508                     ]
3509   },
3510
3511   { 'key'         => 'batch-gateway-CARD',
3512     'section'     => 'billing',
3513     'description' => 'Business::BatchPayment gateway for credit card batches.',
3514     %batch_gateway_options,
3515   },
3516
3517   { 'key'         => 'batch-gateway-CHEK',
3518     'section'     => 'billing', 
3519     'description' => 'Business::BatchPayment gateway for check batches.',
3520     %batch_gateway_options,
3521   },
3522
3523   {
3524     'key'         => 'batch-reconsider',
3525     'section'     => 'billing',
3526     'description' => 'Allow imported batch results to change the status of payments from previous imports.  Enable this only if your gateway is known to send both positive and negative results for the same batch.',
3527     'type'        => 'checkbox',
3528   },
3529
3530   {
3531     'key'         => 'batch-auto_resolve_days',
3532     'section'     => 'billing',
3533     'description' => 'Automatically resolve payment batches this many days after they were first downloaded.',
3534     'type'        => 'text',
3535   },
3536
3537   {
3538     'key'         => 'batch-auto_resolve_status',
3539     'section'     => 'billing',
3540     'description' => 'When automatically resolving payment batches, take this action for payments of unknown status.',
3541     'type'        => 'select',
3542     'select_enum' => [ 'approve', 'decline' ],
3543   },
3544
3545   {
3546     'key'         => 'batch-errors_to',
3547     'section'     => 'billing',
3548     'description' => 'Email errors when processing batches to this address.  If unspecified, batch processing will stop immediately on error.',
3549     'type'        => 'text',
3550   },
3551
3552   #lists could be auto-generated from pay_batch info
3553   {
3554     'key'         => 'batch-fixed_format-CARD',
3555     'section'     => 'billing',
3556     'description' => 'Fixed (unchangeable) format for credit card batches.',
3557     'type'        => 'select',
3558     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP' ,
3559                        'csv-chase_canada-E-xactBatch', 'paymentech' ]
3560   },
3561
3562   {
3563     'key'         => 'batch-fixed_format-CHEK',
3564     'section'     => 'billing',
3565     'description' => 'Fixed (unchangeable) format for electronic check batches.',
3566     'type'        => 'select',
3567     'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP',
3568                        'paymentech', 'ach-spiritone', 'RBC', 'td_eft1464',
3569                        'eft_canada'
3570                      ]
3571   },
3572
3573   {
3574     'key'         => 'batch-increment_expiration',
3575     'section'     => 'billing',
3576     'description' => 'Increment expiration date years in batches until cards are current.  Make sure this is acceptable to your batching provider before enabling.',
3577     'type'        => 'checkbox'
3578   },
3579
3580   {
3581     'key'         => 'batchconfig-BoM',
3582     'section'     => 'billing',
3583     'description' => 'Configuration for Bank of Montreal batching, seven lines: 1. Origin ID, 2. Datacenter, 3. Typecode, 4. Short name, 5. Long name, 6. Bank, 7. Bank account',
3584     'type'        => 'textarea',
3585   },
3586
3587   {
3588     'key'         => 'batchconfig-PAP',
3589     'section'     => 'billing',
3590     'description' => 'Configuration for PAP batching, seven lines: 1. Origin ID, 2. Datacenter, 3. Typecode, 4. Short name, 5. Long name, 6. Bank, 7. Bank account',
3591     'type'        => 'textarea',
3592   },
3593
3594   {
3595     'key'         => 'batchconfig-csv-chase_canada-E-xactBatch',
3596     'section'     => 'billing',
3597     'description' => 'Gateway ID for Chase Canada E-xact batching',
3598     'type'        => 'text',
3599   },
3600
3601   {
3602     'key'         => 'batchconfig-paymentech',
3603     'section'     => 'billing',
3604     'description' => 'Configuration for Chase Paymentech batching, six lines: 1. BIN, 2. Terminal ID, 3. Merchant ID, 4. Username, 5. Password (for batch uploads), 6. Flag to send recurring indicator.',
3605     'type'        => 'textarea',
3606   },
3607
3608   {
3609     'key'         => 'batchconfig-RBC',
3610     'section'     => 'billing',
3611     'description' => 'Configuration for Royal Bank of Canada PDS batching, four lines: 1. Client number, 2. Short name, 3. Long name, 4. Transaction code.',
3612     'type'        => 'textarea',
3613   },
3614
3615   {
3616     'key'         => 'batchconfig-td_eft1464',
3617     'section'     => 'billing',
3618     'description' => 'Configuration for TD Bank EFT1464 batching, seven lines: 1. Originator ID, 2. Datacenter Code, 3. Short name, 4. Long name, 5. Returned payment branch number, 6. Returned payment account, 7. Transaction code.',
3619     'type'        => 'textarea',
3620   },
3621
3622   {
3623     'key'         => 'batch-manual_approval',
3624     'section'     => 'billing',
3625     'description' => 'Allow manual batch closure, which will approve all payments that do not yet have a status.  This is not advised, but is needed for payment processors that provide a report of rejected rather than approved payments.',
3626     'type'        => 'checkbox',
3627   },
3628
3629   {
3630     'key'         => 'batchconfig-eft_canada',
3631     'section'     => 'billing',
3632     'description' => 'Configuration for EFT Canada batching, four lines: 1. SFTP username, 2. SFTP password, 3. Transaction code, 4. Number of days to delay process date.',
3633     'type'        => 'textarea',
3634     'per_agent'   => 1,
3635   },
3636
3637   {
3638     'key'         => 'batch-spoolagent',
3639     'section'     => 'billing',
3640     'description' => 'Store payment batches per-agent.',
3641     'type'        => 'checkbox',
3642   },
3643
3644   {
3645     'key'         => 'payment_history-years',
3646     'section'     => 'UI',
3647     'description' => 'Number of years of payment history to show by default.  Currently defaults to 2.',
3648     'type'        => 'text',
3649   },
3650
3651   {
3652     'key'         => 'change_history-years',
3653     'section'     => 'UI',
3654     'description' => 'Number of years of change history to show by default.  Currently defaults to 0.5.',
3655     'type'        => 'text',
3656   },
3657
3658   {
3659     'key'         => 'cust_main-packages-years',
3660     'section'     => 'UI',
3661     'description' => 'Number of years to show old (cancelled and one-time charge) packages by default.  Currently defaults to 2.',
3662     'type'        => 'text',
3663   },
3664
3665   {
3666     'key'         => 'cust_main-use_comments',
3667     'section'     => 'UI',
3668     'description' => 'Display free form comments on the customer edit screen.  Useful as a scratch pad.',
3669     'type'        => 'checkbox',
3670   },
3671
3672   {
3673     'key'         => 'cust_main-disable_notes',
3674     'section'     => 'UI',
3675     'description' => 'Disable new style customer notes - timestamped and user identified customer notes.  Useful in tracking who did what.',
3676     'type'        => 'checkbox',
3677   },
3678
3679   {
3680     'key'         => 'cust_main_note-display_times',
3681     'section'     => 'UI',
3682     'description' => 'Display full timestamps (not just dates) for customer notes.',
3683     'type'        => 'checkbox',
3684   },
3685
3686   {
3687     'key'         => 'cust_main-ticket_statuses',
3688     'section'     => 'UI',
3689     'description' => 'Show tickets with these statuses on the customer view page.',
3690     'type'        => 'selectmultiple',
3691     'select_enum' => [qw( new open stalled resolved rejected deleted )],
3692   },
3693
3694   {
3695     'key'         => 'cust_main-max_tickets',
3696     'section'     => 'UI',
3697     'description' => 'Maximum number of tickets to show on the customer view page.',
3698     'type'        => 'text',
3699   },
3700
3701   {
3702     'key'         => 'cust_main-skeleton_tables',
3703     'section'     => '',
3704     'description' => 'Tables which will have skeleton records inserted into them for each customer.  Syntax for specifying tables is unfortunately a tricky perl data structure for now.',
3705     'type'        => 'textarea',
3706   },
3707
3708   {
3709     'key'         => 'cust_main-skeleton_custnum',
3710     'section'     => '',
3711     'description' => 'Customer number specifying the source data to copy into skeleton tables for new customers.',
3712     'type'        => 'text',
3713   },
3714
3715   {
3716     'key'         => 'cust_main-enable_birthdate',
3717     'section'     => 'UI',
3718     'description' => 'Enable tracking of a birth date with each customer record',
3719     'type'        => 'checkbox',
3720   },
3721
3722   {
3723     'key'         => 'cust_main-enable_spouse_birthdate',
3724     'section'     => 'UI',
3725     'description' => 'Enable tracking of a spouse birth date with each customer record',
3726     'type'        => 'checkbox',
3727   },
3728
3729   {
3730     'key'         => 'cust_main-enable_anniversary_date',
3731     'section'     => 'UI',
3732     'description' => 'Enable tracking of an anniversary date with each customer record',
3733     'type'        => 'checkbox',
3734   },
3735
3736   {
3737     'key'         => 'cust_main-edit_calling_list_exempt',
3738     'section'     => 'UI',
3739     'description' => 'Display the "calling_list_exempt" checkbox on customer edit.',
3740     'type'        => 'checkbox',
3741   },
3742
3743   {
3744     'key'         => 'support-key',
3745     'section'     => '',
3746     'description' => 'A support key enables access to commercial services delivered over the network, such as the payroll module, access to the internal ticket system, priority support and optional backups.',
3747     'type'        => 'text',
3748   },
3749
3750   {
3751     'key'         => 'card-types',
3752     'section'     => 'billing',
3753     'description' => 'Select one or more card types to enable only those card types.  If no card types are selected, all card types are available.',
3754     'type'        => 'selectmultiple',
3755     'select_enum' => \@card_types,
3756   },
3757
3758   {
3759     'key'         => 'disable-fuzzy',
3760     'section'     => 'UI',
3761     'description' => 'Disable fuzzy searching.  Speeds up searching for large sites, but only shows exact matches.',
3762     'type'        => 'checkbox',
3763   },
3764
3765   { 'key'         => 'pkg_referral',
3766     'section'     => '',
3767     'description' => 'Enable package-specific advertising sources.',
3768     'type'        => 'checkbox',
3769   },
3770
3771   { 'key'         => 'pkg_referral-multiple',
3772     'section'     => '',
3773     'description' => 'In addition, allow multiple advertising sources to be associated with a single package.',
3774     'type'        => 'checkbox',
3775   },
3776
3777   {
3778     'key'         => 'dashboard-install_welcome',
3779     'section'     => 'UI',
3780     'description' => 'New install welcome screen.',
3781     'type'        => 'select',
3782     'select_enum' => [ '', 'ITSP_fsinc_hosted', ],
3783   },
3784
3785   {
3786     'key'         => 'dashboard-toplist',
3787     'section'     => 'UI',
3788     'description' => 'List of items to display on the top of the front page',
3789     'type'        => 'textarea',
3790   },
3791
3792   {
3793     'key'         => 'impending_recur_msgnum',
3794     'section'     => 'notification',
3795     'description' => 'Template to use for alerts about first-time recurring billing.',
3796     %msg_template_options,
3797   },
3798
3799   {
3800     'key'         => 'impending_recur_template',
3801     'section'     => 'deprecated',
3802     'description' => 'Template file for alerts about looming first time recurrant billing.  See the <a href="http://search.cpan.org/dist/Text-Template/lib/Text/Template.pm">Text::Template</a> documentation for details on the template substitition language.  Also see packages with a <a href="../browse/part_pkg.cgi">flat price plan</a>  The following variables are available<ul><li><code>$packages</code> allowing <code>$packages->[0]</code> thru <code>$packages->[n]</code> <li><code>$package</code> the first package, same as <code>$packages->[0]</code> <li><code>$recurdates</code> allowing <code>$recurdates->[0]</code> thru <code>$recurdates->[n]</code> <li><code>$recurdate</code> the first recurdate, same as <code>$recurdate->[0]</code> <li><code>$first</code> <li><code>$last</code></ul>',
3803 # <li><code>$payby</code> <li><code>$expdate</code> most likely only confuse
3804     'type'        => 'textarea',
3805   },
3806
3807   {
3808     'key'         => 'logo.png',
3809     'section'     => 'UI',  #'invoicing' ?
3810     'description' => 'Company logo for HTML invoices and the backoffice interface, in PNG format.  Suggested size somewhere near 92x62.',
3811     'type'        => 'image',
3812     'per_agent'   => 1, #XXX just view/logo.cgi, which is for the global
3813                         #old-style editor anyway...?
3814     'per_locale'  => 1,
3815   },
3816
3817   {
3818     'key'         => 'logo.eps',
3819     'section'     => 'invoicing',
3820     'description' => 'Company logo for printed and PDF invoices, in EPS format.',
3821     'type'        => 'image',
3822     'per_agent'   => 1, #XXX as above, kinda
3823     'per_locale'  => 1,
3824   },
3825
3826   {
3827     'key'         => 'selfservice-ignore_quantity',
3828     'section'     => 'self-service',
3829     'description' => 'Ignores service quantity restrictions in self-service context.  Strongly not recommended - just set your quantities correctly in the first place.',
3830     'type'        => 'checkbox',
3831   },
3832
3833   {
3834     'key'         => 'selfservice-session_timeout',
3835     'section'     => 'self-service',
3836     'description' => 'Self-service session timeout.  Defaults to 1 hour.',
3837     'type'        => 'select',
3838     'select_enum' => [ '1 hour', '2 hours', '4 hours', '8 hours', '1 day', '1 week', ],
3839   },
3840
3841   {
3842     'key'         => 'disable_setup_suspended_pkgs',
3843     'section'     => 'billing',
3844     'description' => 'Disables charging of setup fees for suspended packages.',
3845     'type'        => 'checkbox',
3846   },
3847
3848   {
3849     'key'         => 'password-generated-allcaps',
3850     'section'     => 'password',
3851     'description' => 'Causes passwords automatically generated to consist entirely of capital letters',
3852     'type'        => 'checkbox',
3853   },
3854
3855   {
3856     'key'         => 'datavolume-forcemegabytes',
3857     'section'     => 'UI',
3858     'description' => 'All data volumes are expressed in megabytes',
3859     'type'        => 'checkbox',
3860   },
3861
3862   {
3863     'key'         => 'datavolume-significantdigits',
3864     'section'     => 'UI',
3865     'description' => 'number of significant digits to use to represent data volumes',
3866     'type'        => 'text',
3867   },
3868
3869   {
3870     'key'         => 'disable_void_after',
3871     'section'     => 'billing',
3872     'description' => 'Number of seconds after which freeside won\'t attempt to VOID a payment first when performing a refund.',
3873     'type'        => 'text',
3874   },
3875
3876   {
3877     'key'         => 'disable_line_item_date_ranges',
3878     'section'     => 'billing',
3879     'description' => 'Prevent freeside from automatically generating date ranges on invoice line items.',
3880     'type'        => 'checkbox',
3881   },
3882
3883   {
3884     'key'         => 'cust_bill-line_item-date_style',
3885     'section'     => 'billing',
3886     'description' => 'Display format for line item date ranges on invoice line items.',
3887     'type'        => 'select',
3888     'select_hash' => [ ''           => 'STARTDATE-ENDDATE',
3889                        'month_of'   => 'Month of MONTHNAME',
3890                        'X_month'    => 'DATE_DESC MONTHNAME',
3891                      ],
3892     'per_agent'   => 1,
3893   },
3894
3895   {
3896     'key'         => 'cust_bill-line_item-date_description',
3897     'section'     => 'billing',
3898     'description' => 'Text to display for "DATE_DESC" when using cust_bill-line_item-date_style DATE_DESC MONTHNAME.',
3899     'type'        => 'text',
3900     'per_agent'   => 1,
3901   },
3902
3903   {
3904     'key'         => 'support_packages',
3905     'section'     => '',
3906     'description' => 'A list of packages eligible for RT ticket time transfer, one pkgpart per line.', #this should really be a select multiple, or specified in the packages themselves...
3907     'type'        => 'select-part_pkg',
3908     'multiple'    => 1,
3909   },
3910
3911   {
3912     'key'         => 'cust_main-require_phone',
3913     'section'     => '',
3914     'description' => 'Require daytime or night phone for all customer records.',
3915     'type'        => 'checkbox',
3916     'per_agent'   => 1,
3917   },
3918
3919   {
3920     'key'         => 'cust_main-require_invoicing_list_email',
3921     'section'     => '',
3922     'description' => 'Email address field is required: require at least one invoicing email address for all customer records.',
3923     'type'        => 'checkbox',
3924     'per_agent'   => 1,
3925   },
3926
3927   {
3928     'key'         => 'cust_main-check_unique',
3929     'section'     => '',
3930     'description' => 'Warn before creating a customer record where these fields duplicate another customer.',
3931     'type'        => 'select',
3932     'multiple'    => 1,
3933     'select_hash' => [ 
3934       'address1' => 'Billing address',
3935     ],
3936   },
3937
3938   {
3939     'key'         => 'svc_acct-display_paid_time_remaining',
3940     'section'     => '',
3941     'description' => 'Show paid time remaining in addition to time remaining.',
3942     'type'        => 'checkbox',
3943   },
3944
3945   {
3946     'key'         => 'cancel_credit_type',
3947     'section'     => 'billing',
3948     'description' => 'The group to use for new, automatically generated credit reasons resulting from cancellation.',
3949     reason_type_options('R'),
3950   },
3951
3952   {
3953     'key'         => 'suspend_credit_type',
3954     'section'     => 'billing',
3955     'description' => 'The group to use for new, automatically generated credit reasons resulting from package suspension.',
3956     reason_type_options('R'),
3957   },
3958
3959   {
3960     'key'         => 'referral_credit_type',
3961     'section'     => 'deprecated',
3962     'description' => 'Used to be the group to use for new, automatically generated credit reasons resulting from referrals.  Now set in a package billing event for the referral.',
3963     reason_type_options('R'),
3964   },
3965
3966   {
3967     'key'         => 'signup_credit_type',
3968     'section'     => 'billing', #self-service?
3969     'description' => 'The group to use for new, automatically generated credit reasons resulting from signup and self-service declines.',
3970     reason_type_options('R'),
3971   },
3972
3973   {
3974     'key'         => 'prepayment_discounts-credit_type',
3975     'section'     => 'billing',
3976     'description' => 'Enables the offering of prepayment discounts and establishes the credit reason type.',
3977     reason_type_options('R'),
3978   },
3979
3980   {
3981     'key'         => 'cust_main-agent_custid-format',
3982     'section'     => '',
3983     'description' => 'Enables searching of various formatted values in cust_main.agent_custid',
3984     'type'        => 'select',
3985     'select_hash' => [
3986                        ''       => 'Numeric only',
3987                        '\d{7}'  => 'Numeric only, exactly 7 digits',
3988                        'ww?d+'  => 'Numeric with one or two letter prefix',
3989                      ],
3990   },
3991
3992   {
3993     'key'         => 'card_masking_method',
3994     'section'     => 'UI',
3995     'description' => 'Digits to display when masking credit cards.  Note that the first six digits are necessary to canonically identify the credit card type (Visa/MC, Amex, Discover, Maestro, etc.) in all cases.  The first four digits can identify the most common credit card types in most cases (Visa/MC, Amex, and Discover).  The first two digits can distinguish between Visa/MC and Amex.  Note: You should manually remove stored paymasks if you change this value on an existing database, to avoid problems using stored cards.',
3996     'type'        => 'select',
3997     'select_hash' => [
3998                        ''            => '123456xxxxxx1234',
3999                        'first6last2' => '123456xxxxxxxx12',
4000                        'first4last4' => '1234xxxxxxxx1234',
4001                        'first4last2' => '1234xxxxxxxxxx12',
4002                        'first2last4' => '12xxxxxxxxxx1234',
4003                        'first2last2' => '12xxxxxxxxxxxx12',
4004                        'first0last4' => 'xxxxxxxxxxxx1234',
4005                        'first0last2' => 'xxxxxxxxxxxxxx12',
4006                      ],
4007   },
4008
4009   {
4010     'key'         => 'disable_previous_balance',
4011     'section'     => 'invoicing',
4012     'description' => 'Disable inclusion of previous balance, payment, and credit lines on invoices.',
4013     'type'        => 'checkbox',
4014     'per_agent'   => 1,
4015   },
4016
4017   {
4018     'key'         => 'previous_balance-exclude_from_total',
4019     'section'     => 'invoicing',
4020     'description' => 'Do not include previous balance in the \'Total\' line.  Only meaningful when invoice_sections is false.  Optionally provide text to override the Total New Charges description',
4021     'type'        => [ qw(checkbox text) ],
4022   },
4023
4024   {
4025     'key'         => 'previous_balance-summary_only',
4026     'section'     => 'invoicing',
4027     'description' => 'Only show a single line summarizing the total previous balance rather than one line per invoice.',
4028     'type'        => 'checkbox',
4029   },
4030
4031   {
4032     'key'         => 'previous_balance-show_credit',
4033     'section'     => 'invoicing',
4034     'description' => 'Show the customer\'s credit balance on invoices when applicable.',
4035     'type'        => 'checkbox',
4036   },
4037
4038   {
4039     'key'         => 'previous_balance-show_on_statements',
4040     'section'     => 'invoicing',
4041     'description' => 'Show previous invoices on statements, without itemized charges.',
4042     'type'        => 'checkbox',
4043   },
4044
4045   {
4046     'key'         => 'balance_due_below_line',
4047     'section'     => 'invoicing',
4048     'description' => 'Place the balance due message below a line.  Only meaningful when when invoice_sections is false.',
4049     'type'        => 'checkbox',
4050   },
4051
4052   {
4053     'key'         => 'usps_webtools-userid',
4054     'section'     => 'UI',
4055     'description' => 'Production UserID for USPS web tools.   Enables USPS address standardization.  See the <a href="http://www.usps.com/webtools/">USPS website</a>, register and agree not to use the tools for batch purposes.',
4056     'type'        => 'text',
4057   },
4058
4059   {
4060     'key'         => 'usps_webtools-password',
4061     'section'     => 'UI',
4062     'description' => 'Production password for USPS web tools.   Enables USPS address standardization.  See <a href="http://www.usps.com/webtools/">USPS website</a>, register and agree not to use the tools for batch purposes.',
4063     'type'        => 'text',
4064   },
4065
4066   {
4067     'key'         => 'cust_main-auto_standardize_address',
4068     'section'     => 'UI',
4069     'description' => 'When using USPS web tools, automatically standardize the address without asking.',
4070     'type'        => 'checkbox',
4071   },
4072
4073   {
4074     'key'         => 'cust_main-require_censustract',
4075     'section'     => 'UI',
4076     'description' => 'Customer is required to have a census tract.  Useful for FCC form 477 reports. See also: cust_main-auto_standardize_address',
4077     'type'        => 'checkbox',
4078   },
4079
4080   {
4081     'key'         => 'census_year',
4082     'section'     => 'UI',
4083     'description' => 'The year to use in census tract lookups',
4084     'type'        => 'select',
4085     'select_enum' => [ qw( 2012 2011 2010 ) ],
4086   },
4087
4088   {
4089     'key'         => 'tax_district_method',
4090     'section'     => 'UI',
4091     'description' => 'The method to use to look up tax district codes.',
4092     'type'        => 'select',
4093     'select_hash' => [ FS::Misc::Geo::get_district_methods() ],
4094   },
4095
4096   {
4097     'key'         => 'company_latitude',
4098     'section'     => 'UI',
4099     'description' => 'Your company latitude (-90 through 90)',
4100     'type'        => 'text',
4101   },
4102
4103   {
4104     'key'         => 'company_longitude',
4105     'section'     => 'UI',
4106     'description' => 'Your company longitude (-180 thru 180)',
4107     'type'        => 'text',
4108   },
4109
4110   {
4111     'key'         => 'geocode_module',
4112     'section'     => '',
4113     'description' => 'Module to geocode (retrieve a latitude and longitude for) addresses',
4114     'type'        => 'select',
4115     'select_enum' => [ 'Geo::Coder::Googlev3' ],
4116   },
4117
4118   {
4119     'key'         => 'geocode-require_nw_coordinates',
4120     'section'     => 'UI',
4121     'description' => 'Require latitude and longitude in the North Western quadrant, e.g. for North American co-ordinates, etc.',
4122     'type'        => 'checkbox',
4123   },
4124
4125   {
4126     'key'         => 'disable_acl_changes',
4127     'section'     => '',
4128     'description' => 'Disable all ACL changes, for demos.',
4129     'type'        => 'checkbox',
4130   },
4131
4132   {
4133     'key'         => 'disable_settings_changes',
4134     'section'     => '',
4135     'description' => 'Disable all settings changes, for demos, except for the usernames given in the comma-separated list.',
4136     'type'        => [qw( checkbox text )],
4137   },
4138
4139   {
4140     'key'         => 'cust_main-edit_agent_custid',
4141     'section'     => 'UI',
4142     'description' => 'Enable editing of the agent_custid field.',
4143     'type'        => 'checkbox',
4144   },
4145
4146   {
4147     'key'         => 'cust_main-default_agent_custid',
4148     'section'     => 'UI',
4149     'description' => 'Display the agent_custid field when available instead of the custnum field.',
4150     'type'        => 'checkbox',
4151   },
4152
4153   {
4154     'key'         => 'cust_main-title-display_custnum',
4155     'section'     => 'UI',
4156     'description' => 'Add the display_custom (agent_custid or custnum) to the title on customer view pages.',
4157     'type'        => 'checkbox',
4158   },
4159
4160   {
4161     'key'         => 'cust_bill-default_agent_invid',
4162     'section'     => 'UI',
4163     'description' => 'Display the agent_invid field when available instead of the invnum field.',
4164     'type'        => 'checkbox',
4165   },
4166
4167   {
4168     'key'         => 'cust_main-auto_agent_custid',
4169     'section'     => 'UI',
4170     'description' => 'Automatically assign an agent_custid - select format',
4171     'type'        => 'select',
4172     'select_hash' => [ '' => 'No',
4173                        '1YMMXXXXXXXX' => '1YMMXXXXXXXX',
4174                      ],
4175   },
4176
4177   {
4178     'key'         => 'cust_main-custnum-display_prefix',
4179     'section'     => 'UI',
4180     'description' => 'Prefix the customer number with this string for display purposes.',
4181     'type'        => 'text',
4182     'per_agent'   => 1,
4183   },
4184
4185   {
4186     'key'         => 'cust_main-custnum-display_special',
4187     'section'     => 'UI',
4188     'description' => 'Use this customer number prefix format',
4189     'type'        => 'select',
4190     'select_hash' => [ '' => '',
4191                        'CoStAg' => 'CoStAg (country, state, agent name or display_prefix)',
4192                        'CoStCl' => 'CoStCl (country, state, class name)' ],
4193   },
4194
4195   {
4196     'key'         => 'cust_main-custnum-display_length',
4197     'section'     => 'UI',
4198     'description' => 'Zero fill the customer number to this many digits for display purposes.',
4199     'type'        => 'text',
4200   },
4201
4202   {
4203     'key'         => 'cust_main-default_areacode',
4204     'section'     => 'UI',
4205     'description' => 'Default area code for customers.',
4206     'type'        => 'text',
4207   },
4208
4209   {
4210     'key'         => 'order_pkg-no_start_date',
4211     'section'     => 'UI',
4212     'description' => 'Don\'t set a default start date for new packages.',
4213     'type'        => 'checkbox',
4214   },
4215
4216   {
4217     'key'         => 'mcp_svcpart',
4218     'section'     => '',
4219     'description' => 'Master Control Program svcpart.  Leave this blank.',
4220     'type'        => 'text', #select-part_svc
4221   },
4222
4223   {
4224     'key'         => 'cust_bill-max_same_services',
4225     'section'     => 'invoicing',
4226     'description' => 'Maximum number of the same service to list individually on invoices before condensing to a single line listing the number of services.  Defaults to 5.',
4227     'type'        => 'text',
4228   },
4229
4230   {
4231     'key'         => 'cust_bill-consolidate_services',
4232     'section'     => 'invoicing',
4233     'description' => 'Consolidate service display into fewer lines on invoices rather than one per service.',
4234     'type'        => 'checkbox',
4235   },
4236
4237   {
4238     'key'         => 'suspend_email_admin',
4239     'section'     => '',
4240     'description' => 'Destination admin email address to enable suspension notices',
4241     'type'        => 'text',
4242   },
4243
4244   {
4245     'key'         => 'unsuspend_email_admin',
4246     'section'     => '',
4247     'description' => 'Destination admin email address to enable unsuspension notices',
4248     'type'        => 'text',
4249   },
4250   
4251   {
4252     'key'         => 'email_report-subject',
4253     'section'     => '',
4254     'description' => 'Subject for reports emailed by freeside-fetch.  Defaults to "Freeside report".',
4255     'type'        => 'text',
4256   },
4257
4258   {
4259     'key'         => 'selfservice-head',
4260     'section'     => 'self-service',
4261     'description' => 'HTML for the HEAD section of the self-service interface, typically used for LINK stylesheet tags',
4262     'type'        => 'textarea', #htmlarea?
4263     'per_agent'   => 1,
4264   },
4265
4266
4267   {
4268     'key'         => 'selfservice-body_header',
4269     'section'     => 'self-service',
4270     'description' => 'HTML header for the self-service interface',
4271     'type'        => 'textarea', #htmlarea?
4272     'per_agent'   => 1,
4273   },
4274
4275   {
4276     'key'         => 'selfservice-body_footer',
4277     'section'     => 'self-service',
4278     'description' => 'HTML footer for the self-service interface',
4279     'type'        => 'textarea', #htmlarea?
4280     'per_agent'   => 1,
4281   },
4282
4283
4284   {
4285     'key'         => 'selfservice-body_bgcolor',
4286     'section'     => 'self-service',
4287     'description' => 'HTML background color for the self-service interface, for example, #FFFFFF',
4288     'type'        => 'text',
4289     'per_agent'   => 1,
4290   },
4291
4292   {
4293     'key'         => 'selfservice-box_bgcolor',
4294     'section'     => 'self-service',
4295     'description' => 'HTML color for self-service interface input boxes, for example, #C0C0C0',
4296     'type'        => 'text',
4297     'per_agent'   => 1,
4298   },
4299
4300   {
4301     'key'         => 'selfservice-stripe1_bgcolor',
4302     'section'     => 'self-service',
4303     'description' => 'HTML color for self-service interface lists (primary stripe), for example, #FFFFFF',
4304     'type'        => 'text',
4305     'per_agent'   => 1,
4306   },
4307
4308   {
4309     'key'         => 'selfservice-stripe2_bgcolor',
4310     'section'     => 'self-service',
4311     'description' => 'HTML color for self-service interface lists (alternate stripe), for example, #DDDDDD',
4312     'type'        => 'text',
4313     'per_agent'   => 1,
4314   },
4315
4316   {
4317     'key'         => 'selfservice-text_color',
4318     'section'     => 'self-service',
4319     'description' => 'HTML text color for the self-service interface, for example, #000000',
4320     'type'        => 'text',
4321     'per_agent'   => 1,
4322   },
4323
4324   {
4325     'key'         => 'selfservice-link_color',
4326     'section'     => 'self-service',
4327     'description' => 'HTML link color for the self-service interface, for example, #0000FF',
4328     'type'        => 'text',
4329     'per_agent'   => 1,
4330   },
4331
4332   {
4333     'key'         => 'selfservice-vlink_color',
4334     'section'     => 'self-service',
4335     'description' => 'HTML visited link color for the self-service interface, for example, #FF00FF',
4336     'type'        => 'text',
4337     'per_agent'   => 1,
4338   },
4339
4340   {
4341     'key'         => 'selfservice-hlink_color',
4342     'section'     => 'self-service',
4343     'description' => 'HTML hover link color for the self-service interface, for example, #808080',
4344     'type'        => 'text',
4345     'per_agent'   => 1,
4346   },
4347
4348   {
4349     'key'         => 'selfservice-alink_color',
4350     'section'     => 'self-service',
4351     'description' => 'HTML active (clicked) link color for the self-service interface, for example, #808080',
4352     'type'        => 'text',
4353     'per_agent'   => 1,
4354   },
4355
4356   {
4357     'key'         => 'selfservice-font',
4358     'section'     => 'self-service',
4359     'description' => 'HTML font CSS for the self-service interface, for example, 0.9em/1.5em Arial, Helvetica, Geneva, sans-serif',
4360     'type'        => 'text',
4361     'per_agent'   => 1,
4362   },
4363
4364   {
4365     'key'         => 'selfservice-no_logo',
4366     'section'     => 'self-service',
4367     'description' => 'Disable the logo in self-service',
4368     'type'        => 'checkbox',
4369     'per_agent'   => 1,
4370   },
4371
4372   {
4373     'key'         => 'selfservice-title_color',
4374     'section'     => 'self-service',
4375     'description' => 'HTML color for the self-service title, for example, #000000',
4376     'type'        => 'text',
4377     'per_agent'   => 1,
4378   },
4379
4380   {
4381     'key'         => 'selfservice-title_align',
4382     'section'     => 'self-service',
4383     'description' => 'HTML alignment for the self-service title, for example, center',
4384     'type'        => 'text',
4385     'per_agent'   => 1,
4386   },
4387   {
4388     'key'         => 'selfservice-title_size',
4389     'section'     => 'self-service',
4390     'description' => 'HTML font size for the self-service title, for example, 3',
4391     'type'        => 'text',
4392     'per_agent'   => 1,
4393   },
4394
4395   {
4396     'key'         => 'selfservice-title_left_image',
4397     'section'     => 'self-service',
4398     'description' => 'Image used for the top of the menu in the self-service interface, in PNG format.',
4399     'type'        => 'image',
4400     'per_agent'   => 1,
4401   },
4402
4403   {
4404     'key'         => 'selfservice-title_right_image',
4405     'section'     => 'self-service',
4406     'description' => 'Image used for the top of the menu in the self-service interface, in PNG format.',
4407     'type'        => 'image',
4408     'per_agent'   => 1,
4409   },
4410
4411   {
4412     'key'         => 'selfservice-menu_skipblanks',
4413     'section'     => 'self-service',
4414     'description' => 'Skip blank (spacer) entries in the self-service menu',
4415     'type'        => 'checkbox',
4416     'per_agent'   => 1,
4417   },
4418
4419   {
4420     'key'         => 'selfservice-menu_skipheadings',
4421     'section'     => 'self-service',
4422     'description' => 'Skip the unclickable heading entries in the self-service menu',
4423     'type'        => 'checkbox',
4424     'per_agent'   => 1,
4425   },
4426
4427   {
4428     'key'         => 'selfservice-menu_bgcolor',
4429     'section'     => 'self-service',
4430     'description' => 'HTML color for the self-service menu, for example, #C0C0C0',
4431     'type'        => 'text',
4432     'per_agent'   => 1,
4433   },
4434
4435   {
4436     'key'         => 'selfservice-menu_fontsize',
4437     'section'     => 'self-service',
4438     'description' => 'HTML font size for the self-service menu, for example, -1',
4439     'type'        => 'text',
4440     'per_agent'   => 1,
4441   },
4442   {
4443     'key'         => 'selfservice-menu_nounderline',
4444     'section'     => 'self-service',
4445     'description' => 'Styles menu links in the self-service without underlining.',
4446     'type'        => 'checkbox',
4447     'per_agent'   => 1,
4448   },
4449
4450
4451   {
4452     'key'         => 'selfservice-menu_top_image',
4453     'section'     => 'self-service',
4454     'description' => 'Image used for the top of the menu in the self-service interface, in PNG format.',
4455     'type'        => 'image',
4456     'per_agent'   => 1,
4457   },
4458
4459   {
4460     'key'         => 'selfservice-menu_body_image',
4461     'section'     => 'self-service',
4462     'description' => 'Repeating image used for the body of the menu in the self-service interface, in PNG format.',
4463     'type'        => 'image',
4464     'per_agent'   => 1,
4465   },
4466
4467   {
4468     'key'         => 'selfservice-menu_bottom_image',
4469     'section'     => 'self-service',
4470     'description' => 'Image used for the bottom of the menu in the self-service interface, in PNG format.',
4471     'type'        => 'image',
4472     'per_agent'   => 1,
4473   },
4474   
4475   {
4476     'key'         => 'selfservice-view_usage_nodomain',
4477     'section'     => 'self-service',
4478     'description' => 'Show usernames without their domains in "View my usage" in the self-service interface.',
4479     'type'        => 'checkbox',
4480   },
4481
4482   {
4483     'key'         => 'selfservice-login_banner_image',
4484     'section'     => 'self-service',
4485     'description' => 'Banner image shown on the login page, in PNG format.',
4486     'type'        => 'image',
4487   },
4488
4489   {
4490     'key'         => 'selfservice-login_banner_url',
4491     'section'     => 'self-service',
4492     'description' => 'Link for the login banner.',
4493     'type'        => 'text',
4494   },
4495
4496   {
4497     'key'         => 'selfservice-bulk_format',
4498     'section'     => 'deprecated',
4499     'description' => 'Parameter arrangement for selfservice bulk features',
4500     'type'        => 'select',
4501     'select_enum' => [ '', 'izoom-soap', 'izoom-ftp' ],
4502     'per_agent'   => 1,
4503   },
4504
4505   {
4506     'key'         => 'selfservice-bulk_ftp_dir',
4507     'section'     => 'deprecated',
4508     'description' => 'Enable bulk ftp provisioning in this folder',
4509     'type'        => 'text',
4510     'per_agent'   => 1,
4511   },
4512
4513   {
4514     'key'         => 'signup-no_company',
4515     'section'     => 'self-service',
4516     'description' => "Don't display a field for company name on signup.",
4517     'type'        => 'checkbox',
4518   },
4519
4520   {
4521     'key'         => 'signup-recommend_email',
4522     'section'     => 'self-service',
4523     'description' => 'Encourage the entry of an invoicing email address on signup.',
4524     'type'        => 'checkbox',
4525   },
4526
4527   {
4528     'key'         => 'signup-recommend_daytime',
4529     'section'     => 'self-service',
4530     'description' => 'Encourage the entry of a daytime phone number on signup.',
4531     'type'        => 'checkbox',
4532   },
4533
4534   {
4535     'key'         => 'signup-duplicate_cc-warn_hours',
4536     'section'     => 'self-service',
4537     'description' => 'Issue a warning if the same credit card is used for multiple signups within this many hours.',
4538     'type'        => 'text',
4539   },
4540
4541   {
4542     'key'         => 'svc_phone-radius-default_password',
4543     'section'     => 'telephony',
4544     'description' => 'Default password when exporting svc_phone records to RADIUS',
4545     'type'        => 'text',
4546   },
4547
4548   {
4549     'key'         => 'svc_phone-allow_alpha_phonenum',
4550     'section'     => 'telephony',
4551     'description' => 'Allow letters in phone numbers.',
4552     'type'        => 'checkbox',
4553   },
4554
4555   {
4556     'key'         => 'svc_phone-domain',
4557     'section'     => 'telephony',
4558     'description' => 'Track an optional domain association with each phone service.',
4559     'type'        => 'checkbox',
4560   },
4561
4562   {
4563     'key'         => 'svc_phone-phone_name-max_length',
4564     'section'     => 'telephony',
4565     'description' => 'Maximum length of the phone service "Name" field (svc_phone.phone_name).  Sometimes useful to limit this (to 15?) when exporting as Caller ID data.',
4566     'type'        => 'text',
4567   },
4568
4569   {
4570     'key'         => 'svc_phone-random_pin',
4571     'section'     => 'telephony',
4572     'description' => 'Number of random digits to generate in the "PIN" field, if empty.',
4573     'type'        => 'text',
4574   },
4575
4576   {
4577     'key'         => 'svc_phone-lnp',
4578     'section'     => 'telephony',
4579     'description' => 'Enables Number Portability features for svc_phone',
4580     'type'        => 'checkbox',
4581   },
4582
4583   {
4584     'key'         => 'default_phone_countrycode',
4585     'section'     => '',
4586     'description' => 'Default countrcode',
4587     'type'        => 'text',
4588   },
4589
4590   {
4591     'key'         => 'cdr-charged_party-field',
4592     'section'     => 'telephony',
4593     'description' => 'Set the charged_party field of CDRs to this field.',
4594     'type'        => 'select-sub',
4595     'options_sub' => sub { my $fields = FS::cdr->table_info->{'fields'};
4596                            map { $_ => $fields->{$_}||$_ }
4597                            grep { $_ !~ /^(acctid|charged_party)$/ }
4598                            FS::Schema::dbdef->table('cdr')->columns;
4599                          },
4600     'option_sub'  => sub { my $f = shift;
4601                            FS::cdr->table_info->{'fields'}{$f} || $f;
4602                          },
4603   },
4604
4605   #probably deprecate in favor of cdr-charged_party-field above
4606   {
4607     'key'         => 'cdr-charged_party-accountcode',
4608     'section'     => 'telephony',
4609     'description' => 'Set the charged_party field of CDRs to the accountcode.',
4610     'type'        => 'checkbox',
4611   },
4612
4613   {
4614     'key'         => 'cdr-charged_party-accountcode-trim_leading_0s',
4615     'section'     => 'telephony',
4616     'description' => 'When setting the charged_party field of CDRs to the accountcode, trim any leading zeros.',
4617     'type'        => 'checkbox',
4618   },
4619
4620 #  {
4621 #    'key'         => 'cdr-charged_party-truncate_prefix',
4622 #    'section'     => '',
4623 #    'description' => 'If the charged_party field has this prefix, truncate it to the length in cdr-charged_party-truncate_length.',
4624 #    'type'        => 'text',
4625 #  },
4626 #
4627 #  {
4628 #    'key'         => 'cdr-charged_party-truncate_length',
4629 #    'section'     => '',
4630 #    'description' => 'If the charged_party field has the prefix in cdr-charged_party-truncate_prefix, truncate it to this length.',
4631 #    'type'        => 'text',
4632 #  },
4633
4634   {
4635     'key'         => 'cdr-charged_party_rewrite',
4636     'section'     => 'telephony',
4637     'description' => 'Do charged party rewriting in the freeside-cdrrewrited daemon; useful if CDRs are being dropped off directly in the database and require special charged_party processing such as cdr-charged_party-accountcode or cdr-charged_party-truncate*.',
4638     'type'        => 'checkbox',
4639   },
4640
4641   {
4642     'key'         => 'cdr-taqua-da_rewrite',
4643     'section'     => 'telephony',
4644     'description' => 'For the Taqua CDR format, a comma-separated list of directory assistance 800 numbers.  Any CDRs with these numbers as "BilledNumber" will be rewritten to the "CallingPartyNumber" (and CallType "12") on import.',
4645     'type'        => 'text',
4646   },
4647
4648   {
4649     'key'         => 'cdr-taqua-accountcode_rewrite',
4650     'section'     => 'telephony',
4651     'description' => 'For the Taqua CDR format, pull accountcodes from secondary CDRs with matching sessionNumber.',
4652     'type'        => 'checkbox',
4653   },
4654
4655   {
4656     'key'         => 'cdr-asterisk_australia_rewrite',
4657     'section'     => 'telephony',
4658     'description' => 'For Asterisk CDRs, assign CDR type numbers based on Australian conventions.',
4659     'type'        => 'checkbox',
4660   },
4661
4662   {
4663     'key'         => 'cust_pkg-show_autosuspend',
4664     'section'     => 'UI',
4665     'description' => 'Show package auto-suspend dates.  Use with caution for now; can slow down customer view for large insallations.',
4666     'type'        => 'checkbox',
4667   },
4668
4669   {
4670     'key'         => 'cdr-asterisk_forward_rewrite',
4671     'section'     => 'telephony',
4672     'description' => 'Enable special processing for CDRs representing forwarded calls: For CDRs that have a dcontext that starts with "Local/" but does not match dst, set charged_party to dst, parse a new dst from dstchannel, and set amaflags to "2" ("BILL"/"BILLING").',
4673     'type'        => 'checkbox',
4674   },
4675
4676   {
4677     'key'         => 'mc-outbound_packages',
4678     'section'     => '',
4679     'description' => "Don't use this.",
4680     'type'        => 'select-part_pkg',
4681     'multiple'    => 1,
4682   },
4683
4684   {
4685     'key'         => 'disable-cust-pkg_class',
4686     'section'     => 'UI',
4687     'description' => 'Disable the two-step dropdown for selecting package class and package, and return to the classic single dropdown.',
4688     'type'        => 'checkbox',
4689   },
4690
4691   {
4692     'key'         => 'queued-max_kids',
4693     'section'     => '',
4694     'description' => 'Maximum number of queued processes.  Defaults to 10.',
4695     'type'        => 'text',
4696   },
4697
4698   {
4699     'key'         => 'queued-sleep_time',
4700     'section'     => '',
4701     'description' => 'Time to sleep between attempts to find new jobs to process in the queue.  Defaults to 10.  Installations doing real-time CDR processing for prepaid may want to set it lower.',
4702     'type'        => 'text',
4703   },
4704
4705   {
4706     'key'         => 'cancelled_cust-noevents',
4707     'section'     => 'billing',
4708     'description' => "Don't run events for cancelled customers",
4709     'type'        => 'checkbox',
4710   },
4711
4712   {
4713     'key'         => 'agent-invoice_template',
4714     'section'     => 'invoicing',
4715     'description' => 'Enable display/edit of old-style per-agent invoice template selection',
4716     'type'        => 'checkbox',
4717   },
4718
4719   {
4720     'key'         => 'svc_broadband-manage_link',
4721     'section'     => 'UI',
4722     'description' => 'URL for svc_broadband "Manage Device" link.  The following substitutions are available: $ip_addr.',
4723     'type'        => 'text',
4724   },
4725
4726   {
4727     'key'         => 'svc_broadband-manage_link_text',
4728     'section'     => 'UI',
4729     'description' => 'Label for "Manage Device" link',
4730     'type'        => 'text',
4731   },
4732
4733   {
4734     'key'         => 'svc_broadband-manage_link_loc',
4735     'section'     => 'UI',
4736     'description' => 'Location for "Manage Device" link',
4737     'type'        => 'select',
4738     'select_hash' => [
4739       'bottom' => 'Near Unprovision link',
4740       'right'  => 'With export-related links',
4741     ],
4742   },
4743
4744   {
4745     'key'         => 'svc_broadband-manage_link-new_window',
4746     'section'     => 'UI',
4747     'description' => 'Open the "Manage Device" link in a new window',
4748     'type'        => 'checkbox',
4749   },
4750
4751   #more fine-grained, service def-level control could be useful eventually?
4752   {
4753     'key'         => 'svc_broadband-allow_null_ip_addr',
4754     'section'     => '',
4755     'description' => '',
4756     'type'        => 'checkbox',
4757   },
4758
4759   {
4760     'key'         => 'svc_hardware-check_mac_addr',
4761     'section'     => '', #?
4762     'description' => 'Require the "hardware address" field in hardware services to be a valid MAC address.',
4763     'type'        => 'checkbox',
4764   },
4765
4766   {
4767     'key'         => 'tax-report_groups',
4768     'section'     => '',
4769     'description' => 'List of grouping possibilities for tax names on reports, one per line, "label op value" (op can be = or !=).',
4770     'type'        => 'textarea',
4771   },
4772
4773   {
4774     'key'         => 'tax-cust_exempt-groups',
4775     'section'     => '',
4776     'description' => 'List of grouping possibilities for tax names, for per-customer exemption purposes, one tax name per line.  For example, "GST" would indicate the ability to exempt customers individually from taxes named "GST" (but not other taxes).',
4777     'type'        => 'textarea',
4778   },
4779
4780   {
4781     'key'         => 'tax-cust_exempt-groups-require_individual_nums',
4782     'section'     => '',
4783     'description' => 'When using tax-cust_exempt-groups, require an individual tax exemption number for each exemption from different taxes.',
4784     'type'        => 'checkbox',
4785   },
4786
4787   {
4788     'key'         => 'cust_main-default_view',
4789     'section'     => 'UI',
4790     'description' => 'Default customer view, for users who have not selected a default view in their preferences.',
4791     'type'        => 'select',
4792     'select_hash' => [
4793       #false laziness w/view/cust_main.cgi and pref/pref.html
4794       'basics'          => 'Basics',
4795       'notes'           => 'Notes',
4796       'tickets'         => 'Tickets',
4797       'packages'        => 'Packages',
4798       'payment_history' => 'Payment History',
4799       'change_history'  => 'Change History',
4800       'jumbo'           => 'Jumbo',
4801     ],
4802   },
4803
4804   {
4805     'key'         => 'enable_tax_adjustments',
4806     'section'     => 'billing',
4807     'description' => 'Enable the ability to add manual tax adjustments.',
4808     'type'        => 'checkbox',
4809   },
4810
4811   {
4812     'key'         => 'rt-crontool',
4813     'section'     => '',
4814     'description' => 'Enable the RT CronTool extension.',
4815     'type'        => 'checkbox',
4816   },
4817
4818   {
4819     'key'         => 'pkg-balances',
4820     'section'     => 'billing',
4821     'description' => 'Enable experimental package balances.  Not recommended for general use.',
4822     'type'        => 'checkbox',
4823   },
4824
4825   {
4826     'key'         => 'pkg-addon_classnum',
4827     'section'     => 'billing',
4828     'description' => 'Enable the ability to restrict additional package orders based on package class.',
4829     'type'        => 'checkbox',
4830   },
4831
4832   {
4833     'key'         => 'cust_main-edit_signupdate',
4834     'section'     => 'UI',
4835     'description' => 'Enable manual editing of the signup date.',
4836     'type'        => 'checkbox',
4837   },
4838
4839   {
4840     'key'         => 'svc_acct-disable_access_number',
4841     'section'     => 'UI',
4842     'description' => 'Disable access number selection.',
4843     'type'        => 'checkbox',
4844   },
4845
4846   {
4847     'key'         => 'cust_bill_pay_pkg-manual',
4848     'section'     => 'UI',
4849     'description' => 'Allow manual application of payments to line items.',
4850     'type'        => 'checkbox',
4851   },
4852
4853   {
4854     'key'         => 'cust_credit_bill_pkg-manual',
4855     'section'     => 'UI',
4856     'description' => 'Allow manual application of credits to line items.',
4857     'type'        => 'checkbox',
4858   },
4859
4860   {
4861     'key'         => 'breakage-days',
4862     'section'     => 'billing',
4863     'description' => 'If set to a number of days, after an account goes that long without activity, recognizes any outstanding payments and credits as "breakage" by creating a breakage charge and invoice.',
4864     'type'        => 'text',
4865     'per_agent'   => 1,
4866   },
4867
4868   {
4869     'key'         => 'breakage-pkg_class',
4870     'section'     => 'billing',
4871     'description' => 'Package class to use for breakage reconciliation.',
4872     'type'        => 'select-pkg_class',
4873   },
4874
4875   {
4876     'key'         => 'disable_cron_billing',
4877     'section'     => 'billing',
4878     'description' => 'Disable billing and collection from being run by freeside-daily and freeside-monthly, while still allowing other actions to run, such as notifications and backup.',
4879     'type'        => 'checkbox',
4880   },
4881
4882   {
4883     'key'         => 'svc_domain-edit_domain',
4884     'section'     => '',
4885     'description' => 'Enable domain renaming',
4886     'type'        => 'checkbox',
4887   },
4888
4889   {
4890     'key'         => 'enable_legacy_prepaid_income',
4891     'section'     => '',
4892     'description' => "Enable legacy prepaid income reporting.  Only useful when you have imported pre-Freeside packages with longer-than-monthly duration, and need to do prepaid income reporting on them before they've been invoiced the first time.",
4893     'type'        => 'checkbox',
4894   },
4895
4896   {
4897     'key'         => 'cust_main-exports',
4898     'section'     => '',
4899     'description' => 'Export(s) to call on cust_main insert, modification and deletion.',
4900     'type'        => 'select-sub',
4901     'multiple'    => 1,
4902     'options_sub' => sub {
4903       require FS::Record;
4904       require FS::part_export;
4905       my @part_export =
4906         map { qsearch( 'part_export', {exporttype => $_ } ) }
4907           keys %{FS::part_export::export_info('cust_main')};
4908       map { $_->exportnum => $_->exporttype.' to '.$_->machine } @part_export;
4909     },
4910     'option_sub'  => sub {
4911       require FS::Record;
4912       require FS::part_export;
4913       my $part_export = FS::Record::qsearchs(
4914         'part_export', { 'exportnum' => shift }
4915       );
4916       $part_export
4917         ? $part_export->exporttype.' to '.$part_export->machine
4918         : '';
4919     },
4920   },
4921
4922   {
4923     'key'         => 'cust_tag-location',
4924     'section'     => 'UI',
4925     'description' => 'Location where customer tags are displayed.',
4926     'type'        => 'select',
4927     'select_enum' => [ 'misc_info', 'top' ],
4928   },
4929
4930   {
4931     'key'         => 'maestro-status_test',
4932     'section'     => 'UI',
4933     'description' => 'Display a link to the maestro status test page on the customer view page',
4934     'type'        => 'checkbox',
4935   },
4936
4937   {
4938     'key'         => 'cust_main-custom_link',
4939     'section'     => 'UI',
4940     'description' => 'URL to use as source for the "Custom" tab in the View Customer page.  The customer number will be appended, or you can insert "$custnum" to have it inserted elsewhere.  "$agentnum" will be replaced with the agent number, and "$usernum" will be replaced with the employee number.',
4941     'type'        => 'textarea',
4942   },
4943
4944   {
4945     'key'         => 'cust_main-custom_content',
4946     'section'     => 'UI',
4947     'description' => 'As an alternative to cust_main-custom_link (leave it blank), the contant to display on this customer page, one item per line.  Available iems are: small_custview, birthdate, spouse_birthdate, svc_acct, svc_phone and svc_external.',
4948     'type'        => 'textarea',
4949   },
4950
4951   {
4952     'key'         => 'cust_main-custom_title',
4953     'section'     => 'UI',
4954     'description' => 'Title for the "Custom" tab in the View Customer page.',
4955     'type'        => 'text',
4956   },
4957
4958   {
4959     'key'         => 'part_pkg-default_suspend_bill',
4960     'section'     => 'billing',
4961     'description' => 'Default the "Continue recurring billing while suspended" flag to on for new package definitions.',
4962     'type'        => 'checkbox',
4963   },
4964   
4965   {
4966     'key'         => 'qual-alt_address_format',
4967     'section'     => 'UI',
4968     'description' => 'Enable the alternate address format (location type, number, and kind) for qualifications.',
4969     'type'        => 'checkbox',
4970   },
4971
4972   {
4973     'key'         => 'prospect_main-alt_address_format',
4974     'section'     => 'UI',
4975     'description' => 'Enable the alternate address format (location type, number, and kind) for prospects.  Recommended if qual-alt_address_format is set and the main use of propects is for qualifications.',
4976     'type'        => 'checkbox',
4977   },
4978
4979   {
4980     'key'         => 'prospect_main-location_required',
4981     'section'     => 'UI',
4982     'description' => 'Require an address for prospects.  Recommended if the main use of propects is for qualifications.',
4983     'type'        => 'checkbox',
4984   },
4985
4986   {
4987     'key'         => 'note-classes',
4988     'section'     => 'UI',
4989     'description' => 'Use customer note classes',
4990     'type'        => 'select',
4991     'select_hash' => [
4992                        0 => 'Disabled',
4993                        1 => 'Enabled',
4994                        2 => 'Enabled, with tabs',
4995                      ],
4996   },
4997
4998   {
4999     'key'         => 'svc_acct-cf_privatekey-message',
5000     'section'     => '',
5001     'description' => 'For internal use: HTML displayed when cf_privatekey field is set.',
5002     'type'        => 'textarea',
5003   },
5004
5005   {
5006     'key'         => 'menu-prepend_links',
5007     'section'     => 'UI',
5008     'description' => 'Links to prepend to the main menu, one per line, with format "URL Link Label (optional ALT popup)".',
5009     'type'        => 'textarea',
5010   },
5011
5012   {
5013     'key'         => 'cust_main-external_links',
5014     'section'     => 'UI',
5015     'description' => 'External links available in customer view, one per line, with format "URL Link Label (optional ALT popup)".  The URL will have custnum appended.',
5016     'type'        => 'textarea',
5017   },
5018   
5019   {
5020     'key'         => 'svc_phone-did-summary',
5021     'section'     => 'invoicing',
5022     'description' => 'Enable DID activity summary on invoices, showing # DIDs activated/deactivated/ported-in/ported-out and total minutes usage, covering period since last invoice.',
5023     'type'        => 'checkbox',
5024   },
5025
5026   {
5027     'key'         => 'svc_acct-usage_seconds',
5028     'section'     => 'invoicing',
5029     'description' => 'Enable calculation of RADIUS usage time for invoices.  You must modify your template to display this information.',
5030     'type'        => 'checkbox',
5031   },
5032   
5033   {
5034     'key'         => 'opensips_gwlist',
5035     'section'     => 'telephony',
5036     'description' => 'For svc_phone OpenSIPS dr_rules export, gwlist column value, per-agent',
5037     'type'        => 'text',
5038     'per_agent'   => 1,
5039     'agentonly'   => 1,
5040   },
5041
5042   {
5043     'key'         => 'opensips_description',
5044     'section'     => 'telephony',
5045     'description' => 'For svc_phone OpenSIPS dr_rules export, description column value, per-agent',
5046     'type'        => 'text',
5047     'per_agent'   => 1,
5048     'agentonly'   => 1,
5049   },
5050   
5051   {
5052     'key'         => 'opensips_route',
5053     'section'     => 'telephony',
5054     'description' => 'For svc_phone OpenSIPS dr_rules export, routeid column value, per-agent',
5055     'type'        => 'text',
5056     'per_agent'   => 1,
5057     'agentonly'   => 1,
5058   },
5059
5060   {
5061     'key'         => 'cust_bill-no_recipients-error',
5062     'section'     => 'invoicing',
5063     'description' => 'For customers with no invoice recipients, throw a job queue error rather than the default behavior of emailing the invoice to the invoice_from address.',
5064     'type'        => 'checkbox',
5065   },
5066
5067   {
5068     'key'         => 'cust_bill-latex_lineitem_maxlength',
5069     'section'     => 'invoicing',
5070     'description' => 'Truncate long line items to this number of characters on typeset invoices, to avoid losing things off the right margin.  Defaults to 50.  ',
5071     'type'        => 'text',
5072   },
5073
5074   {
5075     'key'         => 'cust_main-status_module',
5076     'section'     => 'UI',
5077     'description' => 'Which module to use for customer status display.  The "Classic" module (the default) considers accounts with cancelled recurring packages but un-cancelled one-time charges Inactive.  The "Recurring" module considers those customers Cancelled.  Similarly for customers with suspended recurring packages but one-time charges.', #other differences?
5078     'type'        => 'select',
5079     'select_enum' => [ 'Classic', 'Recurring' ],
5080   },
5081
5082   {
5083     'key'         => 'cust_main-print_statement_link',
5084     'section'     => 'UI',
5085     'description' => 'Show a link to download a current statement for the customer.',
5086     'type'        => 'checkbox',
5087   },
5088
5089   { 
5090     'key'         => 'username-pound',
5091     'section'     => 'username',
5092     'description' => 'Allow the pound character (#) in usernames.',
5093     'type'        => 'checkbox',
5094   },
5095
5096   {
5097     'key'         => 'ie-compatibility_mode',
5098     'section'     => 'UI',
5099     'description' => "Compatibility mode META tag for Internet Explorer, used on the customer view page.  Not necessary in normal operation unless custom content (notes, cust_main-custom_link) is included on customer view that is incompatibile with newer IE verisons.",
5100     'type'        => 'select',
5101     'select_enum' => [ '', '7', 'EmulateIE7', '8', 'EmulateIE8' ],
5102   },
5103
5104   {
5105     'key'         => 'disable_payauto_default',
5106     'section'     => 'UI',
5107     'description' => 'Disable the "Charge future payments to this (card|check) automatically" checkbox from defaulting to checked.',
5108     'type'        => 'checkbox',
5109   },
5110   
5111   {
5112     'key'         => 'payment-history-report',
5113     'section'     => 'UI',
5114     'description' => 'Show a link to the raw database payment history report in the Reports menu.  DO NOT ENABLE THIS for modern installations.',
5115     'type'        => 'checkbox',
5116   },
5117   
5118   {
5119     'key'         => 'svc_broadband-require-nw-coordinates',
5120     'section'     => 'deprecated',
5121     'description' => 'Deprecated; see geocode-require_nw_coordinates instead',
5122     'type'        => 'checkbox',
5123   },
5124   
5125   {
5126     'key'         => 'cust-email-high-visibility',
5127     'section'     => 'UI',
5128     'description' => 'Move the invoicing e-mail address field to the top of the billing address section and highlight it.',
5129     'type'        => 'checkbox',
5130   },
5131   
5132   {
5133     'key'         => 'cust-edit-alt-field-order',
5134     'section'     => 'UI',
5135     'description' => 'An alternate ordering of fields for the New Customer and Edit Customer screens.',
5136     'type'        => 'checkbox',
5137   },
5138
5139   {
5140     'key'         => 'cust_bill-enable_promised_date',
5141     'section'     => 'UI',
5142     'description' => 'Enable display/editing of the "promised payment date" field on invoices.',
5143     'type'        => 'checkbox',
5144   },
5145   
5146   {
5147     'key'         => 'available-locales',
5148     'section'     => '',
5149     'description' => 'Limit available locales (employee preferences, per-customer locale selection, etc.) to a particular set.',
5150     'type'        => 'select-sub',
5151     'multiple'    => 1,
5152     'options_sub' => sub { 
5153       map { $_ => FS::Locales->description($_) }
5154       grep { $_ ne 'en_US' } 
5155       FS::Locales->locales;
5156     },
5157     'option_sub'  => sub { FS::Locales->description(shift) },
5158   },
5159
5160   {
5161     'key'         => 'cust_main-require_locale',
5162     'section'     => 'UI',
5163     'description' => 'Require an explicit locale to be chosen for new customers.',
5164     'type'        => 'checkbox',
5165   },
5166   
5167   {
5168     'key'         => 'translate-auto-insert',
5169     'section'     => '',
5170     'description' => 'Auto-insert untranslated strings for selected non-en_US locales with their default/en_US values.  Do not turn this on unless translating the interface into a new language.',
5171     'type'        => 'select',
5172     'multiple'    => 1,
5173     'select_enum' => [ grep { $_ ne 'en_US' } FS::Locales::locales ],
5174   },
5175
5176   {
5177     'key'         => 'svc_acct-tower_sector',
5178     'section'     => '',
5179     'description' => 'Track tower and sector for svc_acct (account) services.',
5180     'type'        => 'checkbox',
5181   },
5182
5183   {
5184     'key'         => 'cdr-prerate',
5185     'section'     => 'telephony',
5186     'description' => 'Experimental feature to rate CDRs immediately, rather than waiting until invoice generation time.  Can reduce invoice generation time when processing lots of CDRs.  Currently works with "VoIP/telco CDR rating (standard)" price plans using "Phone numbers (svc_phone.phonenum)" CDR service matching, without any included minutes.',
5187     'type'        => 'checkbox',
5188   },
5189
5190   {
5191     'key'         => 'cdr-prerate-cdrtypenums',
5192     'section'     => 'telephony',
5193     'description' => 'When using cdr-prerate to rate CDRs immediately, limit processing to these CDR types.',
5194     'type'        => 'select-sub',
5195     'multiple'    => 1,
5196     'options_sub' => sub { require FS::Record;
5197                            require FS::cdr_type;
5198                            map { $_->cdrtypenum => $_->cdrtypename }
5199                                FS::Record::qsearch( 'cdr_type', 
5200                                                     {} #{ 'disabled' => '' }
5201                                                   );
5202                          },
5203     'option_sub'  => sub { require FS::Record;
5204                            require FS::cdr_type;
5205                            my $cdr_type = FS::Record::qsearchs(
5206                              'cdr_type', { 'cdrtypenum'=>shift } );
5207                            $cdr_type ? $cdr_type->cdrtypename : '';
5208                          },
5209   },
5210   
5211   {
5212     'key'         => 'brand-agent',
5213     'section'     => 'UI',
5214     'description' => 'Brand the backoffice interface (currently Help->About) using the company_name, company_url and logo.png configuration settings of the selected agent.  Typically used when selling or bundling hosted access to the backoffice interface.  NOTE: The AGPL software license has specific requirements for source code availability in this situation.',
5215     'type'        => 'select-agent',
5216   },
5217
5218   {
5219     'key'         => 'cust_class-tax_exempt',
5220     'section'     => 'billing',
5221     'description' => 'Control the tax exemption flag per customer class rather than per indivual customer.',
5222     'type'        => 'checkbox',
5223   },
5224
5225   {
5226     'key'         => 'selfservice-billing_history-line_items',
5227     'section'     => 'self-service',
5228     'description' => 'Return line item billing detail for the self-service billing_history API call.',
5229     'type'        => 'checkbox',
5230   },
5231
5232   {
5233     'key'         => 'logout-timeout',
5234     'section'     => 'UI',
5235     'description' => 'If set, automatically log users out of the backoffice after this many minutes.',
5236     'type'       => 'text',
5237   },
5238   
5239   {
5240     'key'         => 'spreadsheet_format',
5241     'section'     => 'UI',
5242     'description' => 'Default format for spreadsheet download.',
5243     'type'        => 'select',
5244     'select_hash' => [
5245       'XLS' => 'XLS (Excel 97/2000/XP)',
5246       'XLSX' => 'XLSX (Excel 2007+)',
5247     ],
5248   },
5249
5250   {
5251     'key'         => 'agent-email_day',
5252     'section'     => '',
5253     'description' => 'On this day of each month, agents with master customer records containing email addresses will be emailed a list of their customers and balances.',
5254     'type'        => 'text',
5255   },
5256
5257   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5258   { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5259   { key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5260   { key => "bindprimary", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5261   { key => "bindsecondaries", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5262   { key => "bsdshellmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5263   { key => "cyrus", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5264   { key => "cp_app", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5265   { key => "erpcdmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5266   { key => "icradiusmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5267   { key => "icradius_mysqldest", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5268   { key => "icradius_mysqlsource", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5269   { key => "icradius_secrets", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5270   { key => "maildisablecatchall", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5271   { key => "mxmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5272   { key => "nsmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5273   { key => "arecords", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5274   { key => "cnamerecords", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5275   { key => "nismachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5276   { key => "qmailmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5277   { key => "radiusmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5278   { key => "sendmailconfigpath", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5279   { key => "sendmailmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5280   { key => "sendmailrestart", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5281   { key => "shellmachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5282   { key => "shellmachine-useradd", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5283   { key => "shellmachine-userdel", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5284   { key => "shellmachine-usermod", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5285   { key => "shellmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5286   { key => "radiusprepend", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5287   { key => "textradiusprepend", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5288   { key => "username_policy", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5289   { key => "vpopmailmachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5290   { key => "vpopmailrestart", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5291   { key => "safe-part_pkg", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5292   { key => "selfservice_server-quiet", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5293   { key => "signup_server-quiet", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5294   { key => "signup_server-email", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5295   { key => "vonage-username", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5296   { key => "vonage-password", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5297   { key => "vonage-fromnumber", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
5298
5299 );
5300
5301 1;
5302