X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=1506dde775b06e9874f652f40fde93cb06a1a869;hb=c545a57d21341c49674defed65a4243f07b5ebaf;hp=fc67c35aa484ef889faa5c0a8268a591a8ce7d45;hpb=931aa447df899ead7e5dd6ded2243d5288f8df6f;p=freeside.git diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index fc67c35aa..1506dde77 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(@_); @@ -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. @@ -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 @@ -809,6 +816,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.', @@ -842,13 +856,20 @@ 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' => '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 )], }, @@ -1378,9 +1399,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, }, @@ -1413,14 +1441,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', }, @@ -1584,6 +1612,13 @@ 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' => '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.', @@ -1833,6 +1868,20 @@ worry that config_items is freeside-specific and icky. }, { + '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' => 'batch-enable', 'section' => 'billing', 'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.', @@ -2005,7 +2054,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', }, @@ -2177,6 +2226,58 @@ worry that config_items is freeside-specific and icky. ], }, + { + '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.', + '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', + }, + ); 1;