X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=edfe3c27abe6120e221cda91134a130f8a303eb0;hb=18459c4369f63b7fda11a3ff7a0af067bed0c9bf;hp=e49174b20271fc16ca51cf369c0e24c1826fec1a;hpb=1cc2f252d504829e7aa4394a4c788e6e6fc03756;p=freeside.git diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index e49174b20..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) @@ -678,6 +694,13 @@ my %payment_gateway_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 #'section' => 'deprecated', @@ -1571,6 +1594,13 @@ and customer address. Include units.', }, { + 'key' => 'disable_maxselect', + 'section' => 'UI', + 'description' => 'Prevent changing the number of records per page.', + 'type' => 'checkbox', + }, + + { 'key' => 'session-start', 'section' => 'session', 'description' => 'If defined, the command which is executed on the Freeside machine when a session begins. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on.', @@ -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, }, { @@ -1981,6 +2012,14 @@ and customer address. Include units.', }, { + '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', 'description' => 'Base URL for the self-service web interface - necessary for some widgets to find their way, including retrieval of non-US state information and phone number provisioning.', @@ -2259,6 +2298,13 @@ and customer address. Include units.', }, { + 'key' => 'require_cash_deposit_info', + 'section' => 'billing', + 'description' => 'When recording cash payments, display bank deposit information fields.', + 'type' => 'checkbox', + }, + + { 'key' => 'paymentforcedtobatch', 'section' => 'deprecated', 'description' => 'See batch-enable_payby and realtime-disable_payby. Used to (for CHEK): Cause per customer payment entry to be forced to a batch processor rather than performed realtime.', @@ -2475,6 +2521,13 @@ and customer address. Include units.', }, { + '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.', @@ -2494,7 +2547,7 @@ and customer address. Include units.', { 'key' => 'selfservice-hide_invoices-taxclass', 'section' => 'self-service', - 'description' => 'Hide invoices with only this package tax class from self-service. Typically set to something like "Previous balance" and used when importing legacy invoices into legacy_cust_bill.', + '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', }, @@ -2643,14 +2696,28 @@ and customer address. Include units.', { 'key' => 'network_monitoring_system', - 'section' => '', + 'section' => 'network_monitoring', 'description' => 'Networking monitoring system (NMS) integration. Torrus_Internal uses the built-in Torrus ticketing system (see the integrated networking monitoring system installation instructions).', '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', 'description' => 'Default queue used when creating new customer tickets.', @@ -2790,6 +2857,14 @@ and customer address. Include units.', }, { + 'key' => 'company_url', + 'section' => 'UI', + 'description' => 'Your company URL', + 'type' => 'text', + 'per_agent' => 1, + }, + + { 'key' => 'company_address', 'section' => 'required', 'description' => 'Your company address', @@ -2852,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', @@ -2879,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', ], }, { @@ -2915,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', ], }, { @@ -3046,6 +3122,17 @@ and customer address. Include units.', }, { + '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.', @@ -3511,6 +3598,26 @@ and customer address. Include units.', }, { + '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' => '', 'description' => 'A list of packages eligible for RT ticket time transfer, one pkgpart per line.', #this should really be a select multiple, or specified in the packages themselves... @@ -3523,6 +3630,7 @@ and customer address. Include units.', 'section' => '', 'description' => 'Require daytime or night phone for all customer records.', 'type' => 'checkbox', + 'per_agent' => 1, }, { @@ -3530,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', + ], }, { @@ -3543,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'), }, { @@ -3622,9 +3700,9 @@ and customer address. Include units.', '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', ], }, @@ -3650,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, }, { @@ -3713,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() ], }, { @@ -3731,6 +3818,21 @@ and customer address. Include units.', }, { + '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' => '', 'description' => 'Disable all ACL changes, for demos.', @@ -3783,6 +3885,31 @@ and customer address. Include units.', }, { + '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', 'description' => 'Default area code for customers.', @@ -3922,6 +4049,14 @@ and customer address. Include units.', }, { + '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', 'description' => 'HTML color for the self-service title, for example, #000000', @@ -4032,6 +4167,20 @@ and customer address. Include units.', }, { + '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' => 'Parameter arrangement for selfservice bulk features', @@ -4103,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', @@ -4184,6 +4340,13 @@ and customer address. Include units.', }, { + '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', 'description' => 'Show package auto-suspend dates. Use with caution for now; can slow down customer view for large insallations.', @@ -4293,6 +4456,12 @@ and customer address. Include units.', ], }, + { + '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? { @@ -4303,6 +4472,13 @@ and customer address. Include units.', }, { + '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' => '', 'description' => 'List of grouping possibilities for tax names on reports, one per line, "label op value" (op can be = or !=).', @@ -4469,7 +4645,7 @@ and customer address. Include units.', { 'key' => 'cust_main-custom_link', 'section' => 'UI', - '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.', + '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', }, @@ -4604,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', @@ -4635,8 +4818,8 @@ and customer address. Include units.', { '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', }, @@ -4648,16 +4831,16 @@ and customer address. Include units.', }, { - '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', }, @@ -4678,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" },