X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=38a68944851f0974dfdf54aeed81e5c0042c2356;hb=81a993ab0d0f15d896144f60cbf9477fdf693f76;hp=efdad430a9f564b2ef10810e95359fd0fbd575ab;hpb=8cbe016ac2c28cd209c48f053f361573368e7988;p=freeside.git diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index efdad430a..38a689448 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) @@ -1770,6 +1786,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 +1998,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.', @@ -3067,6 +3092,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.', @@ -3532,6 +3568,16 @@ 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', + ], + }, + + { '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... @@ -3544,6 +3590,7 @@ and customer address. Include units.', 'section' => '', 'description' => 'Require daytime or night phone for all customer records.', 'type' => 'checkbox', + 'per_agent' => 1, }, { @@ -3551,6 +3598,7 @@ 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, }, { @@ -3564,77 +3612,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 +3677,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 +3741,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() ], }, { @@ -3966,6 +3981,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', @@ -4147,7 +4170,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', @@ -4228,6 +4258,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.', @@ -4654,6 +4691,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', @@ -4698,13 +4742,6 @@ and customer address. Include units.', }, { - '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', 'description' => 'An alternate ordering of fields for the New Customer and Edit Customer screens.', @@ -4735,15 +4772,48 @@ 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.', - 'type' => 'select-sub', + '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, - 'options_sub' => sub { map { $_ => '' } - grep { $_ ne 'en_US' } FS::Locales::locales; - }, - 'option_sub' => sub { ''; }, + 'select_enum' => [ grep { $_ ne 'en_US' } FS::Locales::locales ], + }, + + { + 'key' => 'svc_acct-tower_sector', + 'section' => '', + 'description' => 'Track tower and sector for svc_acct (account) services.', + 'type' => 'checkbox', + }, + + { + 'key' => 'cdr-prerate', + 'section' => 'telephony', + 'description' => 'Experimental feature to rate CDRs immediately, rather than waiting until invoice generation time. Can reduce invoice generation time when processing lots of CDRs. Currently works with "VoIP/telco CDR rating (standard)" price plans using "Phone numbers (svc_phone.phonenum)" CDR service matching, without any included minutes.', + 'type' => 'checkbox', }, + { + 'key' => 'cdr-prerate-cdrtypenums', + 'section' => 'telephony', + 'description' => 'When using cdr-prerate to rate CDRs immediately, limit processing to these CDR types.', + 'type' => 'select-sub', + 'multiple' => 1, + 'options_sub' => sub { require FS::Record; + require FS::cdr_type; + map { $_->cdrtypenum => $_->cdrtypename } + FS::Record::qsearch( 'cdr_type', + {} #{ 'disabled' => '' } + ); + }, + 'option_sub' => sub { require FS::Record; + require FS::cdr_type; + my $cdr_type = FS::Record::qsearchs( + 'cdr_type', { 'cdrtypenum'=>shift } ); + $cdr_type ? $cdr_type->cdrtypename : ''; + }, + }, + + { key => "apacheroot", section => "deprecated", description => "DEPRECATED", type => "text" }, { key => "apachemachine", section => "deprecated", description => "DEPRECATED", type => "text" }, { key => "apachemachines", section => "deprecated", description => "DEPRECATED", type => "text" },