X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=0c9dd657765b2985763f6109b5b7c84bf33951c3;hp=4def46260438d44bc62826be3fb5bc98b161f060;hb=84cb979c86a35805cfc6c4530ad4505243b7cfd0;hpb=a4b8ce8cd1d309de00c64f38049a8dda38798046 diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 4def46260..0c9dd6577 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -8,6 +8,7 @@ use MIME::Base64; use FS::ConfItem; use FS::ConfDefaults; use FS::Conf_compat17; +use FS::payby; use FS::conf; use FS::Record qw(qsearch qsearchs); use FS::UID qw(dbh datasrc use_confcompat); @@ -334,7 +335,7 @@ sub import_config_item { warn "Inserting $key\n" if $DEBUG; local $/; my $value = readline(new IO::File "$dir/$key"); - if ($item->type eq 'binary') { + if ($item->type =~ /^(binary|image)$/ ) { $self->set_binary($key, $value); }else{ $self->set($key, $value); @@ -363,7 +364,8 @@ sub verify_config_item { $error .= "$key fails existential comparison; " if $self->exists($key) xor $compat->exists($key); - unless ($type eq 'binary') { + if ( $type !~ /^(binary|image)$/ ) { + { no warnings; $error .= "$key fails scalar comparison; " @@ -380,22 +382,24 @@ sub verify_config_item { $error .= "$key fails list comparison; " unless $r; } - } - if ($type eq 'binary') { + } else { + $error .= "$key fails binary comparison; " unless scalar($self->config_binary($key)) eq scalar($compat->config_binary($key)); - } - if ($error =~ /existential comparison/ && $item->section eq 'deprecated') { - my $proto; - for ( @config_items ) { $proto = $_; last if $proto->key eq $key; } - unless ($proto->key eq $key) { - warn "removed config item $error\n" if $DEBUG; - $error = ''; - } } +#remove deprecated config on our own terms, not freeside-upgrade's +# if ($error =~ /existential comparison/ && $item->section eq 'deprecated') { +# my $proto; +# for ( @config_items ) { $proto = $_; last if $proto->key eq $key; } +# unless ($proto->key eq $key) { +# warn "removed config item $error\n" if $DEBUG; +# $error = ''; +# } +# } + $error; } @@ -479,7 +483,7 @@ sub config_items { =item init-config DIR -Imports the non-deprecated configuration items from DIR (1.7 compatible) +Imports the configuration items from DIR (1.7 compatible) to conf records in the database. =cut @@ -569,8 +573,11 @@ worry that config_items is freeside-specific and icky. { 'key' => 'apacheip', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add an apache export instead. Used to be the current IP address to assign to new virtual hosts', + #not actually deprecated yet + #'section' => 'deprecated', + #'description' => 'DEPRECATED, add an apache export instead. Used to be the current IP address to assign to new virtual hosts', + 'section' => '', + 'description' => 'IP address to assign to new virtual hosts', 'type' => 'text', }, @@ -617,6 +624,17 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'business-onlinepayment-namespace', + 'section' => 'billing', + 'description' => 'Specifies which perl module namespace (which group of collection routines) is used by default.', + 'type' => 'select', + 'select_hash' => [ + 'Business::OnlinePayment' => 'Direct API (Business::OnlinePayment)', + 'Business::OnlineThirdPartyPayment' => 'Web API (Business::ThirdPartyPayment)', + ], + }, + + { 'key' => 'business-onlinepayment-description', 'section' => 'billing', 'description' => 'String passed as the description field to Business::OnlinePayment. Evaluated as a double-quoted perl string, with the following variables available: $agent (the agent name), and $pkgs (a comma-separated list of packages for which these charges apply)', @@ -671,8 +689,11 @@ worry that config_items is freeside-specific and icky. { 'key' => 'deletecredits', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, now controlled by ACLs. Used to enable deletion of unclosed credits. Be very careful! Only delete credits that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a credit is deleted.', + #not actually deprecated yet + #'section' => 'deprecated', + #'description' => 'DEPRECATED, now controlled by ACLs. Used to enable deletion of unclosed credits. Be very careful! Only delete credits that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a credit is deleted.', + 'section' => '', + 'description' => 'One or more comma-separated email addresses to be notified when a credit is deleted.', 'type' => [qw( checkbox text )], }, @@ -803,6 +824,7 @@ worry that config_items is freeside-specific and icky. 'section' => 'billing', 'description' => 'Notes section for HTML invoices. Defaults to the same data in invoice_latexnotes if not specified.', 'type' => 'textarea', + 'per_agent' => 1, }, { @@ -810,6 +832,7 @@ worry that config_items is freeside-specific and icky. 'section' => 'billing', 'description' => 'Footer for HTML invoices. Defaults to the same data in invoice_latexfooter if not specified.', 'type' => 'textarea', + 'per_agent' => 1, }, { @@ -831,6 +854,7 @@ worry that config_items is freeside-specific and icky. 'section' => 'billing', 'description' => 'Notes section for LaTeX typeset PostScript invoices.', 'type' => 'textarea', + 'per_agent' => 1, }, { @@ -838,6 +862,7 @@ worry that config_items is freeside-specific and icky. 'section' => 'billing', 'description' => 'Footer for LaTeX typeset PostScript invoices.', 'type' => 'textarea', + 'per_agent' => 1, }, { @@ -845,6 +870,7 @@ worry that config_items is freeside-specific and icky. 'section' => 'billing', 'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.', 'type' => 'textarea', + 'per_agent' => 1, }, { @@ -859,6 +885,7 @@ worry that config_items is freeside-specific and icky. 'section' => 'billing', 'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.', 'type' => 'textarea', + 'per_agent' => 1, }, { @@ -1168,6 +1195,13 @@ worry that config_items is freeside-specific and icky. 'type' => 'checkbox', }, + { + 'key' => 'username-colon', + 'section' => 'username', + 'description' => 'Allow the colon character (:) in usernames.', + 'type' => 'checkbox', + }, + { 'key' => 'safe-part_bill_event', 'section' => 'UI', @@ -2171,6 +2205,13 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'cust_main-packages-years', + 'section' => 'UI', + 'description' => 'Number of years to show old (cancelled and one-time charge) packages by default. Currently defaults to 2.', + 'type' => 'text', + }, + + { 'key' => 'cust_main-use_comments', 'section' => 'UI', 'description' => 'Display free form comments on the customer edit screen. Useful as a scratch pad.', @@ -2289,7 +2330,7 @@ worry that config_items is freeside-specific and icky. 'key' => 'logo.eps', 'section' => 'billing', #? 'description' => 'Company logo for printed and PDF invoices, in EPS format.', - 'type' => 'binary', + 'type' => 'image', 'per_agent' => 1, #XXX as above, kinda }, @@ -2471,6 +2512,13 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'previous_balance-summary_only', + 'section' => 'billing', + 'description' => 'Only show a single line summarizing the total previous balance rather than one line per invoice.', + '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.', @@ -2644,12 +2692,47 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'cdr-charged_party_rewrite', + 'section' => '', + 'description' => 'Do charged party rewriting in the freeside-cdrrewrited daemon; useful if CDRs are being dropped off directly in the database and require special charged_party processing such as cdr-charged_party-accountcode.', + 'type' => 'checkbox', + }, + + { 'key' => 'cdr-taqua-da_rewrite', 'section' => '', 'description' => 'For the Taqua CDR format, a comma-separated list of directory assistance 800 numbers. Any CDRs with these numbers as "BilledNumber" will be rewritten to the "CallingPartyNumber" (and CallType "12") on import.', 'type' => 'text', }, + { + '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.', + 'type' => 'checkbox', + }, + + { + 'key' => 'cdr-asterisk_forward_rewrite', + 'section' => '', + 'description' => 'Enable special processing for CDRs representing forwarded calls: For CDRs that have a dcontext that starts with "Local/" but does not match dst, set charged_party to dst, parse a new dst from dstchannel, and set amaflags to "2" ("BILL"/"BILLING").', + 'type' => 'checkbox', + }, + + { + 'key' => 'sg-multicustomer_hack', + 'section' => '', + 'description' => "Don't use this.", + 'type' => 'checkbox', + }, + + { + 'key' => 'disable-cust-pkg_class', + 'section' => 'UI', + 'description' => 'Disable the two-step dropdown for selecting package class and package, and return to the classic single dropdown.', + 'type' => 'checkbox', + }, + ); 1;