X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=9c9c6aaaffa872deb64a6818e5e0e7744073c00d;hp=030799acf22a03f9bfb379f2ec1c45ecaa14b427;hb=2b8ffc98529637ffddfe7cbf6b4f9b8deb90f0fa;hpb=e3380da234d14fc2702300a90f4a0b5ff72cba82 diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 030799acf..9c9c6aaaf 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1,6 +1,7 @@ package FS::Conf; use vars qw($base_dir @config_items @base_items @card_types $DEBUG); +use Carp; use IO::File; use File::Basename; use MIME::Base64; @@ -84,7 +85,7 @@ global default if one is present. sub _usecompat { my ($self, $method) = (shift, shift); - warn "NO CONFIGURATION RECORDS FOUND -- USING COMPATIBILITY MODE" + carp "NO CONFIGURATION RECORDS FOUND -- USING COMPATIBILITY MODE" if use_confcompat; my $compat = new FS::Conf_compat17 ("$base_dir/conf." . datasrc); $compat->$method(@_); @@ -96,7 +97,7 @@ sub _config { $hashref->{agentnum} = $agentnum; local $FS::Record::conf = undef; # XXX evil hack prevents recursion my $cv = FS::Record::qsearchs('conf', $hashref); - if (!$cv && defined($agentnum)) { + if (!$cv && defined($agentnum) && $agentnum) { $hashref->{agentnum} = ''; $cv = FS::Record::qsearchs('conf', $hashref); } @@ -149,12 +150,12 @@ sub exists { defined($self->_config($name, $agentnum)); } -#=item config_orbase KEY SUFFIX -# -#Returns the configuration value or values (depending on context) for -#KEY_SUFFIX, if it exists, otherwise for KEY -# -#=cut +=item config_orbase KEY SUFFIX + +Returns the configuration value or values (depending on context) for +KEY_SUFFIX, if it exists, otherwise for KEY + +=cut # outmoded as soon as we shift to agentnum based config values # well, mostly. still useful for e.g. late notices, etc. in that we want @@ -171,6 +172,26 @@ sub config_orbase { } } +=item key_orbase KEY SUFFIX + +If the config value KEY_SUFFIX exists, returns KEY_SUFFIX, otherwise returns +KEY. Useful for determining which exact configuration option is returned by +config_orbase. + +=cut + +sub key_orbase { + my $self = shift; + #no compat for this...return $self->_usecompat('config_orbase', @_) if use_confcompat; + + my( $name, $suffix ) = @_; + if ( $self->exists("${name}_$suffix") ) { + "${name}_$suffix"; + } else { + $name; + } +} + =item invoice_templatenames Returns all possible invoice template names. @@ -420,7 +441,7 @@ sub _orbase_items { map { new FS::ConfItem { 'key' => $_, 'section' => $proto->section, - 'description' => 'Alternate ' . $proto->description . ' See the billing documentation for details.', + 'description' => 'Alternate ' . $proto->description . ' See the billing documentation for details.', 'type' => $proto->type, }; } &$listmaker($base); @@ -512,21 +533,7 @@ worry that config_items is freeside-specific and icky. invoice_latexfooter invoice_latexsmallfooter invoice_latexnotes - invoice_html - invoice_htmlreturnaddress - invoice_htmlfooter - invoice_htmlnotes - logo.png - logo.eps - ); - -@base_items = qw ( - invoice_template - invoice_latex - invoice_latexreturnaddress - invoice_latexfooter - invoice_latexsmallfooter - invoice_latexnotes + invoice_latexcoupon invoice_html invoice_htmlreturnaddress invoice_htmlfooter @@ -547,7 +554,7 @@ worry that config_items is freeside-specific and icky. { 'key' => 'alerter_template', 'section' => 'billing', - 'description' => 'Template file for billing method expiration alerts. See the billing documentation for details.', + 'description' => 'Template file for billing method expiration alerts. See the billing documentation for details.', 'type' => 'textarea', }, @@ -615,6 +622,13 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'business-onlinepayment-email_customer', + 'section' => 'billing', + 'description' => 'Controls the "email_customer" flag used by some Business::OnlinePayment processors to enable customer receipts.', + 'type' => 'checkbox', + }, + + { 'key' => 'countrydefault', 'section' => 'UI', 'description' => 'Default two-letter country code (if not supplied, the default is `US\')', @@ -717,6 +731,13 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'auto_router', + 'section' => '', + 'description' => 'Automatically choose the correct router/block based on supplied ip address when possible while provisioning broadband services', + 'type' => 'checkbox', + }, + + { 'key' => 'hidecancelledpackages', 'section' => 'UI', 'description' => 'Prevent cancelled packages from showing up in listings (though they will still be in the database)', @@ -742,19 +763,20 @@ worry that config_items is freeside-specific and icky. 'section' => 'required', 'description' => 'Return address on email invoices', 'type' => 'text', + 'per_agent' => 1, }, { 'key' => 'invoice_template', 'section' => 'billing', - '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 billing documentation 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 billing documentation for details.', 'type' => 'textarea', }, { 'key' => 'invoice_html', 'section' => 'billing', - 'description' => 'Optional HTML template for invoices. See the billing documentation for details.', + 'description' => 'Optional HTML template for invoices. See the billing documentation for details.', 'type' => 'textarea', }, @@ -783,7 +805,7 @@ worry that config_items is freeside-specific and icky. { 'key' => 'invoice_latex', 'section' => 'billing', - 'description' => 'Optional LaTeX template for typeset PostScript invoices. See the billing documentation for details.', + 'description' => 'Optional LaTeX template for typeset PostScript invoices. See the billing documentation for details.', 'type' => 'textarea', }, @@ -802,6 +824,13 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'invoice_latexcoupon', + 'section' => 'billing', + 'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.', + 'type' => 'textarea', + }, + + { 'key' => 'invoice_latexreturnaddress', 'section' => 'billing', 'description' => 'Return address for LaTeX typeset PostScript invoices.', @@ -835,13 +864,27 @@ worry that config_items is freeside-specific and icky. 'section' => 'billing', '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 30', 'Net 45', 'Net 60' ], + 'select_enum' => [ '', 'Payable upon receipt', 'Net 0', 'Net 10', 'Net 15', 'Net 20', 'Net 30', 'Net 45', 'Net 60' ], + }, + + { + 'key' => 'invoice_sections', + 'section' => 'billing', + 'description' => 'Split invoice into sections and label according to package class when enabled.', + 'type' => 'checkbox', + }, + + { + 'key' => 'separate_usage', + 'section' => 'billing', + 'description' => 'Split the rated call usage into a separate line from the recurring charges.', + 'type' => 'checkbox', }, { 'key' => 'payment_receipt_email', 'section' => 'billing', - 'description' => 'Template file for payment receipts. Payment receipts are sent to the customer email invoice destination(s) when a payment is received. See the Text::Template documentation for details on the template substitution language. The following variables are available: ', + 'description' => 'Template file for payment receipts. Payment receipts are sent to the customer email invoice destination(s) when a payment is received. See the Text::Template documentation for details on the template substitution language. The following variables are available: ', 'type' => [qw( checkbox textarea )], }, @@ -964,7 +1007,7 @@ worry that config_items is freeside-specific and icky. { 'key' => 'signupurl', 'section' => 'UI', - 'description' => 'if you are using customer-to-customer referrals, and you enter the URL of your signup server CGI, 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 signup server CGI, the customer view screen will display a customized link to the signup server with the appropriate customer as referral', 'type' => 'text', }, @@ -1229,7 +1272,7 @@ worry that config_items is freeside-specific and icky. { 'key' => 'signup_server-default_pkgpart', 'section' => '', - 'description' => 'Default pakcage for the signup server', + 'description' => 'Default package for the signup server', 'type' => 'select-sub', 'options_sub' => sub { require FS::Record; require FS::part_pkg; @@ -1250,6 +1293,45 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'signup_server-default_svcpart', + 'section' => '', + 'description' => 'Default svcpart for the signup server - only necessary for services that trigger special provisioning widgets (such as DID provisioning).', + 'type' => 'select-sub', + 'options_sub' => sub { require FS::Record; + require FS::part_svc; + map { $_->svcpart => $_->svc } + FS::Record::qsearch( 'part_svc', + { 'disabled' => ''} + ); + }, + 'option_sub' => sub { require FS::Record; + require FS::part_svc; + my $part_svc = FS::Record::qsearchs( + 'part_svc', { 'svcpart'=>shift } + ); + $part_svc ? $part_svc->svc : ''; + }, + }, + + { + 'key' => 'signup_server-service', + 'section' => '', + 'description' => 'Service for the signup server - "Account (svc_acct)" is the default setting, or "Phone number (svc_phone)" for ITSP signup', + 'type' => 'select', + 'select_hash' => [ + 'svc_acct' => 'Account (svc_acct)', + 'svc_phone' => 'Phone number (svc_phone)', + ], + }, + + { + 'key' => 'selfservice_server-base_url', + 'section' => '', + 'description' => 'Base URL for the self-service web interface - necessary for special provisioning widgets to find their way.', + 'type' => 'text', + }, + + { 'key' => 'show-msgcat-codes', 'section' => 'UI', 'description' => 'Show msgcat codes in error messages. Turn this option on before reporting errors to the mailing list.', @@ -1371,9 +1453,16 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'enable_taxproducts', + 'section' => 'billing', + 'description' => 'Enable per-package mapping to new style tax classes', + 'type' => 'checkbox', + }, + + { 'key' => 'welcome_email', 'section' => '', - 'description' => 'Template file for welcome email. Welcome emails are sent to the customer email invoice destination(s) each time a svc_acct record is created. See the Text::Template documentation for details on the template substitution language. The following variables are available', + 'description' => 'Template file for welcome email. Welcome emails are sent to the customer email invoice destination(s) each time a svc_acct record is created. See the Text::Template documentation for details on the template substitution language. The following variables are available', 'type' => 'textarea', 'per_agent' => 1, }, @@ -1406,14 +1495,14 @@ worry that config_items is freeside-specific and icky. { 'key' => 'welcome_letter', 'section' => '', - 'description' => 'Optional LaTex template file for a printed welcome letter. A welcome letter is printed the first time a cust_pkg record is created. See the Text::Template documentation and the billing documentation for details on the template substitution language. A variable exists for each fieldname in the customer record ($first, $last, etc). The following additional variables are available', + 'description' => 'Optional LaTex template file for a printed welcome letter. A welcome letter is printed the first time a cust_pkg record is created. See the Text::Template documentation and the billing documentation for details on the template substitution language. A variable exists for each fieldname in the customer record ($first, $last, etc). The following additional variables are available', 'type' => 'textarea', }, { 'key' => 'warning_email', 'section' => '', - 'description' => 'Template file for warning email. Warning emails are sent to the customer email invoice destination(s) each time a svc_acct record has its usage drop below a threshold or 0. See the Text::Template documentation for details on the template substitution language. The following variables are available', + 'description' => 'Template file for warning email. Warning emails are sent to the customer email invoice destination(s) each time a svc_acct record has its usage drop below a threshold or 0. See the Text::Template documentation for details on the template substitution language. The following variables are available', 'type' => 'textarea', }, @@ -1464,8 +1553,8 @@ worry that config_items is freeside-specific and icky. { 'key' => 'paymentforcedtobatch', - 'section' => 'UI', - 'description' => 'Causes per customer payment entry to be forced to a batch processor rather than performed realtime.', + '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.', 'type' => 'checkbox', }, @@ -1577,6 +1666,20 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'selfservice_server-phone_login', + 'section' => '', + 'description' => 'Allow login to self-service with phone number and PIN.', + 'type' => 'checkbox', + }, + + { + 'key' => 'selfservice_server-single_domain', + 'section' => '', + 'description' => 'If specified, only use this one domain for self-service access.', + 'type' => 'text', + }, + + { 'key' => 'card_refund-days', 'section' => 'billing', 'description' => 'After a payment, the number of days a refund link will be available for that payment. Defaults to 120.', @@ -1599,6 +1702,14 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'global_unique-phonenum', + 'section' => '', + 'description' => 'Global phone number uniqueness control: none (usual setting - check countrycode+phonenumun uniqueness per exports), or countrycode+phonenum (all countrycode+phonenum pairs are globally unique, regardless of exports). disabled turns off duplicate checking completely and is STRONGLY NOT RECOMMENDED unless you REALLY need to turn this off.', + 'type' => 'select', + 'select_enum' => [ 'none', 'countrycode+phonenum', 'disabled' ], + }, + + { 'key' => 'svc_external-skip_manual', 'section' => 'UI', 'description' => 'When provisioning svc_external services, skip manual entry of id and title fields in the UI. Usually used in conjunction with an export that populates these fields (i.e. artera_turbo).', @@ -1616,7 +1727,7 @@ worry that config_items is freeside-specific and icky. { 'key' => 'ticket_system', 'section' => '', - 'description' => 'Ticketing system integration. RT_Internal uses the built-in RT ticketing system (see the integrated ticketing installation instructions). RT_External accesses an external RT installation in a separate database (local or remote).', + 'description' => 'Ticketing system integration. RT_Internal uses the built-in RT ticketing system (see the integrated ticketing installation instructions). RT_External 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) ], @@ -1697,6 +1808,7 @@ worry that config_items is freeside-specific and icky. 'section' => 'required', 'description' => 'Your company name', 'type' => 'text', + 'per_agent' => 1, }, { @@ -1704,18 +1816,33 @@ worry that config_items is freeside-specific and icky. 'section' => 'required', 'description' => 'Your company address', 'type' => 'textarea', + 'per_agent' => 1, }, { 'key' => 'address2-search', 'section' => 'UI', - 'description' => 'Enable a "Unit" search box which searches the second address field', + 'description' => 'Enable a "Unit" search box which searches the second address field. Useful for multi-tenant applications. See also: cust_main-require_address2', + 'type' => 'checkbox', + }, + + { + 'key' => 'cust_main-require_address2', + 'section' => 'UI', + 'description' => 'Second address field is required (on service address only, if billing and service addresses differ). Also enables "Unit" labeling of address2 on customer view and edit pages. Useful for multi-tenant applications. See also: address2-search', + 'type' => 'checkbox', + }, + + { + 'key' => 'agent-ship_address', + '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', }, { 'key' => 'referral_credit', - 'section' => 'billing', - 'description' => "Enables one-time referral credits in the amount of one month referred customer's recurring fee (irregardless of frequency).", + 'section' => 'deprecated', + 'description' => "Used to enable one-time referral credits in the amount of one month referred customer's recurring fee (irregardless of frequency). Replace with a billing event on appropriate packages.", 'type' => 'checkbox', }, @@ -1728,12 +1855,63 @@ worry that config_items is freeside-specific and icky. { 'key' => 'hylafax', - 'section' => '', + 'section' => 'billing', 'description' => 'Options for a HylaFAX server to enable the FAX invoice destination. They should be in the form of a space separated list of arguments to the Fax::Hylafax::Client::sendfax subroutine. You probably shouldn\'t override things like \'docfile\'. *Note* Only supported when using typeset invoices (see the invoice_latex configuration option).', 'type' => [qw( checkbox textarea )], }, { + 'key' => 'cust_bill-ftpformat', + 'section' => 'billing', + 'description' => 'Enable FTP of raw invoice data - format.', + 'type' => 'select', + 'select_enum' => [ '', 'default', 'billco', ], + }, + + { + 'key' => 'cust_bill-ftpserver', + 'section' => 'billing', + 'description' => 'Enable FTP of raw invoice data - server.', + 'type' => 'text', + }, + + { + 'key' => 'cust_bill-ftpusername', + 'section' => 'billing', + 'description' => 'Enable FTP of raw invoice data - server.', + 'type' => 'text', + }, + + { + 'key' => 'cust_bill-ftppassword', + 'section' => 'billing', + 'description' => 'Enable FTP of raw invoice data - server.', + 'type' => 'text', + }, + + { + 'key' => 'cust_bill-ftpdir', + 'section' => 'billing', + 'description' => 'Enable FTP of raw invoice data - server.', + 'type' => 'text', + }, + + { + 'key' => 'cust_bill-spoolformat', + 'section' => 'billing', + 'description' => 'Enable spooling of raw invoice data - format.', + 'type' => 'select', + 'select_enum' => [ '', 'default', 'billco', ], + }, + + { + 'key' => 'cust_bill-spoolagent', + 'section' => 'billing', + 'description' => 'Enable per-agent spooling of raw invoice data.', + 'type' => 'checkbox', + }, + + { 'key' => 'svc_acct-usage_suspend', 'section' => 'billing', 'description' => 'Suspends the package an account belongs to when svc_acct.seconds or a bytecount is decremented to 0 or below (accounts with an empty seconds and up|down|totalbytes value are ignored). Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.', @@ -1805,6 +1983,13 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'voip-cust_cdr_squelch', + 'section' => '', + 'description' => 'Enable the per-customer option for not printing CDR on invoices.', + 'type' => 'checkbox', + }, + + { 'key' => 'svc_forward-arbitrary_dst', 'section' => '', 'description' => "Allow forwards to point to arbitrary strings that don't necessarily look like email addresses. Only used when using forwards for weird, non-email things.", @@ -1816,16 +2001,80 @@ worry that config_items is freeside-specific and icky. 'section' => 'billing', 'description' => 'By default, tax calculations are done based on the billing address. Enable this switch to calculate tax based on the shipping address instead. Note: Tax reports can take a long time when enabled.', 'type' => 'checkbox', + } +, + { + 'key' => 'tax-pkg_address', + 'section' => 'billing', + 'description' => 'By default, tax calculations are done based on the billing address. Enable this switch to calculate tax based on the package address instead (when present). Note: Tax reports can take a long time when enabled.', + 'type' => 'checkbox', }, { - 'key' => 'batch-enable', + 'key' => 'invoice-ship_address', + 'section' => 'billing', + 'description' => 'Enable this switch to include the ship address on the invoice.', + 'type' => 'checkbox', + }, + + { + 'key' => 'invoice-unitprice', 'section' => 'billing', + 'description' => 'This switch enables unit pricing on the invoice.', + 'type' => 'checkbox', + }, + + { + 'key' => 'postal_invoice-fee_pkgpart', + 'section' => 'billing', + 'description' => 'This allows selection of a package to insert on invoices for customers with postal invoices selected.', + 'type' => 'select-sub', + 'options_sub' => sub { require FS::Record; + require FS::part_pkg; + map { $_->pkgpart => $_->pkg } + FS::Record::qsearch('part_pkg', { disabled=>'' } ); + }, + 'option_sub' => sub { require FS::Record; + require FS::part_pkg; + my $part_pkg = FS::Record::qsearchs( + 'part_pkg', { 'pkgpart'=>shift } + ); + $part_pkg ? $part_pkg->pkg : ''; + }, + }, + + { + 'key' => 'postal_invoice-recurring_only', + 'section' => 'billing', + 'description' => 'The postal invoice fee is omitted on invoices without reucrring charges when this is set.', + 'type' => 'checkbox', + }, + + { + 'key' => 'batch-enable', + 'section' => 'deprecated', #make sure batch-enable_payby is set for + #everyone before removing 'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.', 'type' => 'checkbox', }, { + 'key' => 'batch-enable_payby', + 'section' => 'billing', + 'description' => 'Enable batch processing for the specified payment types.', + 'type' => 'selectmultiple', + 'select_enum' => [qw( CARD CHEK )], + }, + + { + 'key' => 'realtime-disable_payby', + 'section' => 'billing', + 'description' => 'Disable realtime processing for the specified payment types.', + 'type' => 'selectmultiple', + 'select_enum' => [qw( CARD CHEK )], + }, + + { 'key' => 'batch-default_format', 'section' => 'billing', 'description' => 'Default format for batches.', @@ -1991,7 +2240,7 @@ worry that config_items is freeside-specific and icky. { 'key' => 'impending_recur_template', 'section' => 'billing', - 'description' => 'Template file for alerts about looming first time recurrant billing. See the Text::Template documentation for details on the template substitition language. Also see packages with a flat price plan The following variables are available', + 'description' => 'Template file for alerts about looming first time recurrant billing. See the Text::Template documentation for details on the template substitition language. Also see packages with a flat price plan The following variables are available', #
  • $payby
  • $expdate most likely only confuse 'type' => 'textarea', }, @@ -2077,14 +2326,14 @@ worry that config_items is freeside-specific and icky. { 'key' => 'cust_main-require_phone', 'section' => '', - 'description' => 'Require daytime or night for all customer records.', + 'description' => 'Require daytime or night phone for all customer records.', 'type' => 'checkbox', }, { 'key' => 'cust_main-require_invoicing_list_email', 'section' => '', - 'description' => 'Require at least one invoicing email address for all customer records.', + 'description' => 'Email address field is required: require at least one invoicing email address for all customer records.', 'type' => 'checkbox', }, @@ -2095,6 +2344,272 @@ worry that config_items is freeside-specific and icky. 'type' => 'checkbox', }, + { + '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 : ''; + }, + }, + + { + '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 : ''; + }, + }, + + { + 'key' => 'signup_credit_type', + 'section' => 'billing', + '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 : ''; + }, + }, + + { + 'key' => 'cust_main-agent_custid-format', + 'section' => '', + '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', + ], + }, + + { + 'key' => 'card_masking_method', + 'section' => 'UI', + 'description' => 'Digits to display when masking credit cards. Note that the first six digits are necessary to canonically identify the credit card type (Visa/MC, Amex, Discover, Maestro, etc.) in all cases. The first four digits can identify the most common credit card types in most cases (Visa/MC, Amex, and Discover). The first two digits can distinguish between Visa/MC and Amex. Note: You should manually remove stored paymasks if you change this value on an existing database, to avoid problems using stored cards.', + 'type' => 'select', + 'select_hash' => [ + '' => '123456xxxxxx1234', + 'first6last2' => '123456xxxxxxxx12', + 'first4last4' => '1234xxxxxxxx1234', + 'first4last2' => '1234xxxxxxxxxx12', + 'first2last4' => '12xxxxxxxxxx1234', + 'first2last2' => '12xxxxxxxxxxxx12', + 'first0last4' => 'xxxxxxxxxxxx1234', + 'first0last2' => 'xxxxxxxxxxxxxx12', + ], + }, + + { + 'key' => 'disable_previous_balance', + 'section' => 'billing', + 'description' => 'Disable inclusion of previous balancem payment, and credit lines on invoices', + 'type' => 'checkbox', + }, + + { + 'key' => 'usps_webtools-userid', + 'section' => 'UI', + 'description' => 'Production UserID for USPS web tools. Enables USPS address standardization. See the USPS website, register and agree not to use the tools for batch purposes.', + 'type' => 'text', + }, + + { + 'key' => 'usps_webtools-password', + 'section' => 'UI', + 'description' => 'Production password for USPS web tools. Enables USPS address standardization. See USPS website, register and agree not to use the tools for batch purposes.', + 'type' => 'text', + }, + + { + 'key' => 'cust_main-auto_standardize_address', + 'section' => 'UI', + 'description' => 'When using USPS web tools, automatically standardize the address without asking.', + 'type' => 'checkbox', + }, + + { + 'key' => 'disable_acl_changes', + 'section' => '', + 'description' => 'Disable all ACL changes, for demos.', + 'type' => 'checkbox', + }, + + { + 'key' => 'cust_main-edit_agent_custid', + 'section' => 'UI', + 'description' => 'Enable editing of the agent_custid field.', + 'type' => 'checkbox', + }, + + { + 'key' => 'cust_main-default_agent_custid', + 'section' => 'UI', + 'description' => 'Display the agent_custid field instead of the custnum field.', + 'type' => 'checkbox', + }, + + { + 'key' => 'cust_main-auto_agent_custid', + 'section' => 'UI', + 'description' => 'Automatically assign an agent_custid - select format', + 'type' => 'select', + 'select_hash' => [ '' => 'No', + '1YMMXXXXXXXX' => '1YMMXXXXXXXX', + ], + }, + + { + 'key' => 'cust_main-default_areacode', + 'section' => 'UI', + 'description' => 'Default area code for customers.', + 'type' => 'text', + }, + + { + 'key' => 'mcp_svcpart', + 'section' => '', + 'description' => 'Master Control Program svcpart. Leave this blank.', + 'type' => 'text', + }, + + { + 'key' => 'cust_bill-max_same_services', + 'section' => 'billing', + 'description' => 'Maximum number of the same service to list individually on invoices before condensing to a single line listing the number of services. Defaults to 5.', + 'type' => 'text', + }, + + { + 'key' => 'suspend_email_admin', + 'section' => '', + 'description' => 'Destination admin email address to enable suspension notices', + 'type' => 'text', + }, + + { + 'key' => 'email_report-subject', + 'section' => '', + 'description' => 'Subject for reports emailed by freeside-fetch. Defaults to "Freeside report".', + 'type' => 'text', + }, + + { + 'key' => 'selfservice-head', + 'section' => '', + 'description' => 'HTML for the HEAD section of the self-service interface, typically used for LINK stylesheet tags', + 'type' => 'textarea', #htmlarea? + }, + + + { + 'key' => 'selfservice-body_header', + 'section' => '', + 'description' => 'HTML header for the self-service interface', + 'type' => 'textarea', #htmlarea? + }, + + { + 'key' => 'selfservice-body_footer', + 'section' => '', + 'description' => 'HTML header for the self-service interface', + 'type' => 'textarea', #htmlarea? + }, + + + { + 'key' => 'selfservice-body_bgcolor', + 'section' => '', + 'description' => 'HTML background color for the self-service interface, for example, #FFFFFF', + 'type' => 'text', + }, + + { + 'key' => 'selfservice-box_bgcolor', + 'section' => '', + 'description' => 'HTML color for self-service interface input boxes, for example, #C0C0C0"', + 'type' => 'text', + }, + + { + 'key' => 'signup-no_company', + 'section' => '', + 'description' => "Don't display a field for company name on signup.", + 'type' => 'checkbox', + }, + + { + 'key' => 'signup-recommend_email', + 'section' => '', + 'description' => 'Encourage the entry of an invoicing email address on signup.', + 'type' => 'checkbox', + }, + + { + 'key' => 'signup-recommend_daytime', + 'section' => '', + 'description' => 'Encourage the entry of a daytime phone number invoicing email address on signup.', + 'type' => 'checkbox', + }, + + { + 'key' => 'svc_phone-radius-default_password', + 'section' => '', + 'description' => 'Default password when exporting svc_phone records to RADIUS', + 'type' => 'text', + }, + + { + 'key' => 'svc_phone-allow_alpha_phonenum', + 'section' => '', + 'description' => 'Allow letters in phone numbers.', + 'type' => 'checkbox', + }, + + { + 'key' => 'default_phone_countrycode', + 'section' => '', + 'description' => 'Default countrcode', + 'type' => 'text', + }, + + { + 'key' => 'cdr-charged_party-accountcode', + 'section' => '', + 'description' => 'Set the charged_party field of CDRs to the accountcode.', + 'type' => 'checkbox', + }, + + ); 1;