X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2FConf.pm;h=edfe3c27abe6120e221cda91134a130f8a303eb0;hb=18459c4369f63b7fda11a3ff7a0af067bed0c9bf;hp=efdad430a9f564b2ef10810e95359fd0fbd575ab;hpb=8cbe016ac2c28cd209c48f053f361573368e7988;p=freeside.git
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index efdad430a..edfe3c27a 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -13,6 +13,7 @@ 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%%%';
@@ -631,6 +632,21 @@ my %payment_gateway_options = (
},
);
+# 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)
@@ -677,6 +693,13 @@ my %payment_gateway_options = (
%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
@@ -1570,6 +1593,13 @@ and customer address. Include units.',
'type' => 'text',
},
+ {
+ 'key' => 'disable_maxselect',
+ 'section' => 'UI',
+ 'description' => 'Prevent changing the number of records per page.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'session-start',
'section' => 'session',
@@ -1770,6 +1800,7 @@ and customer address. Include units.',
'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,
},
{
@@ -1980,6 +2011,14 @@ and customer address. Include units.',
'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',
@@ -2258,6 +2297,13 @@ and customer address. Include units.',
'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',
@@ -2810,6 +2856,14 @@ and customer address. Include units.',
'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',
@@ -2873,6 +2927,7 @@ and customer address. Include units.',
'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',
@@ -2900,7 +2955,7 @@ and customer address. Include units.',
'section' => 'invoicing',
'description' => 'Enable FTP of raw invoice data - format.',
'type' => 'select',
- 'select_enum' => [ '', 'default', 'billco', ],
+ 'select_enum' => [ '', 'default', 'oneline', 'billco', ],
},
{
@@ -2936,7 +2991,7 @@ and customer address. Include units.',
'section' => 'invoicing',
'description' => 'Enable spooling of raw invoice data - format.',
'type' => 'select',
- 'select_enum' => [ '', 'default', 'billco', ],
+ 'select_enum' => [ '', 'default', 'oneline', 'billco', ],
},
{
@@ -3066,6 +3121,17 @@ and customer address. Include units.',
'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',
@@ -3531,6 +3597,26 @@ and customer address. Include units.',
'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' => '',
@@ -3544,6 +3630,7 @@ and customer address. Include units.',
'section' => '',
'description' => 'Require daytime or night phone for all customer records.',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
@@ -3551,6 +3638,18 @@ and customer address. Include units.',
'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',
+ ],
},
{
@@ -3564,77 +3663,35 @@ and customer address. Include units.',
'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'),
},
{
@@ -3671,6 +3728,7 @@ and customer address. Include units.',
'section' => 'invoicing',
'description' => 'Disable inclusion of previous balance, payment, and credit lines on invoices',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
@@ -3734,7 +3792,15 @@ and customer address. Include units.',
'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() ],
},
{
@@ -3821,9 +3887,26 @@ and customer address. Include units.',
{
'key' => 'cust_main-custnum-display_prefix',
'section' => 'UI',
- 'description' => 'Prefix the customer number with this number for display purposes (and zero fill to 8 digits).',
+ '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',
- #and then probably agent-virt this to merge these instances
},
{
@@ -3965,6 +4048,14 @@ and customer address. Include units.',
'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',
@@ -4075,6 +4166,20 @@ and customer address. Include units.',
'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',
@@ -4147,7 +4252,14 @@ and customer address. Include units.',
'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',
@@ -4227,6 +4339,13 @@ and customer address. Include units.',
'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',
@@ -4352,6 +4471,13 @@ and customer address. Include units.',
'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' => '',
@@ -4654,6 +4780,13 @@ and customer address. Include units.',
'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',
@@ -4697,13 +4830,6 @@ and customer address. Include units.',
'type' => 'checkbox',
},
- {
- 'key' => 'cust_main-require-bank-branch',
- 'section' => 'UI',
- 'description' => 'An alternate DCHK/CHEK format; require entry of bank branch number.',
- 'type' => 'checkbox',
- },
-
{
'key' => 'cust-edit-alt-field-order',
'section' => 'UI',
@@ -4735,14 +4861,54 @@ and customer address. Include units.',
{
'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 => "apacheroot", section => "deprecated", description => "DEPRECATED", type => "text" },
{ key => "apachemachine", section => "deprecated", description => "DEPRECATED", type => "text" },