X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=e7a9c160161de59eb5c92474564b57c86aa5e229;hb=5f0e4d1d57c18d5bb8a52de4f7d4f519db5327f0;hp=40fbaf6c504b2f4e4e3cc5700c6762c4a5886dd8;hpb=50f5d60aef5ee82be33c978db6424372bfd7995b;p=freeside.git diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 40fbaf6c5..e7a9c1601 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -76,11 +76,23 @@ sub base_dir { $1; } -=item config KEY [ AGENTNUM ] +=item conf KEY [ AGENTNUM [ NODEFAULT ] ] + +Returns the L record for the key and agent. + +=cut + +sub conf { + my $self = shift; + $self->_config(@_); +} + +=item config KEY [ AGENTNUM [ NODEFAULT ] ] Returns the configuration value or values (depending on context) for key. The optional agent number selects an agent specific value instead of the -global default if one is present. +global default if one is present. If NODEFAULT is true only the agent +specific value(s) is returned. =cut @@ -92,14 +104,13 @@ sub _usecompat { $compat->$method(@_); } -# needs a non _ name, called externally by config-view now (and elsewhere?) sub _config { - my($self,$name,$agentnum)=@_; + my($self,$name,$agentnum,$agentonly)=@_; my $hashref = { 'name' => $name }; $hashref->{agentnum} = $agentnum; local $FS::Record::conf = undef; # XXX evil hack prevents recursion my $cv = FS::Record::qsearchs('conf', $hashref); - if (!$cv && defined($agentnum) && $agentnum) { + if (!$agentonly && !$cv && defined($agentnum) && $agentnum) { $hashref->{agentnum} = ''; $cv = FS::Record::qsearchs('conf', $hashref); } @@ -110,12 +121,10 @@ sub config { my $self = shift; return $self->_usecompat('config', @_) if use_confcompat; - my($name, $agentnum)=@_; - - carp "FS::Conf->config($name, $agentnum) called" + carp "FS::Conf->config(". join(', ', @_). ") called" if $DEBUG > 1; - my $cv = $self->_config($name, $agentnum) or return; + my $cv = $self->_config(@_) or return; if ( wantarray ) { my $v = $cv->value; @@ -126,7 +135,7 @@ sub config { } } -=item config_binary KEY [ AGENTNUM ] +=item config_binary KEY [ AGENTNUM [ NODEFAULT ] ] Returns the exact scalar value for key. @@ -136,12 +145,11 @@ sub config_binary { my $self = shift; return $self->_usecompat('config_binary', @_) if use_confcompat; - my($name,$agentnum)=@_; - my $cv = $self->_config($name, $agentnum) or return; + my $cv = $self->_config(@_) or return; decode_base64($cv->value); } -=item exists KEY [ AGENTNUM ] +=item exists KEY [ AGENTNUM [ NODEFAULT ] ] Returns true if the specified key exists, even if the corresponding value is undefined. @@ -154,10 +162,10 @@ sub exists { my($name, $agentnum)=@_; - carp "FS::Conf->exists($name, $agentnum) called" + carp "FS::Conf->exists(". join(', ', @_). ") called" if $DEBUG > 1; - defined($self->_config($name, $agentnum)); + defined($self->_config(@_)); } =item config_orbase KEY SUFFIX @@ -620,6 +628,40 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'billco-url', + 'section' => 'billing', + 'description' => 'The url to use for performing uploads to the invoice mailing service.', + 'type' => 'text', + 'per_agent' => 1, + }, + + { + 'key' => 'billco-username', + 'section' => 'billing', + 'description' => 'The login name to use for uploads to the invoice mailing service.', + 'type' => 'text', + 'per_agent' => 1, + 'agentonly' => 1, + }, + + { + 'key' => 'billco-password', + 'section' => 'billing', + 'description' => 'The password to use for uploads to the invoice mailing service.', + 'type' => 'text', + 'per_agent' => 1, + 'agentonly' => 1, + }, + + { + 'key' => 'billco-clicode', + 'section' => 'billing', + 'description' => 'The clicode to use for uploads to the invoice mailing service.', + 'type' => 'text', + 'per_agent' => 1, + }, + + { 'key' => 'business-onlinepayment', 'section' => 'billing', 'description' => 'Business::OnlinePayment support, at least three lines: processor, login, and password. An optional fourth line specifies the action or actions (multiple actions are separated with `,\': for example: `Authorization Only, Post Authorization\'). Optional additional lines are passed to Business::OnlinePayment as %processor_options.', @@ -736,6 +778,20 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'disable_cust_attachment', + 'section' => '', + 'description' => 'Disable customer file attachments', + 'type' => 'checkbox', + }, + + { + 'key' => 'max_attachment_size', + 'section' => '', + 'description' => 'Maximum size for customer file attachments (leave blank for unlimited)', + 'type' => 'text', + }, + + { 'key' => 'disable_customer_referrals', 'section' => 'UI', 'description' => 'Disable new customer-to-customer referrals in the web interface', @@ -959,11 +1015,22 @@ worry that config_items is freeside-specific and icky. { '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 )], }, { + 'key' => 'payment_receipt-trigger', + 'section' => 'billing', + 'description' => 'When payment receipts are triggered. Defaults to when payment is made.', + 'type' => 'select', + 'select_hash' => [ + 'cust_pay' => 'When payment is made.', + 'cust_bill_pay_pkg' => 'When payment is applied.', + ], + }, + + { 'key' => 'lpr', 'section' => 'required', 'description' => 'Print command for paper invoices, for example `lpr -h\'', @@ -1385,22 +1452,23 @@ 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 : ''; - }, + 'description' => 'Default service definition for the signup server - only necessary for services that trigger special provisioning widgets (such as DID provisioning).', + 'type' => 'select-part_svc', + }, + + { + 'key' => 'signup_server-mac_addr_svcparts', + 'section' => '', + 'description' => 'Service definitions which can receive mac addresses (current mapped to username for svc_acct).', + 'type' => 'select-part_svc', + 'multiple' => 1, + }, + + { + 'key' => 'signup_server-nomadix', + 'section' => '', + 'description' => 'Signup page Nomadix integration', + 'type' => 'checkbox', }, { @@ -1799,7 +1867,8 @@ worry that config_items is freeside-specific and icky. 'key' => 'svc_www-usersvc_svcpart', 'section' => '', 'description' => 'Allowable service definition svcparts for virtual hosts, one per line.', - 'type' => 'textarea', + 'type' => 'select-part_svc', + 'multiple' => 1, }, { @@ -2319,6 +2388,13 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'batchconfig-paymentech', + 'section' => 'billing', + 'description' => 'Configuration for Chase Paymentech batching, four lines: 1. BIN, 2. Terminal ID, 3. Merchant ID, 4. Username', + 'type' => 'textarea', + }, + + { 'key' => 'payment_history-years', 'section' => 'UI', 'description' => 'Number of years of payment history to show by default. Currently defaults to 2.', @@ -2431,6 +2507,14 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'dashboard-install_welcome', + 'section' => 'UI', + 'description' => 'New install welcome screen.', + 'type' => 'select', + 'select_enum' => [ '', 'ITSP_fsinc_hosted', ], + }, + + { 'key' => 'dashboard-toplist', 'section' => 'UI', 'description' => 'List of items to display on the top of the front page', @@ -2679,7 +2763,7 @@ worry that config_items is freeside-specific and icky. 'section' => 'UI', 'description' => 'The year to use in census tract lookups', 'type' => 'select', - 'select_enum' => [ qw( 2008 2007 2006 ) ], + 'select_enum' => [ qw( 2009 2008 2007 2006 ) ], }, { @@ -2713,7 +2797,14 @@ worry that config_items is freeside-specific and icky. { 'key' => 'cust_main-default_agent_custid', 'section' => 'UI', - 'description' => 'Display the agent_custid field instead of the custnum field.', + 'description' => 'Display the agent_custid field when available instead of the custnum field.', + 'type' => 'checkbox', + }, + + { + 'key' => 'cust_bill-default_agent_invid', + 'section' => 'UI', + 'description' => 'Display the agent_invid field when available instead of the invnum field.', 'type' => 'checkbox', }, @@ -2738,7 +2829,7 @@ worry that config_items is freeside-specific and icky. 'key' => 'mcp_svcpart', 'section' => '', 'description' => 'Master Control Program svcpart. Leave this blank.', - 'type' => 'text', + 'type' => 'text', #select-part_svc }, { @@ -2922,6 +3013,20 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'sg-ping_username', + 'section' => '', + 'description' => "Don't use this.", + 'type' => 'text', + }, + + { + 'key' => 'sg-ping_password', + 'section' => '', + 'description' => "Don't use this.", + 'type' => 'text', + }, + + { '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.', @@ -3009,6 +3114,27 @@ worry that config_items is freeside-specific and icky. 'type' => 'checkbox', }, + { + 'key' => 'pkg-balances', + 'section' => 'billing', + 'description' => 'Enable experimental package balances. Not recommended for general use.', + 'type' => 'checkbox', + }, + + { + 'key' => 'cust_main-edit_signupdate', + 'section' => 'UI', + 'descritpion' => 'Enable manual editing of the signup date.', + 'type' => 'checkbox', + }, + + { + 'key' => 'svc_acct-disable_access_number', + 'section' => 'UI', + 'descritpion' => 'Disable access number selection.', + 'type' => 'checkbox', + }, + { key => "apacheroot", section => "deprecated", description => "DEPRECATED", type => "text" }, { key => "apachemachine", section => "deprecated", description => "DEPRECATED", type => "text" }, { key => "apachemachines", section => "deprecated", description => "DEPRECATED", type => "text" },