use FS::conf;
use FS::Record qw(qsearch qsearchs);
use FS::UID qw(dbh datasrc use_confcompat);
+use FS::Misc::Invoicing qw( spool_formats );
+use FS::Misc::Geo;
$base_dir = '%%%FREESIDE_CONF%%%';
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);
+ }
}
}
}
}
+#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
},
);
+# 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)
#UI (69 items)
%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
{
'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',
},
'description' => 'Send payment receipts.',
'type' => 'checkbox',
'per_agent' => 1,
+ 'agent_bool' => 1,
},
{
'type' => 'text',
},
+ {
+ 'key' => 'disable_maxselect',
+ 'section' => 'UI',
+ 'description' => 'Prevent changing the number of records per page.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'session-start',
'section' => 'session',
'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,
},
{
'type' => 'checkbox',
},
+ {
+ 'key' => 'unmask_ss',
+ 'section' => 'UI',
+ 'description' => "Don't mask social security numbers in the web interface.",
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'show_stateid',
'section' => 'UI',
'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',
'section' => 'self-service',
'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' => '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',
{
'key' => 'network_monitoring_system',
- 'section' => '',
+ '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(RT_Internal RT_Libs RT_External) ],
'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' => 'ticketing',
'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',
'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', ],
+ 'options' => [ spool_formats() ],
},
{
'section' => 'invoicing',
'description' => 'Enable spooling of raw invoice data - format.',
'type' => 'select',
- 'select_enum' => [ '', 'default', 'billco', ],
+ 'options' => [ spool_formats() ],
},
{
'type' => 'checkbox',
},
+ {
+ 'key' => 'bridgestone-batch_counter',
+ 'section' => '',
+ 'description' => 'Batch counter for spool files. Increments every time a spool file is uploaded.',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
+ {
+ 'key' => 'bridgestone-prefix',
+ 'section' => '',
+ 'description' => 'Agent identifier for uploading to BABT printing service.',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
+ {
+ 'key' => 'bridgestone-confirm_template',
+ 'section' => '',
+ 'description' => 'Confirmation email template for uploading to BABT service. Text::Template format, with variables "$zipfile" (name of the zipped file), "$seq" (sequence number), "$prefix" (user ID string), and "$rows" (number of records in the file). Should include Subject: and To: headers, separated from the rest of the message by a blank line.',
+ # this could use a true message template, but it's hard to see how that
+ # would make the world a better place
+ 'type' => 'textarea',
+ 'per_agent' => 1,
+ },
+
{
'key' => 'svc_acct-usage_suspend',
'section' => 'billing',
'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_pkg-display_times',
'section' => 'UI',
},
{
- 'key' => 'echeck-no_routing',
+ 'key' => 'echeck-country',
'section' => 'billing',
- 'description' => 'Disable the routing number entirely for Electronic Check payment info.',
- 'type' => 'checkbox',
+ 'description' => 'Format electronic check information for the specified country.',
+ 'type' => 'select',
+ 'select_hash' => [ 'US' => 'United States',
+ 'CA' => 'Canada (enables branch)',
+ 'XX' => 'Other',
+ ],
},
{
'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',
},
{
{
'key' => 'cust_main-enable_birthdate',
'section' => 'UI',
- 'descritpion' => 'Enable tracking of a birth date with each customer record',
+ 'description' => 'Enable tracking of a birth date with each customer record',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cust_main-enable_spouse_birthdate',
+ 'section' => 'UI',
+ 'description' => 'Enable tracking of a spouse birth date with each customer record',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cust_main-edit_calling_list_exempt',
+ 'section' => 'UI',
+ 'description' => 'Display the "calling_list_exempt" checkbox on customer edit.',
'type' => 'checkbox',
},
'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',
- '\d{7}' => 'Numeric only, exactly 7 digits',
- '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,
},
{
'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' => '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',
'section' => 'deprecated',
'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',
'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',
'type' => 'checkbox',
},
- {
- 'key' => 'sg-multicustomer_hack',
- 'section' => '',
- 'description' => "Don't use this.",
- 'type' => 'checkbox',
- },
-
- {
- 'key' => 'sg-ping_username',
- 'section' => '',
- 'description' => "Don't use this.",
- 'type' => 'text',
- },
-
- {
- 'key' => 'sg-ping_password',
- 'section' => '',
- 'description' => "Don't use this.",
- 'type' => 'text',
- },
-
- {
- 'key' => 'sg-login_username',
- 'section' => '',
- 'description' => "Don't use this.",
- 'type' => 'text',
- },
-
{
'key' => 'mc-outbound_packages',
'section' => '',
'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' => '',
'type' => 'textarea',
},
+ {
+ 'key' => 'tax-cust_exempt-groups-require_individual_nums',
+ 'section' => '',
+ 'description' => 'When using tax-cust_exempt-groups, require an individual tax exemption number for each exemption from different taxes.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'cust_main-default_view',
'section' => 'UI',
{
'key' => 'cust_main-edit_signupdate',
'section' => 'UI',
- 'descritpion' => 'Enable manual editing of the signup date.',
+ 'description' => 'Enable manual editing of the signup date.',
'type' => 'checkbox',
},
{
'key' => 'svc_acct-disable_access_number',
'section' => 'UI',
- 'descritpion' => 'Disable access number selection.',
+ 'description' => 'Disable access number selection.',
'type' => 'checkbox',
},
{
'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',
+ },
+
+ {
+ 'key' => 'cust_main-custom_content',
+ 'section' => 'UI',
+ 'description' => 'As an alternative to cust_main-custom_link (leave it blank), the contant to display on this customer page, one item per line. Available iems are: small_custview, birthdate, spouse_birthdate, svc_acct, svc_phone and svc_external.',
+ 'type' => 'textarea',
},
{
'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',
'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',
{
'key' => 'payment-history-report',
'section' => 'UI',
- 'description' => 'Show a link to the payment history report in the Reports menu. DO NOT ENABLE THIS.',
+ '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' => 'UI',
- 'description' => 'On svc_broadband add/edit, require latitude and longitude in the North Western quadrant, e.g. for North American co-ordinates, etc.',
+ 'section' => 'deprecated',
+ 'description' => 'Deprecated; see geocode-require_nw_coordinates instead',
'type' => 'checkbox',
},
},
{
- 'key' => 'cust_main-require-bank-branch',
+ 'key' => 'cust-edit-alt-field-order',
'section' => 'UI',
- 'description' => 'An alternate DCHK/CHEK format; require entry of bank branch number.',
+ 'description' => 'An alternate ordering of fields for the New Customer and Edit Customer screens.',
'type' => 'checkbox',
},
-
+
{
- 'key' => 'cust-edit-alt-field-order',
+ 'key' => 'cust_bill-enable_promised_date',
'section' => 'UI',
- 'description' => 'An alternate ordering of fields for the New Customer and Edit Customer screens.',
+ 'description' => 'Enable display/editing of the "promised payment date" field on invoices.',
'type' => 'checkbox',
},
},
'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.',
+ '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 { map { $_ => '' }
- grep { $_ ne 'en_US' } FS::Locales::locales;
- },
- 'option_sub' => sub { ''; },
+ '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' => 'selfservice-billing_history-line_items',
+ 'section' => 'self-service',
+ 'description' => 'Return line item billing detail for the self-service billing_history API call.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'logout-timeout',
+ 'section' => 'UI',
+ 'description' => 'If set, automatically log users out of the backoffice after this many minutes.',
+ 'type' => 'text',
},
{ key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },