use FS::ConfItem;
use FS::ConfDefaults;
use FS::Conf_compat17;
+use FS::Locales;
use FS::payby;
use FS::conf;
use FS::Record qw(qsearch qsearchs);
use FS::UID qw(dbh datasrc use_confcompat);
+use FS::Misc::Geo;
$base_dir = '%%%FREESIDE_CONF%%%';
=over 4
-=item new
+=item new [ HASHREF ]
Create a new configuration object.
+HASHREF may contain options to set the configuration context. Currently
+accepts C<locale>, and C<localeonly> to disable fallback to the null locale.
+
=cut
sub new {
- my($proto) = @_;
+ my($proto) = shift;
+ my $opts = shift || {};
my($class) = ref($proto) || $proto;
- my($self) = { 'base_dir' => $base_dir };
+ my $self = {
+ 'base_dir' => $base_dir,
+ 'locale' => $opts->{locale},
+ 'localeonly' => $opts->{localeonly}, # for config-view.cgi ONLY
+ };
+ warn "FS::Conf created with no locale fallback.\n" if $self->{localeonly};
bless ($self, $class);
}
sub _config {
my($self,$name,$agentnum,$agentonly)=@_;
my $hashref = { 'name' => $name };
- $hashref->{agentnum} = $agentnum;
local $FS::Record::conf = undef; # XXX evil hack prevents recursion
- my $cv = FS::Record::qsearchs('conf', $hashref);
- if (!$agentonly && !$cv && defined($agentnum) && $agentnum) {
- $hashref->{agentnum} = '';
- $cv = FS::Record::qsearchs('conf', $hashref);
+ my $cv;
+ my @a = (
+ ($agentnum || ()),
+ ($agentonly && $agentnum ? () : '')
+ );
+ my @l = (
+ ($self->{locale} || ()),
+ ($self->{localeonly} && $self->{locale} ? () : '')
+ );
+ # try with the agentnum first, then fall back to no agentnum if allowed
+ foreach my $a (@a) {
+ $hashref->{agentnum} = $a;
+ foreach my $l (@l) {
+ $hashref->{locale} = $l;
+ $cv = FS::Record::qsearchs('conf', $hashref);
+ return $cv if $cv;
+ }
}
- return $cv;
+ return undef;
}
sub config {
my $self = shift;
return $self->_usecompat('exists', @_) if use_confcompat;
- my($name, $agentnum)=@_;
+ #my($name, $agentnum)=@_;
carp "FS::Conf->exists(". join(', ', @_). ") called"
if $DEBUG > 1;
defined($self->_config(@_));
}
+#maybe this should just be the new exists instead of getting a method of its
+#own, but i wanted to avoid possible fallout
+
+sub config_bool {
+ my $self = shift;
+ return $self->_usecompat('exists', @_) if use_confcompat;
+
+ my($name,$agentnum,$agentonly) = @_;
+
+ carp "FS::Conf->config_bool(". join(', ', @_). ") called"
+ if $DEBUG > 1;
+
+ #defined($self->_config(@_));
+
+ #false laziness w/_config
+ my $hashref = { 'name' => $name };
+ local $FS::Record::conf = undef; # XXX evil hack prevents recursion
+ my $cv;
+ my @a = (
+ ($agentnum || ()),
+ ($agentonly && $agentnum ? () : '')
+ );
+ my @l = (
+ ($self->{locale} || ()),
+ ($self->{localeonly} && $self->{locale} ? () : '')
+ );
+ # try with the agentnum first, then fall back to no agentnum if allowed
+ foreach my $a (@a) {
+ $hashref->{agentnum} = $a;
+ foreach my $l (@l) {
+ $hashref->{locale} = $l;
+ $cv = FS::Record::qsearchs('conf', $hashref);
+ if ( $cv ) {
+ if ( $cv->value eq '0'
+ && ($hashref->{agentnum} || $hashref->{locale} )
+ )
+ {
+ return 0; #an explicit false override, don't continue looking
+ } else {
+ return 1;
+ }
+ }
+ }
+ }
+ return 0;
+
+}
+
=item config_orbase KEY SUFFIX
Returns the configuration value or values (depending on context) for
return $self->_usecompat('touch', @_) if use_confcompat;
my($name, $agentnum) = @_;
- unless ( $self->exists($name, $agentnum) ) {
- $self->set($name, '', $agentnum);
+ #unless ( $self->exists($name, $agentnum) ) {
+ unless ( $self->config_bool($name, $agentnum) ) {
+ if ( $agentnum && $self->exists($name) && $self->config($name,$agentnum) eq '0' ) {
+ $self->delete($name, $agentnum);
+ } else {
+ $self->set($name, '', $agentnum);
+ }
}
}
warn "[FS::Conf] SET $name\n" if $DEBUG;
- my $old = FS::Record::qsearchs('conf', {name => $name, agentnum => $agentnum});
- my $new = new FS::conf { $old ? $old->hash
- : ('name' => $name, 'agentnum' => $agentnum)
- };
+ my $hashref = {
+ name => $name,
+ agentnum => $agentnum,
+ locale => $self->{locale}
+ };
+
+ my $old = FS::Record::qsearchs('conf', $hashref);
+ my $new = new FS::conf { $old ? $old->hash : %$hashref };
$new->value($value);
my $error;
return $self->_usecompat('delete', @_) if use_confcompat;
my($name, $agentnum) = @_;
- if ( my $cv = FS::Record::qsearchs('conf', {name => $name, agentnum => $agentnum}) ) {
- warn "[FS::Conf] DELETE $name\n";
+ if ( my $cv = FS::Record::qsearchs('conf', {name => $name, agentnum => $agentnum, locale => $self->{locale}}) ) {
+ warn "[FS::Conf] DELETE $name\n" if $DEBUG;
my $oldAutoCommit = $FS::UID::AutoCommit;
local $FS::UID::AutoCommit = 0;
}
}
+#maybe this should just be the new delete instead of getting a method of its
+#own, but i wanted to avoid possible fallout
+
+sub delete_bool {
+ my $self = shift;
+ return $self->_usecompat('delete', @_) if use_confcompat;
+
+ my($name, $agentnum) = @_;
+
+ warn "[FS::Conf] DELETE $name\n" if $DEBUG;
+
+ my $cv = FS::Record::qsearchs('conf', { name => $name,
+ agentnum => $agentnum,
+ locale => $self->{locale},
+ });
+
+ if ( $cv ) {
+ my $error = $cv->delete;
+ die $error if $error;
+ } elsif ( $agentnum ) {
+ $self->set($name, '0', $agentnum);
+ }
+
+}
+
=item import_config_item CONFITEM DIR
Imports the item specified by the CONFITEM (see L<FS::ConfItem>) into
'key' => $_,
'base_key' => $proto->key,
'section' => $proto->section,
- '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.',
+ '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.',
'type' => $proto->type,
};
} &$listmaker($base);
my %msg_template_options = (
'type' => 'select-sub',
- 'options_sub' => sub { require FS::Record;
- require FS::agent;
- require FS::msg_template;
- map { $_->msgnum, $_->msgname }
- qsearch('msg_template', { disabled => '' });
- },
- 'option_sub' => sub { require FS::msg_template;
+ 'options_sub' => sub {
+ my @templates = qsearch({
+ 'table' => 'msg_template',
+ 'hashref' => { 'disabled' => '' },
+ 'extra_sql' => ' AND '.
+ $FS::CurrentUser::CurrentUser->agentnums_sql(null => 1),
+ });
+ map { $_->msgnum, $_->msgname } @templates;
+ },
+ 'option_sub' => sub {
my $msg_template = FS::msg_template->by_key(shift);
$msg_template ? $msg_template->msgname : ''
},
+ 'per_agent' => 1,
+);
+
+my $_gateway_name = sub {
+ my $g = shift;
+ return '' if !$g;
+ ($g->gateway_username . '@' . $g->gateway_module);
+};
+
+my %payment_gateway_options = (
+ 'type' => 'select-sub',
+ 'options_sub' => sub {
+ my @gateways = qsearch({
+ 'table' => 'payment_gateway',
+ 'hashref' => { 'disabled' => '' },
+ });
+ map { $_->gatewaynum, $_gateway_name->($_) } @gateways;
+ },
+ 'option_sub' => sub {
+ my $gateway = FS::payment_gateway->by_key(shift);
+ $_gateway_name->($gateway);
+ },
);
+# takes the reason class (C, R, S) as an argument
+sub reason_type_options {
+ my $reason_class = shift;
+
+ 'type' => 'select-sub',
+ 'options_sub' => sub {
+ map { $_->typenum => $_->type }
+ qsearch('reason_type', { class => $reason_class });
+ },
+ 'option_sub' => sub {
+ my $type = FS::reason_type->by_key(shift);
+ $type ? $type->type : '';
+ }
+}
#Billing (81 items)
#Invoicing (50 items)
'type' => 'text',
},
+ {
+ 'key' => 'log_sent_mail',
+ 'section' => 'notification',
+ 'description' => 'Enable logging of template-generated email.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'alert_expiration',
'section' => 'notification',
%msg_template_options,
},
+ {
+ 'key' => 'part_pkg-lineage',
+ 'section' => '',
+ 'description' => 'When editing a package definition, if setup or recur fees are changed, create a new package rather than changing the existing package.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'apacheip',
#not actually deprecated yet
'description' => 'IP address to assign to new virtual hosts',
'type' => 'text',
},
+
+ {
+ 'key' => 'credits-auto-apply-disable',
+ 'section' => 'billing',
+ 'description' => 'Disable the "Auto-Apply to invoices" UI option for new credits',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'credit-card-surcharge-percentage',
+ 'section' => 'billing',
+ '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.',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'discount-show-always',
+ 'section' => 'billing',
+ 'description' => 'Generate a line item on an invoice even when a package is discounted 100%',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'discount-show_available',
+ 'section' => 'billing',
+ 'description' => 'Show available prepayment discounts on invoices.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'invoice-barcode',
+ 'section' => 'billing',
+ 'description' => 'Display a barcode on HTML and PDF invoices',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cust_main-select-billday',
+ 'section' => 'billing',
+ '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',
+ 'type' => 'checkbox',
+ },
{
'key' => 'encryption',
'section' => 'billing',
- 'description' => 'Enable encryption of credit cards.',
+ 'description' => 'Enable encryption of credit cards and echeck numbers',
'type' => 'checkbox',
},
'key' => 'encryptionmodule',
'section' => 'billing',
'description' => 'Use which module for encryption?',
- 'type' => 'text',
+ 'type' => 'select',
+ 'select_enum' => [ '', 'Crypt::OpenSSL::RSA', ],
},
{
'key' => 'encryptionpublickey',
'section' => 'billing',
- 'description' => 'Your RSA Public Key - Required if Encryption is turned on.',
+ 'description' => 'Encryption public key',
'type' => 'textarea',
},
{
'key' => 'encryptionprivatekey',
'section' => 'billing',
- '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.',
+ 'description' => 'Encryption private key',
'type' => 'textarea',
},
'type' => 'text',
'per_agent' => 1,
},
-
+
+ {
+ 'key' => 'next-bill-ignore-time',
+ 'section' => 'billing',
+ '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.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'business-onlinepayment',
'section' => 'billing',
'type' => 'checkbox',
},
+ {
+ 'key' => 'business-onlinepayment-currency',
+ 'section' => 'billing',
+ 'description' => 'Currency parameter for Business::OnlinePayment transactions.',
+ 'type' => 'select',
+ 'select_enum' => [ '', qw( USD AUD CAD DKK EUR GBP ILS JPY NZD ) ],
+ },
+
{
'key' => 'countrydefault',
'section' => 'UI',
],
},
+ {
+ 'key' => 'date_format_long',
+ 'section' => 'UI',
+ 'description' => 'Verbose format for displaying dates',
+ 'type' => 'select',
+ 'select_hash' => [
+ '%b %o, %Y' => 'Mon DDth, YYYY',
+ '%e %b %Y' => 'DD Mon YYYY',
+ ],
+ },
+
{
'key' => 'deletecustomers',
'section' => 'UI',
'description' => 'Subject: header on email invoices. Defaults to "Invoice". The following substitutions are available: $name, $name_short, $invoice_number, and $invoice_date.',
'type' => 'text',
'per_agent' => 1,
+ 'per_locale' => 1,
},
{
{
'key' => 'invoice_template',
'section' => 'invoicing',
- '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.',
+ '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.',
'type' => 'textarea',
},
{
'key' => 'invoice_html',
'section' => 'invoicing',
- '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.',
+ '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.',
'type' => 'textarea',
},
'description' => 'Notes section for HTML invoices. Defaults to the same data in invoice_latexnotes if not specified.',
'type' => 'textarea',
'per_agent' => 1,
+ 'per_locale' => 1,
},
{
'description' => 'Footer for HTML invoices. Defaults to the same data in invoice_latexfooter if not specified.',
'type' => 'textarea',
'per_agent' => 1,
+ 'per_locale' => 1,
},
{
'description' => 'Summary initial page for HTML invoices.',
'type' => 'textarea',
'per_agent' => 1,
+ 'per_locale' => 1,
},
{
'section' => 'invoicing',
'description' => 'Return address for HTML invoices. Defaults to the same data in invoice_latexreturnaddress if not specified.',
'type' => 'textarea',
+ 'per_locale' => 1,
},
{
'key' => 'invoice_latex',
'section' => 'invoicing',
- '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.',
+ '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.',
'type' => 'textarea',
},
'description' => 'Notes section for LaTeX typeset PostScript invoices.',
'type' => 'textarea',
'per_agent' => 1,
+ 'per_locale' => 1,
},
{
'description' => 'Footer for LaTeX typeset PostScript invoices.',
'type' => 'textarea',
'per_agent' => 1,
+ 'per_locale' => 1,
},
{
'description' => 'Summary initial page for LaTeX typeset PostScript invoices.',
'type' => 'textarea',
'per_agent' => 1,
+ 'per_locale' => 1,
},
{
'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.',
'type' => 'textarea',
'per_agent' => 1,
+ 'per_locale' => 1,
},
{
'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',
'type' => 'textarea',
'per_agent' => 1,
+ 'per_locale' => 1,
},
{
{
'key' => 'invoice_print_pdf',
'section' => 'invoicing',
- 'description' => 'Store postal invoices for download in PDF format rather than printing them directly.',
+ 'description' => 'For all invoice print operations, store postal invoices for download in PDF format rather than printing them directly.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'invoice_print_pdf-spoolagent',
+ 'section' => 'invoicing',
+ 'description' => 'Store postal invoices PDF downloads in per-agent spools.',
'type' => 'checkbox',
},
'section' => 'invoicing',
'description' => 'Optional default invoice term, used to calculate a due date printed on invoices.',
'type' => 'select',
- 'select_enum' => [ '', 'Payable upon receipt', 'Net 0', 'Net 10', 'Net 15', 'Net 20', 'Net 21', 'Net 30', 'Net 45', 'Net 60', 'Net 90' ],
+ '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' ],
},
{
'type' => 'checkbox',
},
+ {
+ 'key' => 'phone_usage_class_summary',
+ 'section' => 'invoicing',
+ '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.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'svc_phone_sections',
'section' => 'invoicing',
'section' => 'notification',
'description' => 'Send payment receipts.',
'type' => 'checkbox',
+ 'per_agent' => 1,
+ 'agent_bool' => 1,
},
{
'description' => 'Template to use for payment receipts.',
%msg_template_options,
},
+
+ {
+ 'key' => 'payment_receipt_from',
+ 'section' => 'notification',
+ 'description' => 'From: address for payment receipts, if not specified in the template.',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
{
'key' => 'payment_receipt_email',
'cust_pay' => 'When payment is made.',
'cust_bill_pay_pkg' => 'When payment is applied.',
],
+ 'per_agent' => 1,
},
{
'type' => 'text',
},
+ {
+ 'key' => 'disable_maxselect',
+ 'section' => 'UI',
+ 'description' => 'Prevent changing the number of records per page.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'session-start',
'section' => 'session',
{
'key' => 'signupurl',
'section' => 'UI',
- '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',
+ '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',
'type' => 'text',
},
'section' => 'username',
'description' => 'Allow uppercase characters in usernames. Not recommended for use with FreeRADIUS with MySQL backend, which is case-insensitive by default.',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
{
'key' => 'locale',
'section' => 'UI',
- 'description' => 'Message locale',
+ 'description' => 'Default locale',
'type' => 'select',
- 'select_enum' => [ qw(en_US) ],
+ 'options_sub' => sub {
+ map { $_ => FS::Locales->description($_) } FS::Locales->locales;
+ },
+ 'option_sub' => sub {
+ FS::Locales->description(shift)
+ },
},
{
'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB PREPAY BILL COMP) ],
},
+ {
+ 'key' => 'selfservice-payment_gateway',
+ 'section' => 'self-service',
+ 'description' => 'Force the use of this payment gateway for self-service.',
+ %payment_gateway_options,
+ },
+
{
'key' => 'selfservice-save_unchecked',
'section' => 'self-service',
'type' => 'checkbox',
},
+ {
+ 'key' => 'default_agentnum',
+ 'section' => 'UI',
+ 'description' => 'Default agent for the backoffice',
+ 'type' => 'select-agent',
+ },
+
{
'key' => 'signup_server-default_agentnum',
'section' => 'self-service',
'description' => 'Default agent for the signup server',
- 'type' => 'select-sub',
- 'options_sub' => sub { require FS::Record;
- require FS::agent;
- map { $_->agentnum => $_->agent }
- FS::Record::qsearch('agent', { disabled=>'' } );
- },
- 'option_sub' => sub { require FS::Record;
- require FS::agent;
- my $agent = FS::Record::qsearchs(
- 'agent', { 'agentnum'=>shift }
- );
- $agent ? $agent->agent : '';
- },
+ 'type' => 'select-agent',
},
{
'svc_pbx' => 'PBX (svc_pbx)',
],
},
+
+ {
+ 'key' => 'signup_server-prepaid-template-custnum',
+ 'section' => 'self-service',
+ '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',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'signup_server-terms_of_service',
+ 'section' => 'self-service',
+ 'description' => 'Terms of Service for the signup server. May contain HTML.',
+ 'type' => 'textarea',
+ 'per_agent' => 1,
+ },
{
'key' => 'selfservice_server-base_url',
'type' => 'select-pkg_class',
},
+ {
+ 'key' => 'signup_server-third_party_as_card',
+ 'section' => 'self-service',
+ 'description' => 'Allow customer payment type to be set to CARD even when using third-party credit card billing.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'selfservice-xmlrpc',
'section' => 'self-service',
'section' => 'notification',
'description' => 'Enable emailing of credit card and electronic check decline notices.',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
'section' => 'notification',
'description' => 'List of error messages that should not trigger email decline notices, one per line.',
'type' => 'textarea',
+ 'per_agent' => 1,
},
{
'section' => 'notification',
'description' => 'Enable emailing of cancellation notices. Make sure to select the template in the cancel_msgnum option.',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
'description' => 'Template to use for welcome messages when a svc_acct record is created.',
%msg_template_options,
},
+
+ {
+ 'key' => 'svc_acct_welcome_exclude',
+ 'section' => 'notification',
+ 'description' => 'A list of svc_acct services for which no welcome email is to be sent.',
+ 'type' => 'select-part_svc',
+ 'multiple' => 1,
+ },
{
'key' => 'welcome_email',
'select_enum' => [ '', qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD COMP HIDE) ],
},
+ {
+ 'key' => 'require_cash_deposit_info',
+ 'section' => 'billing',
+ 'description' => 'When recording cash payments, display bank deposit information fields.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'paymentforcedtobatch',
'section' => 'deprecated',
'type' => 'checkbox',
},
+ {
+ 'key' => 'svc_broadband-radius',
+ 'section' => '',
+ 'description' => 'Enable RADIUS groups for broadband services.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'svc_acct-alldomains',
'section' => '',
'type' => 'checkbox',
},
+ {
+ 'key' => 'dump-localdest',
+ 'section' => '',
+ 'description' => 'Destination for local database dumps (full path)',
+ 'type' => 'text',
+ },
+
{
'key' => 'dump-scpdest',
'section' => '',
- 'description' => 'destination for scp database dumps: user@host:/path',
+ 'description' => 'Destination for scp database dumps: user@host:/path',
'type' => 'text',
},
'type' => 'text',
},
+ {
+ 'key' => 'selfservice_server-login_svcpart',
+ 'section' => 'self-service',
+ 'description' => 'If specified, only allow the specified svcparts to login to self-service.',
+ 'type' => 'select-part_svc',
+ 'multiple' => 1,
+ },
+
+ {
+ 'key' => 'selfservice-svc_forward_svcpart',
+ 'section' => 'self-service',
+ 'description' => 'Service for self-service forward editing.',
+ 'type' => 'select-part_svc',
+ },
+
+ {
+ 'key' => 'selfservice-password_reset_verification',
+ 'section' => 'self-service',
+ 'description' => 'If enabled, specifies the type of verification required for self-service password resets.',
+ 'type' => 'select',
+ 'select_hash' => [ '' => 'Password reset disabled',
+ 'paymask,amount,zip' => 'Verify with credit card (or bank account) last 4 digits, payment amount and zip code',
+ ],
+ },
+
+ {
+ 'key' => 'selfservice-password_reset_msgnum',
+ 'section' => 'self-service',
+ 'description' => 'Template to use for password reset emails.',
+ %msg_template_options,
+ },
+
+ {
+ 'key' => 'selfservice-hide_invoices-taxclass',
+ 'section' => 'self-service',
+ 'description' => 'Hide invoices with only this package tax class from self-service and supress sending (emailing, printing, faxing) them. Typically set to something like "Previous balance" and used when importing legacy invoices into legacy_cust_bill.',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'selfservice-recent-did-age',
+ 'section' => 'self-service',
+ 'description' => 'If specified, defines "recent", in number of seconds, for "Download recently allocated DIDs" in self-service.',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'selfservice_server-view-wholesale',
+ 'section' => 'self-service',
+ 'description' => 'If enabled, use a wholesale package view in the self-service.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'selfservice-agent_signup',
'section' => 'self-service',
'type' => 'checkbox',
},
+ {
+ 'key' => 'selfservice-self_suspend_reason',
+ 'section' => 'self-service',
+ 'description' => 'Suspend reason when customers suspend their own packages. Set to nothing to disallow self-suspension.',
+ 'type' => 'select-sub',
+ 'options_sub' => sub { require FS::Record;
+ require FS::reason;
+ my $type = qsearchs('reason_type',
+ { class => 'S' })
+ or return ();
+ map { $_->reasonnum => $_->reason }
+ FS::Record::qsearch('reason',
+ { reason_type => $type->typenum }
+ );
+ },
+ 'option_sub' => sub { require FS::Record;
+ require FS::reason;
+ my $reason = FS::Record::qsearchs(
+ 'reason', { 'reasonnum' => shift }
+ );
+ $reason ? $reason->reason : '';
+ },
+
+ 'per_agent' => 1,
+ },
+
{
'key' => 'card_refund-days',
'section' => 'billing',
{
'key' => 'ticket_system',
- 'section' => '',
- '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).',
+ 'section' => 'ticketing',
+ '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).',
'type' => 'select',
#'select_enum' => [ '', qw(RT_Internal RT_Libs RT_External) ],
'select_enum' => [ '', qw(RT_Internal RT_External) ],
},
+ {
+ 'key' => 'network_monitoring_system',
+ 'section' => 'network_monitoring',
+ '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>).',
+ 'type' => 'select',
+ 'select_enum' => [ '', qw(Torrus_Internal) ],
+ },
+
+ {
+ 'key' => 'nms-auto_add-svc_ips',
+ 'section' => 'network_monitoring',
+ 'description' => 'Automatically add (and remove) IP addresses from these service tables to the network monitoring system.',
+ 'type' => 'selectmultiple',
+ 'select_enum' => [ 'svc_acct', 'svc_broadband', 'svc_dsl' ],
+ },
+
+ {
+ 'key' => 'nms-auto_add-community',
+ 'section' => 'network_monitoring',
+ 'description' => 'SNMP community string to use when automatically adding IP addresses from these services to the network monitoring system.',
+ 'type' => 'text',
+ },
+
{
'key' => 'ticket_system-default_queueid',
- 'section' => '',
+ 'section' => 'ticketing',
'description' => 'Default queue used when creating new customer tickets.',
'type' => 'select-sub',
'options_sub' => sub {
},
{
'key' => 'ticket_system-force_default_queueid',
- 'section' => '',
+ 'section' => 'ticketing',
'description' => 'Disallow queue selection when creating new tickets from customer view.',
'type' => 'checkbox',
},
{
'key' => 'ticket_system-selfservice_queueid',
- 'section' => '',
+ 'section' => 'ticketing',
'description' => 'Queue used when creating new customer tickets from self-service. Defautls to ticket_system-default_queueid if not specified.',
#false laziness w/above
'type' => 'select-sub',
},
},
+ {
+ 'key' => 'ticket_system-requestor',
+ 'section' => 'ticketing',
+ 'description' => 'Email address to use as the requestor for new tickets. If blank, the customer\'s invoicing address(es) will be used.',
+ 'type' => 'text',
+ },
+
{
'key' => 'ticket_system-priority_reverse',
- 'section' => '',
+ 'section' => 'ticketing',
'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.',
'type' => 'checkbox',
},
{
'key' => 'ticket_system-custom_priority_field',
- 'section' => '',
+ 'section' => 'ticketing',
'description' => 'Custom field from the ticketing system to use as a custom priority classification.',
'type' => 'text',
},
{
'key' => 'ticket_system-custom_priority_field-values',
- 'section' => '',
+ 'section' => 'ticketing',
'description' => 'Values for the custom field from the ticketing system to break down and sort customer ticket lists.',
'type' => 'textarea',
},
{
'key' => 'ticket_system-custom_priority_field_queue',
- 'section' => '',
+ 'section' => 'ticketing',
'description' => 'Ticketing system queue in which the custom field specified in ticket_system-custom_priority_field is located.',
'type' => 'text',
},
+ {
+ 'key' => 'ticket_system-selfservice_priority_field',
+ 'section' => 'ticketing',
+ 'description' => 'Custom field from the ticket system to use as a customer-managed priority field.',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'ticket_system-selfservice_edit_subject',
+ 'section' => 'ticketing',
+ 'description' => 'Allow customers to edit ticket subjects through selfservice.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'ticket_system-escalation',
+ 'section' => 'ticketing',
+ 'description' => 'Enable priority escalation of tickets as part of daily batch processing.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'ticket_system-rt_external_datasrc',
- 'section' => '',
+ 'section' => 'ticketing',
'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>',
'type' => 'text',
{
'key' => 'ticket_system-rt_external_url',
- 'section' => '',
+ 'section' => 'ticketing',
'description' => 'With external RT integration, the URL for the external RT installation, for example, <code>https://rt.example.com/rt</code>',
'type' => 'text',
},
'per_agent' => 1, #XXX just FS/FS/ClientAPI/Signup.pm
},
+ {
+ 'key' => 'company_url',
+ 'section' => 'UI',
+ 'description' => 'Your company URL',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
{
'key' => 'company_address',
'section' => 'required',
'per_agent' => 1,
},
+ {
+ 'key' => 'company_phonenum',
+ 'section' => 'notification',
+ 'description' => 'Your company phone number',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
{
'key' => 'echeck-void',
'section' => 'deprecated',
'section' => '',
'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.",
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{ 'key' => 'referral_credit',
'section' => 'invoicing',
'description' => 'Enable FTP of raw invoice data - format.',
'type' => 'select',
- 'select_enum' => [ '', 'default', 'billco', ],
+ 'select_enum' => [ '', 'default', 'oneline', 'billco', ],
},
{
'section' => 'invoicing',
'description' => 'Enable spooling of raw invoice data - format.',
'type' => 'select',
- 'select_enum' => [ '', 'default', 'billco', ],
+ 'select_enum' => [ '', 'default', 'oneline', 'billco', ],
},
{
{
'key' => 'overlimit_groups',
'section' => '',
- 'description' => 'RADIUS group (or comma-separated groups) to assign to svc_acct which has exceeded its bandwidth or time limit.',
- 'type' => 'text',
+ 'description' => 'RADIUS group(s) to assign to svc_acct which has exceeded its bandwidth or time limit.',
+ 'type' => 'select-sub',
'per_agent' => 1,
+ 'multiple' => 1,
+ 'options_sub' => sub { require FS::Record;
+ require FS::radius_group;
+ map { $_->groupnum => $_->long_description }
+ FS::Record::qsearch('radius_group', {} );
+ },
+ 'option_sub' => sub { require FS::Record;
+ require FS::radius_group;
+ my $radius_group = FS::Record::qsearchs(
+ 'radius_group', { 'groupnum' => shift }
+ );
+ $radius_group ? $radius_group->long_description : '';
+ },
},
{
'select_hash' => [ FS::ConfDefaults->cust_fields_avail() ],
},
+ {
+ 'key' => 'cust_location-label_prefix',
+ 'section' => 'UI',
+ 'description' => 'Optional "site ID" to show in the location label',
+ 'type' => 'select',
+ 'select_hash' => [ '' => '',
+ 'CoStAg' => 'CoStAgXXXXX (country, state, agent name, locationnum)',
+ ],
+ },
+
+ {
+ 'key' => 'cust_location-agent_code',
+ 'section' => 'UI',
+ 'description' => 'Optional agent string for cust_location-label_prefix',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
{
'key' => 'cust_pkg-display_times',
'section' => 'UI',
'type' => 'checkbox',
},
+ {
+ 'key' => 'cust_pkg-group_by_location',
+ 'section' => 'UI',
+ 'description' => "Group packages by location.",
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'cust_pkg-show_fcc_voice_grade_equivalent',
'section' => 'UI',
- 'description' => "Show a field on package definitions for assigning a DSO equivalency number suitable for use on FCC form 477.",
+ 'description' => "Show a field on package definitions for assigning a DS0 equivalency number suitable for use on FCC form 477.",
'type' => 'checkbox',
},
'type' => 'checkbox',
},
+ {
+ 'key' => 'svc_acct-no_edit_username',
+ 'section' => 'shell',
+ 'description' => 'Disallow username editing.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'zone-underscore',
'section' => 'BIND',
'type' => 'checkbox',
},
+ {
+ 'key' => 'echeck-country',
+ 'section' => 'billing',
+ 'description' => 'Format electronic check information for the specified country.',
+ 'type' => 'select',
+ 'select_hash' => [ 'US' => 'United States',
+ 'CA' => 'Canada (enables branch)',
+ 'XX' => 'Other',
+ ],
+ },
+
+ {
+ 'key' => 'voip-cust_accountcode_cdr',
+ 'section' => 'telephony',
+ 'description' => 'Enable the per-customer option for CDR breakdown by accountcode.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'voip-cust_cdr_spools',
- 'section' => '',
+ 'section' => 'telephony',
'description' => 'Enable the per-customer option for individual CDR spools.',
'type' => 'checkbox',
},
{
'key' => 'voip-cust_cdr_squelch',
- 'section' => '',
+ 'section' => 'telephony',
'description' => 'Enable the per-customer option for not printing CDR on invoices.',
'type' => 'checkbox',
},
{
'key' => 'voip-cdr_email',
- 'section' => '',
+ 'section' => 'telephony',
'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.',
'type' => 'checkbox',
},
{
'key' => 'voip-cust_email_csv_cdr',
- 'section' => '',
+ 'section' => 'telephony',
'description' => 'Enable the per-customer option for including CDR information as a CSV attachment on emailed invoices.',
'type' => 'checkbox',
},
'section' => 'billing',
'description' => 'This allows selection of a package to insert on invoices for customers with postal invoices selected.',
'type' => 'select-part_pkg',
+ 'per_agent' => 1,
},
{
'description' => 'Fixed (unchangeable) format for electronic check batches.',
'type' => 'select',
'select_enum' => [ 'csv-td_canada_trust-merchant_pc_batch', 'BoM', 'PAP',
- 'paymentech', 'ach-spiritone', 'RBC'
+ 'paymentech', 'ach-spiritone', 'RBC', 'td_eft1464',
+ 'eft_canada'
]
},
{
'key' => 'batchconfig-td_eft1464',
'section' => 'billing',
- 'description' => 'Configuration for TD Bank EFT1464 batching, five 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.',
+ '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.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'batch-manual_approval',
+ 'section' => 'billing',
+ '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.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'batchconfig-eft_canada',
+ 'section' => 'billing',
+ '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.',
'type' => 'textarea',
+ 'per_agent' => 1,
+ },
+
+ {
+ 'key' => 'batch-spoolagent',
+ 'section' => 'billing',
+ 'description' => 'Store payment batches per-agent.',
+ 'type' => 'checkbox',
},
{
'type' => 'checkbox',
},
+ {
+ 'key' => 'cust_main-edit_calling_list_exempt',
+ 'section' => 'UI',
+ 'description' => 'Display the "calling_list_exempt" checkbox on customer edit.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'support-key',
'section' => '',
'type' => 'image',
'per_agent' => 1, #XXX just view/logo.cgi, which is for the global
#old-style editor anyway...?
+ 'per_locale' => 1,
},
{
'description' => 'Company logo for printed and PDF invoices, in EPS format.',
'type' => 'image',
'per_agent' => 1, #XXX as above, kinda
+ 'per_locale' => 1,
},
{
'type' => 'checkbox',
},
+ {
+ 'key' => 'cust_bill-line_item-date_style',
+ 'section' => 'billing',
+ 'description' => 'Display format for line item date ranges on invoice line items.',
+ 'type' => 'select',
+ 'select_hash' => [ '' => 'STARTDATE-ENDDATE',
+ 'month_of' => 'Month of MONTHNAME',
+ 'X_month' => 'DATE_DESC MONTHNAME',
+ ],
+ 'per_agent' => 1,
+ },
+
+ {
+ 'key' => 'cust_bill-line_item-date_description',
+ 'section' => 'billing',
+ 'description' => 'Text to display for "DATE_DESC" when using cust_bill-line_item-date_style DATE_DESC MONTHNAME.',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
{
'key' => 'support_packages',
'section' => '',
'section' => '',
'description' => 'Require daytime or night phone for all customer records.',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
'section' => '',
'description' => 'Email address field is required: require at least one invoicing email address for all customer records.',
'type' => 'checkbox',
+ 'per_agent' => 1,
+ },
+
+ {
+ 'key' => 'cust_main-check_unique',
+ 'section' => '',
+ 'description' => 'Warn before creating a customer record where these fields duplicate another customer.',
+ 'type' => 'select',
+ 'multiple' => 1,
+ 'select_hash' => [
+ 'address1' => 'Billing address',
+ ],
},
{
'key' => 'cancel_credit_type',
'section' => 'billing',
'description' => 'The group to use for new, automatically generated credit reasons resulting from cancellation.',
- 'type' => 'select-sub',
- 'options_sub' => sub { require FS::Record;
- require FS::reason_type;
- map { $_->typenum => $_->type }
- FS::Record::qsearch('reason_type', { class=>'R' } );
- },
- 'option_sub' => sub { require FS::Record;
- require FS::reason_type;
- my $reason_type = FS::Record::qsearchs(
- 'reason_type', { 'typenum' => shift }
- );
- $reason_type ? $reason_type->type : '';
- },
+ reason_type_options('R'),
+ },
+
+ {
+ 'key' => 'suspend_credit_type',
+ 'section' => 'billing',
+ 'description' => 'The group to use for new, automatically generated credit reasons resulting from package suspension.',
+ reason_type_options('R'),
},
{
'key' => 'referral_credit_type',
'section' => 'deprecated',
'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.',
- 'type' => 'select-sub',
- 'options_sub' => sub { require FS::Record;
- require FS::reason_type;
- map { $_->typenum => $_->type }
- FS::Record::qsearch('reason_type', { class=>'R' } );
- },
- 'option_sub' => sub { require FS::Record;
- require FS::reason_type;
- my $reason_type = FS::Record::qsearchs(
- 'reason_type', { 'typenum' => shift }
- );
- $reason_type ? $reason_type->type : '';
- },
+ reason_type_options('R'),
},
{
'key' => 'signup_credit_type',
'section' => 'billing', #self-service?
'description' => 'The group to use for new, automatically generated credit reasons resulting from signup and self-service declines.',
- 'type' => 'select-sub',
- 'options_sub' => sub { require FS::Record;
- require FS::reason_type;
- map { $_->typenum => $_->type }
- FS::Record::qsearch('reason_type', { class=>'R' } );
- },
- 'option_sub' => sub { require FS::Record;
- require FS::reason_type;
- my $reason_type = FS::Record::qsearchs(
- 'reason_type', { 'typenum' => shift }
- );
- $reason_type ? $reason_type->type : '';
- },
+ reason_type_options('R'),
},
{
'key' => 'prepayment_discounts-credit_type',
'section' => 'billing',
'description' => 'Enables the offering of prepayment discounts and establishes the credit reason type.',
- 'type' => 'select-sub',
- 'options_sub' => sub { require FS::Record;
- require FS::reason_type;
- map { $_->typenum => $_->type }
- FS::Record::qsearch('reason_type', { class=>'R' } );
- },
- 'option_sub' => sub { require FS::Record;
- require FS::reason_type;
- my $reason_type = FS::Record::qsearchs(
- 'reason_type', { 'typenum' => shift }
- );
- $reason_type ? $reason_type->type : '';
- },
-
+ reason_type_options('R'),
},
{
'description' => 'Enables searching of various formatted values in cust_main.agent_custid',
'type' => 'select',
'select_hash' => [
- '' => 'Numeric only',
- 'ww?d+' => 'Numeric with one or two letter prefix',
+ '' => 'Numeric only',
+ '\d{7}' => 'Numeric only, exactly 7 digits',
+ 'ww?d+' => 'Numeric with one or two letter prefix',
],
},
'section' => 'invoicing',
'description' => 'Disable inclusion of previous balance, payment, and credit lines on invoices',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
'type' => 'checkbox',
},
+ {
+ 'key' => 'previous_balance-show_credit',
+ 'section' => 'invoicing',
+ 'description' => 'Show the customer\'s credit balance on invoices when applicable.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'balance_due_below_line',
'section' => 'invoicing',
'section' => 'UI',
'description' => 'The year to use in census tract lookups',
'type' => 'select',
- 'select_enum' => [ qw( 2010 2009 2008 ) ],
+ 'select_enum' => [ qw( 2012 2011 2010 ) ],
+ },
+
+ {
+ 'key' => 'tax_district_method',
+ 'section' => 'UI',
+ 'description' => 'The method to use to look up tax district codes.',
+ 'type' => 'select',
+ 'select_hash' => [ FS::Misc::Geo::get_district_methods() ],
},
{
'type' => 'text',
},
+ {
+ 'key' => 'geocode_module',
+ 'section' => '',
+ 'description' => 'Module to geocode (retrieve a latitude and longitude for) addresses',
+ 'type' => 'select',
+ 'select_enum' => [ 'Geo::Coder::Googlev3' ],
+ },
+
+ {
+ 'key' => 'geocode-require_nw_coordinates',
+ 'section' => 'UI',
+ 'description' => 'Require latitude and longitude in the North Western quadrant, e.g. for North American co-ordinates, etc.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'disable_acl_changes',
'section' => '',
],
},
+ {
+ 'key' => 'cust_main-custnum-display_prefix',
+ 'section' => 'UI',
+ 'description' => 'Prefix the customer number with this string for display purposes.',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
+ {
+ 'key' => 'cust_main-custnum-display_special',
+ 'section' => 'UI',
+ 'description' => 'Use this customer number prefix format',
+ 'type' => 'select',
+ 'select_hash' => [ '' => '',
+ 'CoStAg' => 'CoStAg (country, state, agent name or display_prefix)',
+ 'CoStCl' => 'CoStCl (country, state, class name)' ],
+ },
+
+ {
+ 'key' => 'cust_main-custnum-display_length',
+ 'section' => 'UI',
+ 'description' => 'Zero fill the customer number to this many digits for display purposes.',
+ 'type' => 'text',
+ },
+
{
'key' => 'cust_main-default_areacode',
'section' => 'UI',
'type' => 'text',
},
+ {
+ 'key' => 'unsuspend_email_admin',
+ 'section' => '',
+ 'description' => 'Destination admin email address to enable unsuspension notices',
+ 'type' => 'text',
+ },
+
{
'key' => 'email_report-subject',
'section' => '',
'per_agent' => 1,
},
+ {
+ 'key' => 'selfservice-stripe1_bgcolor',
+ 'section' => 'self-service',
+ 'description' => 'HTML color for self-service interface lists (primary stripe), for example, #FFFFFF',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
+ {
+ 'key' => 'selfservice-stripe2_bgcolor',
+ 'section' => 'self-service',
+ 'description' => 'HTML color for self-service interface lists (alternate stripe), for example, #DDDDDD',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
{
'key' => 'selfservice-text_color',
'section' => 'self-service',
'per_agent' => 1,
},
+ {
+ 'key' => 'selfservice-no_logo',
+ 'section' => 'self-service',
+ 'description' => 'Disable the logo in self-service',
+ 'type' => 'checkbox',
+ 'per_agent' => 1,
+ },
+
{
'key' => 'selfservice-title_color',
'section' => 'self-service',
'type' => 'image',
'per_agent' => 1,
},
+
+ {
+ 'key' => 'selfservice-view_usage_nodomain',
+ 'section' => 'self-service',
+ 'description' => 'Show usernames without their domains in "View my usage" in the self-service interface.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'selfservice-login_banner_image',
+ 'section' => 'self-service',
+ 'description' => 'Banner image shown on the login page, in PNG format.',
+ 'type' => 'image',
+ },
+
+ {
+ 'key' => 'selfservice-login_banner_url',
+ 'section' => 'self-service',
+ 'description' => 'Link for the login banner.',
+ 'type' => 'text',
+ },
{
'key' => 'selfservice-bulk_format',
{
'key' => 'signup-recommend_daytime',
'section' => 'self-service',
- 'description' => 'Encourage the entry of a daytime phone number invoicing email address on signup.',
+ 'description' => 'Encourage the entry of a daytime phone number on signup.',
'type' => 'checkbox',
},
+ {
+ 'key' => 'signup-duplicate_cc-warn_hours',
+ 'section' => 'self-service',
+ 'description' => 'Issue a warning if the same credit card is used for multiple signups within this many hours.',
+ 'type' => 'text',
+ },
+
{
'key' => 'svc_phone-radius-default_password',
- 'section' => '',
+ 'section' => 'telephony',
'description' => 'Default password when exporting svc_phone records to RADIUS',
'type' => 'text',
},
{
'key' => 'svc_phone-allow_alpha_phonenum',
- 'section' => '',
+ 'section' => 'telephony',
'description' => 'Allow letters in phone numbers.',
'type' => 'checkbox',
},
{
'key' => 'svc_phone-domain',
- 'section' => '',
+ 'section' => 'telephony',
'description' => 'Track an optional domain association with each phone service.',
'type' => 'checkbox',
},
{
'key' => 'svc_phone-phone_name-max_length',
- 'section' => '',
+ 'section' => 'telephony',
'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.',
'type' => 'text',
},
+ {
+ 'key' => 'svc_phone-random_pin',
+ 'section' => 'telephony',
+ 'description' => 'Number of random digits to generate in the "PIN" field, if empty.',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'svc_phone-lnp',
+ 'section' => 'telephony',
+ 'description' => 'Enables Number Portability features for svc_phone',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'default_phone_countrycode',
'section' => '',
{
'key' => 'cdr-charged_party-field',
- 'section' => '',
+ 'section' => 'telephony',
'description' => 'Set the charged_party field of CDRs to this field.',
'type' => 'select-sub',
'options_sub' => sub { my $fields = FS::cdr->table_info->{'fields'};
#probably deprecate in favor of cdr-charged_party-field above
{
'key' => 'cdr-charged_party-accountcode',
- 'section' => '',
+ 'section' => 'telephony',
'description' => 'Set the charged_party field of CDRs to the accountcode.',
'type' => 'checkbox',
},
{
'key' => 'cdr-charged_party-accountcode-trim_leading_0s',
- 'section' => '',
+ 'section' => 'telephony',
'description' => 'When setting the charged_party field of CDRs to the accountcode, trim any leading zeros.',
'type' => 'checkbox',
},
{
'key' => 'cdr-charged_party_rewrite',
- 'section' => '',
+ 'section' => 'telephony',
'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*.',
'type' => 'checkbox',
},
{
'key' => 'cdr-taqua-da_rewrite',
- 'section' => '',
+ 'section' => 'telephony',
'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.',
'type' => 'text',
},
+ {
+ 'key' => 'cdr-taqua-accountcode_rewrite',
+ 'section' => 'telephony',
+ 'description' => 'For the Taqua CDR format, pull accountcodes from secondary CDRs with matching sessionNumber.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cdr-asterisk_australia_rewrite',
+ 'section' => 'telephony',
+ 'description' => 'For Asterisk CDRs, assign CDR type numbers based on Australian conventions.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'cust_pkg-show_autosuspend',
'section' => 'UI',
{
'key' => 'cdr-asterisk_forward_rewrite',
- 'section' => '',
+ 'section' => 'telephony',
'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").',
'type' => 'checkbox',
},
'type' => 'text',
},
+ {
+ 'key' => 'svc_broadband-manage_link_text',
+ 'section' => 'UI',
+ 'description' => 'Label for "Manage Device" link',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'svc_broadband-manage_link_loc',
+ 'section' => 'UI',
+ 'description' => 'Location for "Manage Device" link',
+ 'type' => 'select',
+ 'select_hash' => [
+ 'bottom' => 'Near Unprovision link',
+ 'right' => 'With export-related links',
+ ],
+ },
+
+ {
+ 'key' => 'svc_broadband-manage_link-new_window',
+ 'section' => 'UI',
+ 'description' => 'Open the "Manage Device" link in a new window',
+ 'type' => 'checkbox',
+ },
+
#more fine-grained, service def-level control could be useful eventually?
{
'key' => 'svc_broadband-allow_null_ip_addr',
'type' => 'checkbox',
},
+ {
+ 'key' => 'svc_hardware-check_mac_addr',
+ 'section' => '', #?
+ 'description' => 'Require the "hardware address" field in hardware services to be a valid MAC address.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'tax-report_groups',
'section' => '',
{
'key' => 'cust_main-custom_link',
'section' => 'UI',
- 'description' => 'URL to use as source for the "Custom" tab in the View Customer page. The custnum will be appended.',
- 'type' => 'text',
+ 'description' => 'URL to use as source for the "Custom" tab in the View Customer page. The customer number will be appended, or you can insert "$custnum" to have it inserted elsewhere. "$agentnum" will be replaced with the agent number, and "$usernum" will be replaced with the employee number.',
+ 'type' => 'textarea',
},
{
'description' => 'Default the "Continue recurring billing while suspended" flag to on for new package definitions.',
'type' => 'checkbox',
},
+
+ {
+ 'key' => 'qual-alt_address_format',
+ 'section' => 'UI',
+ 'description' => 'Enable the alternate address format (location type, number, and kind) for qualifications.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'prospect_main-alt_address_format',
+ 'section' => 'UI',
+ '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.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'prospect_main-location_required',
+ 'section' => 'UI',
+ 'description' => 'Require an address for prospects. Recommended if the main use of propects is for qualifications.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'note-classes',
+ 'section' => 'UI',
+ 'description' => 'Use customer note classes',
+ 'type' => 'select',
+ 'select_hash' => [
+ 0 => 'Disabled',
+ 1 => 'Enabled',
+ 2 => 'Enabled, with tabs',
+ ],
+ },
+
+ {
+ 'key' => 'svc_acct-cf_privatekey-message',
+ 'section' => '',
+ 'description' => 'For internal use: HTML displayed when cf_privatekey field is set.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'menu-prepend_links',
+ 'section' => 'UI',
+ 'description' => 'Links to prepend to the main menu, one per line, with format "URL Link Label (optional ALT popup)".',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'cust_main-external_links',
+ 'section' => 'UI',
+ 'description' => 'External links available in customer view, one per line, with format "URL Link Label (optional ALT popup)". The URL will have custnum appended.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'svc_phone-did-summary',
+ 'section' => 'invoicing',
+ 'description' => 'Enable DID activity summary on invoices, showing # DIDs activated/deactivated/ported-in/ported-out and total minutes usage, covering period since last invoice.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'svc_acct-usage_seconds',
+ 'section' => 'invoicing',
+ 'description' => 'Enable calculation of RADIUS usage time for invoices. You must modify your template to display this information.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'opensips_gwlist',
+ 'section' => 'telephony',
+ 'description' => 'For svc_phone OpenSIPS dr_rules export, gwlist column value, per-agent',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ 'agentonly' => 1,
+ },
+
+ {
+ 'key' => 'opensips_description',
+ 'section' => 'telephony',
+ 'description' => 'For svc_phone OpenSIPS dr_rules export, description column value, per-agent',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ 'agentonly' => 1,
+ },
+
+ {
+ 'key' => 'opensips_route',
+ 'section' => 'telephony',
+ 'description' => 'For svc_phone OpenSIPS dr_rules export, routeid column value, per-agent',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ 'agentonly' => 1,
+ },
+
+ {
+ 'key' => 'cust_bill-no_recipients-error',
+ 'section' => 'invoicing',
+ '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.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cust_bill-latex_lineitem_maxlength',
+ 'section' => 'invoicing',
+ 'description' => 'Truncate long line items to this number of characters on typeset invoices, to avoid losing things off the right margin. Defaults to 50. ',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'cust_main-status_module',
+ 'section' => 'UI',
+ '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?
+ 'type' => 'select',
+ 'select_enum' => [ 'Classic', 'Recurring' ],
+ },
+
+ {
+ 'key' => 'cust_main-print_statement_link',
+ 'section' => 'UI',
+ 'description' => 'Show a link to download a current statement for the customer.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'username-pound',
+ 'section' => 'username',
+ 'description' => 'Allow the pound character (#) in usernames.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'ie-compatibility_mode',
+ 'section' => 'UI',
+ '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.",
+ 'type' => 'select',
+ 'select_enum' => [ '', '7', 'EmulateIE7', '8', 'EmulateIE8' ],
+ },
+
+ {
+ 'key' => 'disable_payauto_default',
+ 'section' => 'UI',
+ 'description' => 'Disable the "Charge future payments to this (card|check) automatically" checkbox from defaulting to checked.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'payment-history-report',
+ 'section' => 'UI',
+ 'description' => 'Show a link to the raw database payment history report in the Reports menu. DO NOT ENABLE THIS for modern installations.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'svc_broadband-require-nw-coordinates',
+ 'section' => 'deprecated',
+ 'description' => 'Deprecated; see geocode-require_nw_coordinates instead',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cust-email-high-visibility',
+ 'section' => 'UI',
+ 'description' => 'Move the invoicing e-mail address field to the top of the billing address section and highlight it.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cust-edit-alt-field-order',
+ 'section' => 'UI',
+ 'description' => 'An alternate ordering of fields for the New Customer and Edit Customer screens.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cust_bill-enable_promised_date',
+ 'section' => 'UI',
+ 'description' => 'Enable display/editing of the "promised payment date" field on invoices.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'available-locales',
+ 'section' => '',
+ 'description' => 'Limit available locales (employee preferences, per-customer locale selection, etc.) to a particular set.',
+ 'type' => 'select-sub',
+ 'multiple' => 1,
+ 'options_sub' => sub {
+ map { $_ => FS::Locales->description($_) }
+ grep { $_ ne 'en_US' }
+ FS::Locales->locales;
+ },
+ 'option_sub' => sub { FS::Locales->description(shift) },
+ },
+
+ {
+ 'key' => 'cust_main-require_locale',
+ 'section' => 'UI',
+ 'description' => 'Require an explicit locale to be chosen for new customers.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'translate-auto-insert',
+ 'section' => '',
+ 'description' => 'Auto-insert untranslated strings for selected non-en_US locales with their default/en_US values. Do not turn this on unless translating the interface into a new language.',
+ 'type' => 'select',
+ 'multiple' => 1,
+ 'select_enum' => [ grep { $_ ne 'en_US' } FS::Locales::locales ],
+ },
+
+ {
+ 'key' => 'svc_acct-tower_sector',
+ 'section' => '',
+ 'description' => 'Track tower and sector for svc_acct (account) services.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cdr-prerate',
+ 'section' => 'telephony',
+ 'description' => 'Experimental feature to rate CDRs immediately, rather than waiting until invoice generation time. Can reduce invoice generation time when processing lots of CDRs. Currently works with "VoIP/telco CDR rating (standard)" price plans using "Phone numbers (svc_phone.phonenum)" CDR service matching, without any included minutes.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cdr-prerate-cdrtypenums',
+ 'section' => 'telephony',
+ 'description' => 'When using cdr-prerate to rate CDRs immediately, limit processing to these CDR types.',
+ 'type' => 'select-sub',
+ 'multiple' => 1,
+ 'options_sub' => sub { require FS::Record;
+ require FS::cdr_type;
+ map { $_->cdrtypenum => $_->cdrtypename }
+ FS::Record::qsearch( 'cdr_type',
+ {} #{ 'disabled' => '' }
+ );
+ },
+ 'option_sub' => sub { require FS::Record;
+ require FS::cdr_type;
+ my $cdr_type = FS::Record::qsearchs(
+ 'cdr_type', { 'cdrtypenum'=>shift } );
+ $cdr_type ? $cdr_type->cdrtypename : '';
+ },
+ },
+
+ {
+ 'key' => 'brand-agent',
+ 'section' => 'UI',
+ 'description' => 'Brand the backoffice interface (currently Help->About) using the company_name, company_url and logo.png configuration settings of the selected agent. Typically used when selling or bundling hosted access to the backoffice interface. NOTE: The AGPL software license has specific requirements for source code availability in this situation.',
+ 'type' => 'select-agent',
+ },
+
+ {
+ 'key' => 'cust_class-tax_exempt',
+ 'section' => 'billing',
+ 'description' => 'Control the tax exemption flag per customer class rather than per indivual customer.',
+ 'type' => 'checkbox',
+ },
{ key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },