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