3 use vars qw($base_dir @config_items @base_items @card_types $DEBUG);
10 use FS::Conf_compat17;
13 use FS::Record qw(qsearch qsearchs);
14 use FS::UID qw(dbh datasrc use_confcompat);
16 $base_dir = '%%%FREESIDE_CONF%%%';
22 FS::Conf - Freeside configuration values
30 $value = $conf->config('key');
31 @list = $conf->config('key');
32 $bool = $conf->exists('key');
35 $conf->set('key' => 'value');
38 @config_items = $conf->config_items;
42 Read and write Freeside configuration values. Keys currently map to filenames,
43 but this may change in the future.
51 Create a new configuration object.
57 my($class) = ref($proto) || $proto;
58 my($self) = { 'base_dir' => $base_dir };
59 bless ($self, $class);
64 Returns the base directory. By default this is /usr/local/etc/freeside.
70 my $base_dir = $self->{base_dir};
71 -e $base_dir or die "FATAL: $base_dir doesn't exist!";
72 -d $base_dir or die "FATAL: $base_dir isn't a directory!";
73 -r $base_dir or die "FATAL: Can't read $base_dir!";
74 -x $base_dir or die "FATAL: $base_dir not searchable (executable)!";
75 $base_dir =~ /^(.*)$/;
79 =item config KEY [ AGENTNUM ]
81 Returns the configuration value or values (depending on context) for key.
82 The optional agent number selects an agent specific value instead of the
83 global default if one is present.
88 my ($self, $method) = (shift, shift);
89 carp "NO CONFIGURATION RECORDS FOUND -- USING COMPATIBILITY MODE"
91 my $compat = new FS::Conf_compat17 ("$base_dir/conf." . datasrc);
96 my($self,$name,$agentnum)=@_;
97 my $hashref = { 'name' => $name };
98 $hashref->{agentnum} = $agentnum;
99 local $FS::Record::conf = undef; # XXX evil hack prevents recursion
100 my $cv = FS::Record::qsearchs('conf', $hashref);
101 if (!$cv && defined($agentnum) && $agentnum) {
102 $hashref->{agentnum} = '';
103 $cv = FS::Record::qsearchs('conf', $hashref);
110 return $self->_usecompat('config', @_) if use_confcompat;
112 my($name, $agentnum)=@_;
114 carp "FS::Conf->config($name, $agentnum) called"
117 my $cv = $self->_config($name, $agentnum) or return;
122 (split "\n", $v, -1);
124 (split("\n", $cv->value))[0];
128 =item config_binary KEY [ AGENTNUM ]
130 Returns the exact scalar value for key.
136 return $self->_usecompat('config_binary', @_) if use_confcompat;
138 my($name,$agentnum)=@_;
139 my $cv = $self->_config($name, $agentnum) or return;
140 decode_base64($cv->value);
143 =item exists KEY [ AGENTNUM ]
145 Returns true if the specified key exists, even if the corresponding value
152 return $self->_usecompat('exists', @_) if use_confcompat;
154 my($name, $agentnum)=@_;
156 carp "FS::Conf->exists($name, $agentnum) called"
159 defined($self->_config($name, $agentnum));
162 =item config_orbase KEY SUFFIX
164 Returns the configuration value or values (depending on context) for
165 KEY_SUFFIX, if it exists, otherwise for KEY
169 # outmoded as soon as we shift to agentnum based config values
170 # well, mostly. still useful for e.g. late notices, etc. in that we want
171 # these to fall back to standard values
174 return $self->_usecompat('config_orbase', @_) if use_confcompat;
176 my( $name, $suffix ) = @_;
177 if ( $self->exists("${name}_$suffix") ) {
178 $self->config("${name}_$suffix");
180 $self->config($name);
184 =item key_orbase KEY SUFFIX
186 If the config value KEY_SUFFIX exists, returns KEY_SUFFIX, otherwise returns
187 KEY. Useful for determining which exact configuration option is returned by
194 #no compat for this...return $self->_usecompat('config_orbase', @_) if use_confcompat;
196 my( $name, $suffix ) = @_;
197 if ( $self->exists("${name}_$suffix") ) {
204 =item invoice_templatenames
206 Returns all possible invoice template names.
210 sub invoice_templatenames {
213 my %templatenames = ();
214 foreach my $item ( $self->config_items ) {
215 foreach my $base ( @base_items ) {
216 my( $main, $ext) = split(/\./, $base);
217 $ext = ".$ext" if $ext;
218 if ( $item->key =~ /^${main}_(.+)$ext$/ ) {
219 $templatenames{$1}++;
224 sort keys %templatenames;
228 =item touch KEY [ AGENT ];
230 Creates the specified configuration key if it does not exist.
236 return $self->_usecompat('touch', @_) if use_confcompat;
238 my($name, $agentnum) = @_;
239 unless ( $self->exists($name, $agentnum) ) {
240 $self->set($name, '', $agentnum);
244 =item set KEY VALUE [ AGENTNUM ];
246 Sets the specified configuration key to the given value.
252 return $self->_usecompat('set', @_) if use_confcompat;
254 my($name, $value, $agentnum) = @_;
258 warn "[FS::Conf] SET $name\n" if $DEBUG;
260 my $old = FS::Record::qsearchs('conf', {name => $name, agentnum => $agentnum});
261 my $new = new FS::conf { $old ? $old->hash
262 : ('name' => $name, 'agentnum' => $agentnum)
268 $error = $new->replace($old);
270 $error = $new->insert;
273 die "error setting configuration value: $error \n"
278 =item set_binary KEY VALUE [ AGENTNUM ]
280 Sets the specified configuration key to an exact scalar value which
281 can be retrieved with config_binary.
287 return if use_confcompat;
289 my($name, $value, $agentnum)=@_;
290 $self->set($name, encode_base64($value), $agentnum);
293 =item delete KEY [ AGENTNUM ];
295 Deletes the specified configuration key.
301 return $self->_usecompat('delete', @_) if use_confcompat;
303 my($name, $agentnum) = @_;
304 if ( my $cv = FS::Record::qsearchs('conf', {name => $name, agentnum => $agentnum}) ) {
305 warn "[FS::Conf] DELETE $name\n";
307 my $oldAutoCommit = $FS::UID::AutoCommit;
308 local $FS::UID::AutoCommit = 0;
311 my $error = $cv->delete;
314 $dbh->rollback if $oldAutoCommit;
315 die "error setting configuration value: $error \n"
318 $dbh->commit or die $dbh->errstr if $oldAutoCommit;
323 =item import_config_item CONFITEM DIR
325 Imports the item specified by the CONFITEM (see L<FS::ConfItem>) into
326 the database as a conf record (see L<FS::conf>). Imports from the file
327 in the directory DIR.
331 sub import_config_item {
332 my ($self,$item,$dir) = @_;
333 my $key = $item->key;
334 if ( -e "$dir/$key" && ! use_confcompat ) {
335 warn "Inserting $key\n" if $DEBUG;
337 my $value = readline(new IO::File "$dir/$key");
338 if ($item->type =~ /^(binary|image)$/ ) {
339 $self->set_binary($key, $value);
341 $self->set($key, $value);
344 warn "Not inserting $key\n" if $DEBUG;
348 =item verify_config_item CONFITEM DIR
350 Compares the item specified by the CONFITEM (see L<FS::ConfItem>) in
351 the database to the legacy file value in DIR.
355 sub verify_config_item {
356 return '' if use_confcompat;
357 my ($self,$item,$dir) = @_;
358 my $key = $item->key;
359 my $type = $item->type;
361 my $compat = new FS::Conf_compat17 $dir;
364 $error .= "$key fails existential comparison; "
365 if $self->exists($key) xor $compat->exists($key);
367 if ( $type !~ /^(binary|image)$/ ) {
371 $error .= "$key fails scalar comparison; "
372 unless scalar($self->config($key)) eq scalar($compat->config($key));
375 my (@new) = $self->config($key);
376 my (@old) = $compat->config($key);
377 unless ( scalar(@new) == scalar(@old)) {
378 $error .= "$key fails list comparison; ";
381 foreach (@old) { $r=0 if ($_ cmp shift(@new)); }
382 $error .= "$key fails list comparison; "
388 $error .= "$key fails binary comparison; "
389 unless scalar($self->config_binary($key)) eq scalar($compat->config_binary($key));
393 #remove deprecated config on our own terms, not freeside-upgrade's
394 # if ($error =~ /existential comparison/ && $item->section eq 'deprecated') {
396 # for ( @config_items ) { $proto = $_; last if $proto->key eq $key; }
397 # unless ($proto->key eq $key) {
398 # warn "removed config item $error\n" if $DEBUG;
406 #item _orbase_items OPTIONS
408 #Returns all of the possible extensible config items as FS::ConfItem objects.
409 #See #L<FS::ConfItem>. OPTIONS consists of name value pairs. Possible
412 # dir - the directory to search for configuration option files instead
413 # of using the conf records in the database
419 my ($self, %opt) = @_;
421 my $listmaker = sub { my $v = shift;
423 if ( $v =~ /\.(png|eps)$/ ) {
429 FS::Record::qsearch( 'conf',
432 "WHERE name LIKE '$v' ESCAPE '!'"
436 if (exists($opt{dir}) && $opt{dir}) {
437 $listmaker = sub { my $v = shift;
438 if ( $v =~ /\.(png|eps)$/ ) {
443 map { basename $_ } glob($opt{dir}. "/$v" );
450 for ( @config_items ) { $proto = $_; last if $proto->key eq $base; }
451 die "don't know about $base items" unless $proto->key eq $base;
453 map { new FS::ConfItem {
455 'section' => $proto->section,
456 'description' => 'Alternate ' . $proto->description . ' See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Invoice_templates">billing documentation</a> for details.',
457 'type' => $proto->type,
459 } &$listmaker($base);
466 Returns all of the possible global/default configuration items as
467 FS::ConfItem objects. See L<FS::ConfItem>.
473 return $self->_usecompat('config_items', @_) if use_confcompat;
475 ( @config_items, $self->_orbase_items(@_) );
484 =item init-config DIR
486 Imports the configuration items from DIR (1.7 compatible)
487 to conf records in the database.
495 local $FS::UID::use_confcompat = 0;
496 my $conf = new FS::Conf;
497 foreach my $item ( $conf->config_items(dir => $dir) ) {
498 $conf->import_config_item($item, $dir);
499 my $error = $conf->verify_config_item($item, $dir);
500 return $error if $error;
503 my $compat = new FS::Conf_compat17 $dir;
504 foreach my $item ( $compat->config_items ) {
505 my $error = $conf->verify_config_item($item, $dir);
506 return $error if $error;
510 $FS::UID::use_confcompat = 0;
518 If this was more than just crud that will never be useful outside Freeside I'd
519 worry that config_items is freeside-specific and icky.
523 "Configuration" in the web interface (config/config.cgi).
527 #Business::CreditCard
532 "American Express card",
533 "Diner's Club/Carte Blanche",
544 invoice_latexreturnaddress
546 invoice_latexsmallfooter
550 invoice_htmlreturnaddress
557 @config_items = map { new FS::ConfItem $_ } (
561 'section' => 'deprecated',
562 'description' => 'This configuration option is no longer used. See <a href="#invoice_template">invoice_template</a> instead.',
567 'key' => 'alerter_template',
568 'section' => 'billing',
569 'description' => 'Template file for billing method expiration alerts. See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Credit_cards_and_Electronic_checks">billing documentation</a> for details.',
570 'type' => 'textarea',
576 #not actually deprecated yet
577 #'section' => 'deprecated',
578 #'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',
580 'description' => 'IP address to assign to new virtual hosts',
585 'key' => 'encryption',
586 'section' => 'billing',
587 'description' => 'Enable encryption of credit cards.',
588 'type' => 'checkbox',
592 'key' => 'encryptionmodule',
593 'section' => 'billing',
594 'description' => 'Use which module for encryption?',
599 'key' => 'encryptionpublickey',
600 'section' => 'billing',
601 'description' => 'Your RSA Public Key - Required if Encryption is turned on.',
602 'type' => 'textarea',
606 'key' => 'encryptionprivatekey',
607 'section' => 'billing',
608 '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.',
609 'type' => 'textarea',
613 'key' => 'business-onlinepayment',
614 'section' => 'billing',
615 '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.',
616 'type' => 'textarea',
620 'key' => 'business-onlinepayment-ach',
621 'section' => 'billing',
622 '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.',
623 'type' => 'textarea',
627 'key' => 'business-onlinepayment-namespace',
628 'section' => 'billing',
629 'description' => 'Specifies which perl module namespace (which group of collection routines) is used by default.',
632 'Business::OnlinePayment' => 'Direct API (Business::OnlinePayment)',
633 'Business::OnlineThirdPartyPayment' => 'Web API (Business::ThirdPartyPayment)',
638 'key' => 'business-onlinepayment-description',
639 'section' => 'billing',
640 '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)',
645 'key' => 'business-onlinepayment-email-override',
646 'section' => 'billing',
647 'description' => 'Email address used instead of customer email address when submitting a BOP transaction.',
652 'key' => 'business-onlinepayment-email_customer',
653 'section' => 'billing',
654 'description' => 'Controls the "email_customer" flag used by some Business::OnlinePayment processors to enable customer receipts.',
655 'type' => 'checkbox',
659 'key' => 'countrydefault',
661 'description' => 'Default two-letter country code (if not supplied, the default is `US\')',
666 'key' => 'date_format',
668 'description' => 'Format for displaying dates',
671 '%m/%d/%Y' => 'MM/DD/YYYY',
672 '%Y/%m/%d' => 'YYYY/MM/DD',
677 'key' => 'deletecustomers',
679 'description' => 'Enable customer deletions. Be very careful! Deleting a customer will remove all traces that this 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.',
680 'type' => 'checkbox',
684 'key' => 'deletepayments',
685 'section' => 'billing',
686 '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.',
687 'type' => [qw( checkbox text )],
691 'key' => 'deletecredits',
692 #not actually deprecated yet
693 #'section' => 'deprecated',
694 #'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.',
696 'description' => 'One or more comma-separated email addresses to be notified when a credit is deleted.',
697 'type' => [qw( checkbox text )],
701 'key' => 'deleterefunds',
702 'section' => 'billing',
703 'description' => 'Enable deletion of unclosed refunds. Be very careful! Only delete refunds that were data-entry errors, not adjustments.',
704 'type' => 'checkbox',
709 'section' => 'shell',
710 '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>',
715 'key' => 'disable_customer_referrals',
717 'description' => 'Disable new customer-to-customer referrals in the web interface',
718 'type' => 'checkbox',
722 'key' => 'editreferrals',
724 'description' => 'Enable advertising source modification for existing customers',
725 'type' => 'checkbox',
729 'key' => 'emailinvoiceonly',
730 'section' => 'billing',
731 'description' => 'Disables postal mail invoices',
732 'type' => 'checkbox',
736 'key' => 'disablepostalinvoicedefault',
737 'section' => 'billing',
738 '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>.',
739 'type' => 'checkbox',
743 'key' => 'emailinvoiceauto',
744 'section' => 'billing',
745 'description' => 'Automatically adds new accounts to the email invoice list',
746 'type' => 'checkbox',
750 'key' => 'emailinvoiceautoalways',
751 'section' => 'billing',
752 'description' => 'Automatically adds new accounts to the email invoice list even when the list contains email addresses',
753 'type' => 'checkbox',
757 'key' => 'exclude_ip_addr',
759 'description' => 'Exclude these from the list of available broadband service IP addresses. (One per line)',
760 'type' => 'textarea',
764 'key' => 'auto_router',
766 'description' => 'Automatically choose the correct router/block based on supplied ip address when possible while provisioning broadband services',
767 'type' => 'checkbox',
771 'key' => 'hidecancelledpackages',
773 'description' => 'Prevent cancelled packages from showing up in listings (though they will still be in the database)',
774 'type' => 'checkbox',
778 'key' => 'hidecancelledcustomers',
780 'description' => 'Prevent customers with only cancelled packages from showing up in listings (though they will still be in the database)',
781 'type' => 'checkbox',
786 'section' => 'shell',
787 'description' => 'For new users, prefixed to username to create a directory name. Should have a leading but not a trailing slash.',
792 'key' => 'invoice_from',
793 'section' => 'required',
794 'description' => 'Return address on email invoices',
800 'key' => 'invoice_subject',
801 'section' => 'billing',
802 'description' => 'Subject: header on email invoices. Defaults to "Invoice". The following substitutions are available: $name, $name_short, $invoice_number, and $invoice_date.',
808 'key' => 'invoice_template',
809 'section' => 'billing',
810 '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:1.7:Documentation:Administration#Plaintext_invoice_templates">billing documentation</a> for details.',
811 'type' => 'textarea',
815 'key' => 'invoice_html',
816 'section' => 'billing',
817 'description' => 'Optional HTML template for invoices. See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#HTML_invoice_templates">billing documentation</a> for details.',
819 'type' => 'textarea',
823 'key' => 'invoice_htmlnotes',
824 'section' => 'billing',
825 'description' => 'Notes section for HTML invoices. Defaults to the same data in invoice_latexnotes if not specified.',
826 'type' => 'textarea',
831 'key' => 'invoice_htmlfooter',
832 'section' => 'billing',
833 'description' => 'Footer for HTML invoices. Defaults to the same data in invoice_latexfooter if not specified.',
834 'type' => 'textarea',
839 'key' => 'invoice_htmlreturnaddress',
840 'section' => 'billing',
841 'description' => 'Return address for HTML invoices. Defaults to the same data in invoice_latexreturnaddress if not specified.',
842 'type' => 'textarea',
846 'key' => 'invoice_latex',
847 'section' => 'billing',
848 'description' => 'Optional LaTeX template for typeset PostScript invoices. See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Typeset_.28LaTeX.29_invoice_templates">billing documentation</a> for details.',
849 'type' => 'textarea',
853 'key' => 'invoice_latexnotes',
854 'section' => 'billing',
855 'description' => 'Notes section for LaTeX typeset PostScript invoices.',
856 'type' => 'textarea',
861 'key' => 'invoice_latexfooter',
862 'section' => 'billing',
863 'description' => 'Footer for LaTeX typeset PostScript invoices.',
864 'type' => 'textarea',
869 'key' => 'invoice_latexcoupon',
870 'section' => 'billing',
871 'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.',
872 'type' => 'textarea',
877 'key' => 'invoice_latexreturnaddress',
878 'section' => 'billing',
879 'description' => 'Return address for LaTeX typeset PostScript invoices.',
880 'type' => 'textarea',
884 'key' => 'invoice_latexsmallfooter',
885 'section' => 'billing',
886 'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',
887 'type' => 'textarea',
892 'key' => 'invoice_email_pdf',
893 'section' => 'billing',
894 '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.',
899 'key' => 'invoice_email_pdf_note',
900 'section' => 'billing',
901 'description' => 'If defined, this text will replace the default plain text invoice as the body of emailed PDF invoices.',
907 'key' => 'invoice_default_terms',
908 'section' => 'billing',
909 'description' => 'Optional default invoice term, used to calculate a due date printed on invoices.',
911 'select_enum' => [ '', 'Payable upon receipt', 'Net 0', 'Net 10', 'Net 15', 'Net 20', 'Net 30', 'Net 45', 'Net 60' ],
915 'key' => 'invoice_sections',
916 'section' => 'billing',
917 'description' => 'Split invoice into sections and label according to package class when enabled.',
918 'type' => 'checkbox',
922 'key' => 'separate_usage',
923 'section' => 'billing',
924 'description' => 'Split the rated call usage into a separate line from the recurring charges.',
925 'type' => 'checkbox',
929 'key' => 'payment_receipt_email',
930 'section' => 'billing',
931 'description' => 'Template file for payment receipts. Payment receipts are sent to the customer email invoice destination(s) when a payment is received. 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>$date</code> <li><code>$name</code> <li><code>$paynum</code> - Freeside payment number <li><code>$paid</code> - Amount of payment <li><code>$payby</code> - Payment type (Card, Check, Electronic check, etc.) <li><code>$payinfo</code> - Masked credit card number or check number <li><code>$balance</code> - New balance</ul>',
932 'type' => [qw( checkbox textarea )],
937 'section' => 'required',
938 'description' => 'Print command for paper invoices, for example `lpr -h\'',
943 'key' => 'lpr-postscript_prefix',
944 'section' => 'billing',
945 'description' => 'Raw printer commands prepended to the beginning of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
950 'key' => 'lpr-postscript_suffix',
951 'section' => 'billing',
952 'description' => 'Raw printer commands added to the end of postscript print jobs (evaluated as a double-quoted perl string - backslash escapes are available)',
957 'key' => 'money_char',
959 'description' => 'Currency symbol - defaults to `$\'',
964 'key' => 'defaultrecords',
966 'description' => 'DNS entries to add automatically when creating a domain',
967 'type' => 'editlist',
968 'editlist_parts' => [ { type=>'text' },
969 { type=>'immutable', value=>'IN' },
971 select_enum=>{ map { $_=>$_ } qw(A CNAME MX NS TXT)} },
972 { type=> 'text' }, ],
976 'key' => 'passwordmin',
977 'section' => 'password',
978 'description' => 'Minimum password length (default 6)',
983 'key' => 'passwordmax',
984 'section' => 'password',
985 'description' => 'Maximum password length (default 8) (don\'t set this over 12 if you need to import or export crypt() passwords)',
990 'key' => 'password-noampersand',
991 'section' => 'password',
992 'description' => 'Disallow ampersands in passwords',
993 'type' => 'checkbox',
997 'key' => 'password-noexclamation',
998 'section' => 'password',
999 'description' => 'Disallow exclamations in passwords (Not setting this could break old text Livingston or Cistron Radius servers)',
1000 'type' => 'checkbox',
1004 'key' => 'referraldefault',
1006 'description' => 'Default referral, specified by refnum',
1011 # 'key' => 'registries',
1012 # 'section' => 'required',
1013 # 'description' => 'Directory which contains domain registry information. Each registry is a directory.',
1017 'key' => 'maxsearchrecordsperpage',
1019 'description' => 'If set, number of search records to return per page.',
1024 'key' => 'session-start',
1025 'section' => 'session',
1026 '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.',
1031 'key' => 'session-stop',
1032 'section' => 'session',
1033 '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.',
1039 'section' => 'shell',
1040 '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.',
1041 'type' => 'textarea',
1045 'key' => 'showpasswords',
1047 'description' => 'Display unencrypted user passwords in the backend (employee) web interface',
1048 'type' => 'checkbox',
1052 'key' => 'signupurl',
1054 '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:1.7: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',
1059 'key' => 'smtpmachine',
1060 'section' => 'required',
1061 'description' => 'SMTP relay for Freeside\'s outgoing mail',
1066 'key' => 'soadefaultttl',
1067 'section' => 'BIND',
1068 'description' => 'SOA default TTL for new domains.',
1073 'key' => 'soaemail',
1074 'section' => 'BIND',
1075 'description' => 'SOA email for new domains, in BIND form (`.\' instead of `@\'), with trailing `.\'',
1080 'key' => 'soaexpire',
1081 'section' => 'BIND',
1082 'description' => 'SOA expire for new domains',
1087 'key' => 'soamachine',
1088 'section' => 'BIND',
1089 'description' => 'SOA machine for new domains, with trailing `.\'',
1094 'key' => 'soarefresh',
1095 'section' => 'BIND',
1096 'description' => 'SOA refresh for new domains',
1101 'key' => 'soaretry',
1102 'section' => 'BIND',
1103 'description' => 'SOA retry for new domains',
1108 'key' => 'statedefault',
1110 'description' => 'Default state or province (if not supplied, the default is `CA\')',
1115 'key' => 'unsuspendauto',
1116 'section' => 'billing',
1117 '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',
1118 'type' => 'checkbox',
1122 'key' => 'unsuspend-always_adjust_next_bill_date',
1123 'section' => 'billing',
1124 '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.',
1125 'type' => 'checkbox',
1129 'key' => 'usernamemin',
1130 'section' => 'username',
1131 'description' => 'Minimum username length (default 2)',
1136 'key' => 'usernamemax',
1137 'section' => 'username',
1138 'description' => 'Maximum username length',
1143 'key' => 'username-ampersand',
1144 'section' => 'username',
1145 'description' => 'Allow the ampersand character (&) in usernames. Be careful when using this option in conjunction with <a href="../browse/part_export.cgi">exports</a> which execute shell commands, as the ampersand will be interpreted by the shell if not quoted.',
1146 'type' => 'checkbox',
1150 'key' => 'username-letter',
1151 'section' => 'username',
1152 'description' => 'Usernames must contain at least one letter',
1153 'type' => 'checkbox',
1157 'key' => 'username-letterfirst',
1158 'section' => 'username',
1159 'description' => 'Usernames must start with a letter',
1160 'type' => 'checkbox',
1164 'key' => 'username-noperiod',
1165 'section' => 'username',
1166 'description' => 'Disallow periods in usernames',
1167 'type' => 'checkbox',
1171 'key' => 'username-nounderscore',
1172 'section' => 'username',
1173 'description' => 'Disallow underscores in usernames',
1174 'type' => 'checkbox',
1178 'key' => 'username-nodash',
1179 'section' => 'username',
1180 'description' => 'Disallow dashes in usernames',
1181 'type' => 'checkbox',
1185 'key' => 'username-uppercase',
1186 'section' => 'username',
1187 'description' => 'Allow uppercase characters in usernames. Not recommended for use with FreeRADIUS with MySQL backend, which is case-insensitive by default.',
1188 'type' => 'checkbox',
1192 'key' => 'username-percent',
1193 'section' => 'username',
1194 'description' => 'Allow the percent character (%) in usernames.',
1195 'type' => 'checkbox',
1199 'key' => 'username-colon',
1200 'section' => 'username',
1201 'description' => 'Allow the colon character (:) in usernames.',
1202 'type' => 'checkbox',
1206 'key' => 'safe-part_bill_event',
1208 'description' => 'Validates invoice event expressions against a preset list. Useful for webdemos, annoying to powerusers.',
1209 'type' => 'checkbox',
1215 'description' => 'Turns on display/collection of social security numbers in the web interface. Sometimes required by electronic check (ACH) processors.',
1216 'type' => 'checkbox',
1220 'key' => 'show_stateid',
1222 'description' => "Turns on display/collection of driver's license/state issued id numbers in the web interface. Sometimes required by electronic check (ACH) processors.",
1223 'type' => 'checkbox',
1227 'key' => 'show_bankstate',
1229 'description' => "Turns on display/collection of state for bank accounts in the web interface. Sometimes required by electronic check (ACH) processors.",
1230 'type' => 'checkbox',
1234 'key' => 'agent_defaultpkg',
1236 'description' => 'Setting this option will cause new packages to be available to all agent types by default.',
1237 'type' => 'checkbox',
1241 'key' => 'legacy_link',
1243 'description' => 'Display options in the web interface to link legacy pre-Freeside services.',
1244 'type' => 'checkbox',
1248 'key' => 'legacy_link-steal',
1250 'description' => 'Allow "stealing" an already-audited service from one customer (or package) to another using the link function.',
1251 'type' => 'checkbox',
1255 'key' => 'queue_dangerous_controls',
1257 '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.',
1258 'type' => 'checkbox',
1262 'key' => 'security_phrase',
1263 'section' => 'password',
1264 'description' => 'Enable the tracking of a "security phrase" with each account. Not recommended, as it is vulnerable to social engineering.',
1265 'type' => 'checkbox',
1271 'description' => 'Message locale',
1273 'select_enum' => [ qw(en_US) ],
1277 'key' => 'signup_server-payby',
1279 'description' => 'Acceptable payment types for the signup server',
1280 'type' => 'selectmultiple',
1281 'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB PREPAY BILL COMP) ],
1285 'key' => 'signup_server-default_agentnum',
1287 'description' => 'Default agent for the signup server',
1288 'type' => 'select-sub',
1289 'options_sub' => sub { require FS::Record;
1291 map { $_->agentnum => $_->agent }
1292 FS::Record::qsearch('agent', { disabled=>'' } );
1294 'option_sub' => sub { require FS::Record;
1296 my $agent = FS::Record::qsearchs(
1297 'agent', { 'agentnum'=>shift }
1299 $agent ? $agent->agent : '';
1304 'key' => 'signup_server-default_refnum',
1306 'description' => 'Default advertising source for the signup server',
1307 'type' => 'select-sub',
1308 'options_sub' => sub { require FS::Record;
1309 require FS::part_referral;
1310 map { $_->refnum => $_->referral }
1311 FS::Record::qsearch( 'part_referral',
1312 { 'disabled' => '' }
1315 'option_sub' => sub { require FS::Record;
1316 require FS::part_referral;
1317 my $part_referral = FS::Record::qsearchs(
1318 'part_referral', { 'refnum'=>shift } );
1319 $part_referral ? $part_referral->referral : '';
1324 'key' => 'signup_server-default_pkgpart',
1326 'description' => 'Default package for the signup server',
1327 'type' => 'select-sub',
1328 'options_sub' => sub { require FS::Record;
1329 require FS::part_pkg;
1330 map { $_->pkgpart => $_->pkg.' - '.$_->comment }
1331 FS::Record::qsearch( 'part_pkg',
1335 'option_sub' => sub { require FS::Record;
1336 require FS::part_pkg;
1337 my $part_pkg = FS::Record::qsearchs(
1338 'part_pkg', { 'pkgpart'=>shift }
1341 ? $part_pkg->pkg.' - '.$part_pkg->comment
1347 'key' => 'signup_server-default_svcpart',
1349 'description' => 'Default svcpart for the signup server - only necessary for services that trigger special provisioning widgets (such as DID provisioning).',
1350 'type' => 'select-sub',
1351 'options_sub' => sub { require FS::Record;
1352 require FS::part_svc;
1353 map { $_->svcpart => $_->svc }
1354 FS::Record::qsearch( 'part_svc',
1358 'option_sub' => sub { require FS::Record;
1359 require FS::part_svc;
1360 my $part_svc = FS::Record::qsearchs(
1361 'part_svc', { 'svcpart'=>shift }
1363 $part_svc ? $part_svc->svc : '';
1368 'key' => 'signup_server-service',
1370 'description' => 'Service for the signup server - "Account (svc_acct)" is the default setting, or "Phone number (svc_phone)" for ITSP signup',
1373 'svc_acct' => 'Account (svc_acct)',
1374 'svc_phone' => 'Phone number (svc_phone)',
1379 'key' => 'selfservice_server-base_url',
1381 'description' => 'Base URL for the self-service web interface - necessary for special provisioning widgets to find their way.',
1386 'key' => 'show-msgcat-codes',
1388 'description' => 'Show msgcat codes in error messages. Turn this option on before reporting errors to the mailing list.',
1389 'type' => 'checkbox',
1393 'key' => 'signup_server-realtime',
1395 'description' => 'Run billing for signup server signups immediately, and do not provision accounts which subsequently have a balance.',
1396 'type' => 'checkbox',
1399 'key' => 'signup_server-classnum2',
1401 'description' => 'Package Class for first optional purchase',
1402 'type' => 'select-sub',
1403 'options_sub' => sub { require FS::Record;
1404 require FS::pkg_class;
1405 map { $_->classnum => $_->classname }
1406 FS::Record::qsearch('pkg_class', {} );
1408 'option_sub' => sub { require FS::Record;
1409 require FS::pkg_class;
1410 my $pkg_class = FS::Record::qsearchs(
1411 'pkg_class', { 'classnum'=>shift }
1413 $pkg_class ? $pkg_class->classname : '';
1418 'key' => 'signup_server-classnum3',
1420 'description' => 'Package Class for second optional purchase',
1421 'type' => 'select-sub',
1422 'options_sub' => sub { require FS::Record;
1423 require FS::pkg_class;
1424 map { $_->classnum => $_->classname }
1425 FS::Record::qsearch('pkg_class', {} );
1427 'option_sub' => sub { require FS::Record;
1428 require FS::pkg_class;
1429 my $pkg_class = FS::Record::qsearchs(
1430 'pkg_class', { 'classnum'=>shift }
1432 $pkg_class ? $pkg_class->classname : '';
1437 'key' => 'backend-realtime',
1439 'description' => 'Run billing for backend signups immediately.',
1440 'type' => 'checkbox',
1444 'key' => 'declinetemplate',
1445 'section' => 'billing',
1446 'description' => 'Template file for credit card decline emails.',
1447 'type' => 'textarea',
1451 'key' => 'emaildecline',
1452 'section' => 'billing',
1453 'description' => 'Enable emailing of credit card decline notices.',
1454 'type' => 'checkbox',
1458 'key' => 'emaildecline-exclude',
1459 'section' => 'billing',
1460 'description' => 'List of error messages that should not trigger email decline notices, one per line.',
1461 'type' => 'textarea',
1465 'key' => 'cancelmessage',
1466 'section' => 'billing',
1467 'description' => 'Template file for cancellation emails.',
1468 'type' => 'textarea',
1472 'key' => 'cancelsubject',
1473 'section' => 'billing',
1474 'description' => 'Subject line for cancellation emails.',
1479 'key' => 'emailcancel',
1480 'section' => 'billing',
1481 'description' => 'Enable emailing of cancellation notices. Make sure to fill in the cancelmessage and cancelsubject configuration values as well.',
1482 'type' => 'checkbox',
1486 'key' => 'require_cardname',
1487 'section' => 'billing',
1488 'description' => 'Require an "Exact name on card" to be entered explicitly; don\'t default to using the first and last name.',
1489 'type' => 'checkbox',
1493 'key' => 'enable_taxclasses',
1494 'section' => 'billing',
1495 'description' => 'Enable per-package tax classes',
1496 'type' => 'checkbox',
1500 'key' => 'require_taxclasses',
1501 'section' => 'billing',
1502 'description' => 'Require a taxclass to be entered for every package',
1503 'type' => 'checkbox',
1507 'key' => 'enable_taxproducts',
1508 'section' => 'billing',
1509 'description' => 'Enable per-package mapping to vendor tax data from CCH or elsewhere.',
1510 'type' => 'checkbox',
1514 'key' => 'ignore_incalculable_taxes',
1515 'section' => 'billing',
1516 'description' => 'Prefer to invoice without tax over not billing at all',
1517 'type' => 'checkbox',
1521 'key' => 'welcome_email',
1523 '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. 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></ul>',
1524 'type' => 'textarea',
1529 'key' => 'welcome_email-from',
1531 'description' => 'From: address header for welcome email',
1537 'key' => 'welcome_email-subject',
1539 'description' => 'Subject: header for welcome email',
1545 'key' => 'welcome_email-mimetype',
1547 'description' => 'MIME type for welcome email',
1549 'select_enum' => [ 'text/plain', 'text/html' ],
1554 'key' => 'welcome_letter',
1556 '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>',
1557 'type' => 'textarea',
1561 'key' => 'warning_email',
1563 '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>',
1564 'type' => 'textarea',
1568 'key' => 'warning_email-from',
1570 'description' => 'From: address header for warning email',
1575 'key' => 'warning_email-cc',
1577 'description' => 'Additional recipient(s) (comma separated) for warning email when remaining usage reaches zero.',
1582 'key' => 'warning_email-subject',
1584 'description' => 'Subject: header for warning email',
1589 'key' => 'warning_email-mimetype',
1591 'description' => 'MIME type for warning email',
1593 'select_enum' => [ 'text/plain', 'text/html' ],
1598 'section' => 'billing',
1599 'description' => 'Available payment types.',
1600 'type' => 'selectmultiple',
1601 'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP) ],
1605 'key' => 'payby-default',
1607 'description' => 'Default payment type. HIDE disables display of billing information and sets customers to BILL.',
1609 'select_enum' => [ '', qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP HIDE) ],
1613 'key' => 'paymentforcedtobatch',
1614 'section' => 'deprecated',
1615 '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.',
1616 'type' => 'checkbox',
1620 'key' => 'svc_acct-notes',
1622 'description' => 'Extra HTML to be displayed on the Account View screen.',
1623 'type' => 'textarea',
1627 'key' => 'radius-password',
1629 'description' => 'RADIUS attribute for plain-text passwords.',
1631 'select_enum' => [ 'Password', 'User-Password' ],
1635 'key' => 'radius-ip',
1637 'description' => 'RADIUS attribute for IP addresses.',
1639 'select_enum' => [ 'Framed-IP-Address', 'Framed-Address' ],
1643 'key' => 'svc_acct-alldomains',
1645 '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.',
1646 'type' => 'checkbox',
1650 'key' => 'dump-scpdest',
1652 'description' => 'destination for scp database dumps: user@host:/path',
1657 'key' => 'dump-pgpid',
1659 '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.",
1664 'key' => 'credit_card-recurring_billing_flag',
1665 'section' => 'billing',
1666 '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. ',
1669 'actual_oncard' => 'Default/classic behavior: set the flag if a customer has actual previous charges on the card.',
1670 'transaction_is_recur' => 'Set the flag if the transaction itself is recurring, irregardless of previous charges on the card.',
1675 'key' => 'credit_card-recurring_billing_acct_code',
1676 'section' => 'billing',
1677 'description' => 'When the "recurring billing" flag is set, also set the "acct_code" to "rebill". Useful for reporting purposes with supported gateways (PlugNPay, others?)',
1678 'type' => 'checkbox',
1682 'key' => 'cvv-save',
1683 'section' => 'billing',
1684 '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.',
1685 'type' => 'selectmultiple',
1686 'select_enum' => \@card_types,
1690 'key' => 'allow_negative_charges',
1691 'section' => 'billing',
1692 'description' => 'Allow negative charges. Normally not used unless importing data from a legacy system that requires this.',
1693 'type' => 'checkbox',
1696 'key' => 'auto_unset_catchall',
1698 '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.',
1699 'type' => 'checkbox',
1703 'key' => 'system_usernames',
1704 'section' => 'username',
1705 '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.',
1706 'type' => 'textarea',
1710 'key' => 'cust_pkg-change_svcpart',
1712 'description' => "When changing packages, move services even if svcparts don't match between old and new pacakge definitions.",
1713 'type' => 'checkbox',
1717 'key' => 'disable_autoreverse',
1718 'section' => 'BIND',
1719 'description' => 'Disable automatic synchronization of reverse-ARPA entries.',
1720 'type' => 'checkbox',
1724 'key' => 'svc_www-enable_subdomains',
1726 'description' => 'Enable selection of specific subdomains for virtual host creation.',
1727 'type' => 'checkbox',
1731 'key' => 'svc_www-usersvc_svcpart',
1733 'description' => 'Allowable service definition svcparts for virtual hosts, one per line.',
1734 'type' => 'textarea',
1738 'key' => 'selfservice_server-primary_only',
1740 'description' => 'Only allow primary accounts to access self-service functionality.',
1741 'type' => 'checkbox',
1745 'key' => 'selfservice_server-phone_login',
1747 'description' => 'Allow login to self-service with phone number and PIN.',
1748 'type' => 'checkbox',
1752 'key' => 'selfservice_server-single_domain',
1754 'description' => 'If specified, only use this one domain for self-service access.',
1759 'key' => 'card_refund-days',
1760 'section' => 'billing',
1761 'description' => 'After a payment, the number of days a refund link will be available for that payment. Defaults to 120.',
1766 'key' => 'agent-showpasswords',
1768 'description' => 'Display unencrypted user passwords in the agent (reseller) interface',
1769 'type' => 'checkbox',
1773 'key' => 'global_unique-username',
1774 'section' => 'username',
1775 '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.',
1777 'select_enum' => [ 'none', 'username', 'username@domain', 'disabled' ],
1781 'key' => 'global_unique-phonenum',
1783 '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.',
1785 'select_enum' => [ 'none', 'countrycode+phonenum', 'disabled' ],
1789 'key' => 'svc_external-skip_manual',
1791 '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).',
1792 'type' => 'checkbox',
1796 'key' => 'svc_external-display_type',
1798 'description' => 'Select a specific svc_external type to enable some UI changes specific to that type (i.e. artera_turbo).',
1800 'select_enum' => [ 'generic', 'artera_turbo', ],
1804 'key' => 'ticket_system',
1806 '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:1.7:Documentation:RT_Installation">integrated ticketing installation instructions</a>). <b>RT_External</b> accesses an external RT installation in a separate database (local or remote).',
1808 #'select_enum' => [ '', qw(RT_Internal RT_Libs RT_External) ],
1809 'select_enum' => [ '', qw(RT_Internal RT_External) ],
1813 'key' => 'ticket_system-default_queueid',
1815 'description' => 'Default queue used when creating new customer tickets.',
1816 'type' => 'select-sub',
1817 'options_sub' => sub {
1818 my $conf = new FS::Conf;
1819 if ( $conf->config('ticket_system') ) {
1820 eval "use FS::TicketSystem;";
1822 FS::TicketSystem->queues();
1827 'option_sub' => sub {
1828 my $conf = new FS::Conf;
1829 if ( $conf->config('ticket_system') ) {
1830 eval "use FS::TicketSystem;";
1832 FS::TicketSystem->queue(shift);
1840 'key' => 'ticket_system-priority_reverse',
1842 '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.',
1843 'type' => 'checkbox',
1847 'key' => 'ticket_system-custom_priority_field',
1849 'description' => 'Custom field from the ticketing system to use as a custom priority classification.',
1854 'key' => 'ticket_system-custom_priority_field-values',
1856 'description' => 'Values for the custom field from the ticketing system to break down and sort customer ticket lists.',
1857 'type' => 'textarea',
1861 'key' => 'ticket_system-custom_priority_field_queue',
1863 'description' => 'Ticketing system queue in which the custom field specified in ticket_system-custom_priority_field is located.',
1868 'key' => 'ticket_system-rt_external_datasrc',
1870 '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>',
1876 'key' => 'ticket_system-rt_external_url',
1878 'description' => 'With external RT integration, the URL for the external RT installation, for example, <code>https://rt.example.com/rt</code>',
1883 'key' => 'company_name',
1884 'section' => 'required',
1885 'description' => 'Your company name',
1887 'per_agent' => 1, #XXX just FS/FS/ClientAPI/Signup.pm
1891 'key' => 'company_address',
1892 'section' => 'required',
1893 'description' => 'Your company address',
1894 'type' => 'textarea',
1899 'key' => 'address2-search',
1901 'description' => 'Enable a "Unit" search box which searches the second address field. Useful for multi-tenant applications. See also: cust_main-require_address2',
1902 'type' => 'checkbox',
1906 'key' => 'cust_main-require_address2',
1908 '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',
1909 'type' => 'checkbox',
1913 'key' => 'agent-ship_address',
1915 '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.",
1916 'type' => 'checkbox',
1919 { 'key' => 'referral_credit',
1920 'section' => 'deprecated',
1921 '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.",
1922 'type' => 'checkbox',
1925 { 'key' => 'selfservice_server-cache_module',
1927 '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.',
1929 'select_enum' => [ 'Cache::SharedMemoryCache', 'Cache::FileCache', ], # '_Database' ],
1934 'section' => 'billing',
1935 '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).',
1936 'type' => [qw( checkbox textarea )],
1940 'key' => 'cust_bill-ftpformat',
1941 'section' => 'billing',
1942 'description' => 'Enable FTP of raw invoice data - format.',
1944 'select_enum' => [ '', 'default', 'billco', ],
1948 'key' => 'cust_bill-ftpserver',
1949 'section' => 'billing',
1950 'description' => 'Enable FTP of raw invoice data - server.',
1955 'key' => 'cust_bill-ftpusername',
1956 'section' => 'billing',
1957 'description' => 'Enable FTP of raw invoice data - server.',
1962 'key' => 'cust_bill-ftppassword',
1963 'section' => 'billing',
1964 'description' => 'Enable FTP of raw invoice data - server.',
1969 'key' => 'cust_bill-ftpdir',
1970 'section' => 'billing',
1971 'description' => 'Enable FTP of raw invoice data - server.',
1976 'key' => 'cust_bill-spoolformat',
1977 'section' => 'billing',
1978 'description' => 'Enable spooling of raw invoice data - format.',
1980 'select_enum' => [ '', 'default', 'billco', ],
1984 'key' => 'cust_bill-spoolagent',
1985 'section' => 'billing',
1986 'description' => 'Enable per-agent spooling of raw invoice data.',
1987 'type' => 'checkbox',
1991 'key' => 'svc_acct-usage_suspend',
1992 'section' => 'billing',
1993 '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.',
1994 'type' => 'checkbox',
1998 'key' => 'svc_acct-usage_unsuspend',
1999 'section' => 'billing',
2000 '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.',
2001 'type' => 'checkbox',
2005 'key' => 'svc_acct-usage_threshold',
2006 'section' => 'billing',
2007 '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. Defaults to 80.',
2012 'key' => 'cust-fields',
2014 'description' => 'Which customer fields to display on reports by default',
2016 'select_hash' => [ FS::ConfDefaults->cust_fields_avail() ],
2020 'key' => 'cust_pkg-display_times',
2022 'description' => 'Display full timestamps (not just dates) for customer packages. Useful if you are doing real-time things like hourly prepaid.',
2023 'type' => 'checkbox',
2027 'key' => 'cust_pkg-always_show_location',
2029 'description' => "Always display package locations, even when they're all the default service address.",
2030 'type' => 'checkbox',
2034 'key' => 'svc_acct-edit_uid',
2035 'section' => 'shell',
2036 'description' => 'Allow UID editing.',
2037 'type' => 'checkbox',
2041 'key' => 'svc_acct-edit_gid',
2042 'section' => 'shell',
2043 'description' => 'Allow GID editing.',
2044 'type' => 'checkbox',
2048 'key' => 'zone-underscore',
2049 'section' => 'BIND',
2050 'description' => 'Allow underscores in zone names. As underscores are illegal characters in zone names, this option is not recommended.',
2051 'type' => 'checkbox',
2055 'key' => 'echeck-nonus',
2056 'section' => 'billing',
2057 'description' => 'Disable ABA-format account checking for Electronic Check payment info',
2058 'type' => 'checkbox',
2062 'key' => 'voip-cust_cdr_spools',
2064 'description' => 'Enable the per-customer option for individual CDR spools.',
2065 'type' => 'checkbox',
2069 'key' => 'voip-cust_cdr_squelch',
2071 'description' => 'Enable the per-customer option for not printing CDR on invoices.',
2072 'type' => 'checkbox',
2076 'key' => 'svc_forward-arbitrary_dst',
2078 '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.",
2079 'type' => 'checkbox',
2083 'key' => 'tax-ship_address',
2084 'section' => 'billing',
2085 'description' => 'By default, tax calculations are done based on the billing address. Enable this switch to calculate tax based on the shipping address instead.',
2086 'type' => 'checkbox',
2090 'key' => 'tax-pkg_address',
2091 'section' => 'billing',
2092 '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). Note that this option is currently incompatible with vendor data taxation enabled by enable_taxproducts.',
2093 'type' => 'checkbox',
2097 'key' => 'invoice-ship_address',
2098 'section' => 'billing',
2099 'description' => 'Enable this switch to include the ship address on the invoice.',
2100 'type' => 'checkbox',
2104 'key' => 'invoice-unitprice',
2105 'section' => 'billing',
2106 'description' => 'This switch enables unit pricing on the invoice.',
2107 'type' => 'checkbox',
2111 'key' => 'postal_invoice-fee_pkgpart',
2112 'section' => 'billing',
2113 'description' => 'This allows selection of a package to insert on invoices for customers with postal invoices selected.',
2114 'type' => 'select-sub',
2115 'options_sub' => sub { require FS::Record;
2116 require FS::part_pkg;
2117 map { $_->pkgpart => $_->pkg }
2118 FS::Record::qsearch('part_pkg', { disabled=>'' } );
2120 'option_sub' => sub { require FS::Record;
2121 require FS::part_pkg;
2122 my $part_pkg = FS::Record::qsearchs(
2123 'part_pkg', { 'pkgpart'=>shift }
2125 $part_pkg ? $part_pkg->pkg : '';
2130 'key' => 'postal_invoice-recurring_only',
2131 'section' => 'billing',
2132 'description' => 'The postal invoice fee is omitted on invoices without reucrring charges when this is set.',
2133 'type' => 'checkbox',
2137 'key' => 'batch-enable',
2138 'section' => 'deprecated', #make sure batch-enable_payby is set for
2139 #everyone before removing
2140 'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.',
2141 'type' => 'checkbox',
2145 'key' => 'batch-enable_payby',
2146 'section' => 'billing',
2147 'description' => 'Enable batch processing for the specified payment types.',
2148 'type' => 'selectmultiple',
2149 'select_enum' => [qw( CARD CHEK )],
2153 'key' => 'realtime-disable_payby',
2154 'section' => 'billing',
2155 'description' => 'Disable realtime processing for the specified payment types.',
2156 'type' => 'selectmultiple',
2157 'select_enum' => [qw( CARD CHEK )],
2161 'key' => 'batch-default_format',
2162 'section' => 'billing',
2163 'description' => 'Default format for batches.',
2165 'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch',
2166 'csv-chase_canada-E-xactBatch', 'BoM', 'PAP',
2172 'key' => 'batch-fixed_format-CARD',
2173 'section' => 'billing',
2174 'description' => 'Fixed (unchangeable) format for credit card batches.',
2176 'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP' ,
2177 'csv-chase_canada-E-xactBatch', 'BoM', 'PAP' ]
2181 'key' => 'batch-fixed_format-CHEK',
2182 'section' => 'billing',
2183 'description' => 'Fixed (unchangeable) format for electronic check batches.',
2185 'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP',
2191 'key' => 'batch-increment_expiration',
2192 'section' => 'billing',
2193 'description' => 'Increment expiration date years in batches until cards are current. Make sure this is acceptable to your batching provider before enabling.',
2194 'type' => 'checkbox'
2198 'key' => 'batchconfig-BoM',
2199 'section' => 'billing',
2200 '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',
2201 'type' => 'textarea',
2205 'key' => 'batchconfig-PAP',
2206 'section' => 'billing',
2207 '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',
2208 'type' => 'textarea',
2212 'key' => 'batchconfig-csv-chase_canada-E-xactBatch',
2213 'section' => 'billing',
2214 'description' => 'Gateway ID for Chase Canada E-xact batching',
2219 'key' => 'payment_history-years',
2221 'description' => 'Number of years of payment history to show by default. Currently defaults to 2.',
2226 'key' => 'cust_main-packages-years',
2228 'description' => 'Number of years to show old (cancelled and one-time charge) packages by default. Currently defaults to 2.',
2233 'key' => 'cust_main-use_comments',
2235 'description' => 'Display free form comments on the customer edit screen. Useful as a scratch pad.',
2236 'type' => 'checkbox',
2240 'key' => 'cust_main-disable_notes',
2242 'description' => 'Disable new style customer notes - timestamped and user identified customer notes. Useful in tracking who did what.',
2243 'type' => 'checkbox',
2247 'key' => 'cust_main_note-display_times',
2249 'description' => 'Display full timestamps (not just dates) for customer notes.',
2250 'type' => 'checkbox',
2254 'key' => 'cust_main-ticket_statuses',
2256 'description' => 'Show tickets with these statuses on the customer view page.',
2257 'type' => 'selectmultiple',
2258 'select_enum' => [qw( new open stalled resolved rejected deleted )],
2262 'key' => 'cust_main-max_tickets',
2264 'description' => 'Maximum number of tickets to show on the customer view page.',
2269 'key' => 'cust_main-skeleton_tables',
2271 '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.',
2272 'type' => 'textarea',
2276 'key' => 'cust_main-skeleton_custnum',
2278 'description' => 'Customer number specifying the source data to copy into skeleton tables for new customers.',
2283 'key' => 'cust_main-enable_birthdate',
2285 'descritpion' => 'Enable tracking of a birth date with each customer record',
2286 'type' => 'checkbox',
2290 'key' => 'support-key',
2292 '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.',
2297 'key' => 'card-types',
2298 'section' => 'billing',
2299 'description' => 'Select one or more card types to enable only those card types. If no card types are selected, all card types are available.',
2300 'type' => 'selectmultiple',
2301 'select_enum' => \@card_types,
2305 'key' => 'disable-fuzzy',
2307 'description' => 'Disable fuzzy searching. Speeds up searching for large sites, but only shows exact matches.',
2308 'type' => 'checkbox',
2311 { 'key' => 'pkg_referral',
2313 'description' => 'Enable package-specific advertising sources.',
2314 'type' => 'checkbox',
2317 { 'key' => 'pkg_referral-multiple',
2319 'description' => 'In addition, allow multiple advertising sources to be associated with a single package.',
2320 'type' => 'checkbox',
2324 'key' => 'dashboard-toplist',
2326 'description' => 'List of items to display on the top of the front page',
2327 'type' => 'textarea',
2331 'key' => 'impending_recur_template',
2332 'section' => 'billing',
2333 '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>',
2334 # <li><code>$payby</code> <li><code>$expdate</code> most likely only confuse
2335 'type' => 'textarea',
2339 'key' => 'logo.png',
2340 'section' => 'billing', #?
2341 'description' => 'Company logo for HTML invoices and the backoffice interface, in PNG format. Suggested size somewhere near 92x62.',
2343 'per_agent' => 1, #XXX just view/logo.cgi, which is for the global
2344 #old-style editor anyway...?
2348 'key' => 'logo.eps',
2349 'section' => 'billing', #?
2350 'description' => 'Company logo for printed and PDF invoices, in EPS format.',
2352 'per_agent' => 1, #XXX as above, kinda
2356 'key' => 'selfservice-ignore_quantity',
2358 'description' => 'Ignores service quantity restrictions in self-service context. Strongly not recommended - just set your quantities correctly in the first place.',
2359 'type' => 'checkbox',
2363 'key' => 'selfservice-session_timeout',
2365 'description' => 'Self-service session timeout. Defaults to 1 hour.',
2367 'select_enum' => [ '1 hour', '2 hours', '4 hours', '8 hours', '1 day', '1 week', ],
2371 'key' => 'disable_setup_suspended_pkgs',
2372 'section' => 'billing',
2373 'description' => 'Disables charging of setup fees for suspended packages.',
2374 'type' => 'checkbox',
2378 'key' => 'password-generated-allcaps',
2379 'section' => 'password',
2380 'description' => 'Causes passwords automatically generated to consist entirely of capital letters',
2381 'type' => 'checkbox',
2385 'key' => 'datavolume-forcemegabytes',
2387 'description' => 'All data volumes are expressed in megabytes',
2388 'type' => 'checkbox',
2392 'key' => 'datavolume-significantdigits',
2394 'description' => 'number of significant digits to use to represent data volumes',
2399 'key' => 'disable_void_after',
2400 'section' => 'billing',
2401 'description' => 'Number of seconds after which freeside won\'t attempt to VOID a payment first when performing a refund.',
2406 'key' => 'disable_line_item_date_ranges',
2407 'section' => 'billing',
2408 'description' => 'Prevent freeside from automatically generating date ranges on invoice line items.',
2409 'type' => 'checkbox',
2413 'key' => 'support_packages',
2415 '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...
2416 'type' => 'textarea',
2420 'key' => 'cust_main-require_phone',
2422 'description' => 'Require daytime or night phone for all customer records.',
2423 'type' => 'checkbox',
2427 'key' => 'cust_main-require_invoicing_list_email',
2429 'description' => 'Email address field is required: require at least one invoicing email address for all customer records.',
2430 'type' => 'checkbox',
2434 'key' => 'svc_acct-display_paid_time_remaining',
2436 'description' => 'Show paid time remaining in addition to time remaining.',
2437 'type' => 'checkbox',
2441 'key' => 'cancel_credit_type',
2442 'section' => 'billing',
2443 'description' => 'The group to use for new, automatically generated credit reasons resulting from cancellation.',
2444 'type' => 'select-sub',
2445 'options_sub' => sub { require FS::Record;
2446 require FS::reason_type;
2447 map { $_->typenum => $_->type }
2448 FS::Record::qsearch('reason_type', { class=>'R' } );
2450 'option_sub' => sub { require FS::Record;
2451 require FS::reason_type;
2452 my $reason_type = FS::Record::qsearchs(
2453 'reason_type', { 'typenum' => shift }
2455 $reason_type ? $reason_type->type : '';
2460 'key' => 'referral_credit_type',
2461 'section' => 'deprecated',
2462 '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.',
2463 'type' => 'select-sub',
2464 'options_sub' => sub { require FS::Record;
2465 require FS::reason_type;
2466 map { $_->typenum => $_->type }
2467 FS::Record::qsearch('reason_type', { class=>'R' } );
2469 'option_sub' => sub { require FS::Record;
2470 require FS::reason_type;
2471 my $reason_type = FS::Record::qsearchs(
2472 'reason_type', { 'typenum' => shift }
2474 $reason_type ? $reason_type->type : '';
2479 'key' => 'signup_credit_type',
2480 'section' => 'billing',
2481 'description' => 'The group to use for new, automatically generated credit reasons resulting from signup and self-service declines.',
2482 'type' => 'select-sub',
2483 'options_sub' => sub { require FS::Record;
2484 require FS::reason_type;
2485 map { $_->typenum => $_->type }
2486 FS::Record::qsearch('reason_type', { class=>'R' } );
2488 'option_sub' => sub { require FS::Record;
2489 require FS::reason_type;
2490 my $reason_type = FS::Record::qsearchs(
2491 'reason_type', { 'typenum' => shift }
2493 $reason_type ? $reason_type->type : '';
2498 'key' => 'cust_main-agent_custid-format',
2500 'description' => 'Enables searching of various formatted values in cust_main.agent_custid',
2503 '' => 'Numeric only',
2504 'ww?d+' => 'Numeric with one or two letter prefix',
2509 'key' => 'card_masking_method',
2511 '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.',
2514 '' => '123456xxxxxx1234',
2515 'first6last2' => '123456xxxxxxxx12',
2516 'first4last4' => '1234xxxxxxxx1234',
2517 'first4last2' => '1234xxxxxxxxxx12',
2518 'first2last4' => '12xxxxxxxxxx1234',
2519 'first2last2' => '12xxxxxxxxxxxx12',
2520 'first0last4' => 'xxxxxxxxxxxx1234',
2521 'first0last2' => 'xxxxxxxxxxxxxx12',
2526 'key' => 'disable_previous_balance',
2527 'section' => 'billing',
2528 'description' => 'Disable inclusion of previous balancem payment, and credit lines on invoices',
2529 'type' => 'checkbox',
2533 'key' => 'previous_balance-summary_only',
2534 'section' => 'billing',
2535 'description' => 'Only show a single line summarizing the total previous balance rather than one line per invoice.',
2536 'type' => 'checkbox',
2540 'key' => 'usps_webtools-userid',
2542 '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.',
2547 'key' => 'usps_webtools-password',
2549 '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.',
2554 'key' => 'cust_main-auto_standardize_address',
2556 'description' => 'When using USPS web tools, automatically standardize the address without asking.',
2557 'type' => 'checkbox',
2561 'key' => 'disable_acl_changes',
2563 'description' => 'Disable all ACL changes, for demos.',
2564 'type' => 'checkbox',
2568 'key' => 'cust_main-edit_agent_custid',
2570 'description' => 'Enable editing of the agent_custid field.',
2571 'type' => 'checkbox',
2575 'key' => 'cust_main-default_agent_custid',
2577 'description' => 'Display the agent_custid field instead of the custnum field.',
2578 'type' => 'checkbox',
2582 'key' => 'cust_main-auto_agent_custid',
2584 'description' => 'Automatically assign an agent_custid - select format',
2586 'select_hash' => [ '' => 'No',
2587 '1YMMXXXXXXXX' => '1YMMXXXXXXXX',
2592 'key' => 'cust_main-default_areacode',
2594 'description' => 'Default area code for customers.',
2599 'key' => 'mcp_svcpart',
2601 'description' => 'Master Control Program svcpart. Leave this blank.',
2606 'key' => 'cust_bill-max_same_services',
2607 'section' => 'billing',
2608 '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.',
2613 'key' => 'suspend_email_admin',
2615 'description' => 'Destination admin email address to enable suspension notices',
2620 'key' => 'email_report-subject',
2622 'description' => 'Subject for reports emailed by freeside-fetch. Defaults to "Freeside report".',
2627 'key' => 'selfservice-head',
2629 'description' => 'HTML for the HEAD section of the self-service interface, typically used for LINK stylesheet tags',
2630 'type' => 'textarea', #htmlarea?
2635 'key' => 'selfservice-body_header',
2637 'description' => 'HTML header for the self-service interface',
2638 'type' => 'textarea', #htmlarea?
2642 'key' => 'selfservice-body_footer',
2644 'description' => 'HTML header for the self-service interface',
2645 'type' => 'textarea', #htmlarea?
2650 'key' => 'selfservice-body_bgcolor',
2652 'description' => 'HTML background color for the self-service interface, for example, #FFFFFF',
2657 'key' => 'selfservice-box_bgcolor',
2659 'description' => 'HTML color for self-service interface input boxes, for example, #C0C0C0"',
2664 'key' => 'signup-no_company',
2666 'description' => "Don't display a field for company name on signup.",
2667 'type' => 'checkbox',
2671 'key' => 'signup-recommend_email',
2673 'description' => 'Encourage the entry of an invoicing email address on signup.',
2674 'type' => 'checkbox',
2678 'key' => 'signup-recommend_daytime',
2680 'description' => 'Encourage the entry of a daytime phone number invoicing email address on signup.',
2681 'type' => 'checkbox',
2685 'key' => 'svc_phone-radius-default_password',
2687 'description' => 'Default password when exporting svc_phone records to RADIUS',
2692 'key' => 'svc_phone-allow_alpha_phonenum',
2694 'description' => 'Allow letters in phone numbers.',
2695 'type' => 'checkbox',
2699 'key' => 'default_phone_countrycode',
2701 'description' => 'Default countrcode',
2706 'key' => 'cdr-charged_party-accountcode',
2708 'description' => 'Set the charged_party field of CDRs to the accountcode.',
2709 'type' => 'checkbox',
2713 'key' => 'cdr-charged_party_rewrite',
2715 '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.',
2716 'type' => 'checkbox',
2720 'key' => 'cdr-taqua-da_rewrite',
2722 '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.',
2727 'key' => 'cust_pkg-show_autosuspend',
2729 'description' => 'Show package auto-suspend dates. Use with caution for now; can slow down customer view for large insallations.',
2730 'type' => 'checkbox',
2734 'key' => 'cdr-asterisk_forward_rewrite',
2736 '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").',
2737 'type' => 'checkbox',
2741 'key' => 'sg-multicustomer_hack',
2743 'description' => "Don't use this.",
2744 'type' => 'checkbox',
2748 'key' => 'disable-cust-pkg_class',
2750 'description' => 'Disable the two-step dropdown for selecting package class and package, and return to the classic single dropdown.',
2751 'type' => 'checkbox',