X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=4090a900187a864ea0d48d6bed8b3ae804404100;hb=a8c51f52a9a13c13b17c00e8bd8bcbafd2bc6424;hp=5681dde38844cdc079437302441af189f6b6c47e;hpb=030bef17868168b05a67d9f5866b55da1bb9439c;p=freeside.git
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 5681dde38..4090a9001 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -95,6 +95,21 @@ sub config {
}
}
+=item config_binary KEY
+
+Returns the exact scalar value for key.
+
+=cut
+
+sub config_binary {
+ my($self,$file)=@_;
+ my($dir)=$self->dir;
+ my $fh = new IO::File "<$dir/$file" or return;
+ local $/;
+ my $content = <$fh>;
+ $content;
+}
+
=item exists KEY
Returns true if the specified key exists, even if the corresponding value
@@ -108,6 +123,22 @@ sub exists {
-e "$dir/$file";
}
+=item config_orbase KEY SUFFIX
+
+Returns the configuration value or values (depending on context) for
+KEY_SUFFIX, if it exists, otherwise for KEY
+
+=cut
+
+sub config_orbase {
+ my( $self, $file, $suffix ) = @_;
+ if ( $self->exists("${file}_$suffix") ) {
+ $self->config("${file}_$suffix");
+ } else {
+ $self->config($file);
+ }
+}
+
=item touch KEY
Creates the specified configuration key if it does not exist.
@@ -174,7 +205,7 @@ sub config_items {
my $self = shift;
#quelle kludge
@config_items,
- map {
+ ( map {
my $basename = basename($_);
$basename =~ /^(.*)$/;
$basename = $1;
@@ -185,7 +216,56 @@ sub config_items {
'type' => 'textarea',
}
} glob($self->dir. '/invoice_template_*')
- ;
+ ),
+ ( map {
+ my $basename = basename($_);
+ $basename =~ /^(.*)$/;
+ $basename = $1;
+ new FS::ConfItem {
+ 'key' => $basename,
+ 'section' => 'billing',
+ 'description' => 'Alternate HTML template for invoices. See the billing documentation for details.',
+ 'type' => 'textarea',
+ }
+ } glob($self->dir. '/invoice_html_*')
+ ),
+ ( map {
+ my $basename = basename($_);
+ $basename =~ /^(.*)$/;
+ $basename = $1;
+ ($latexname = $basename ) =~ s/latex/html/;
+ new FS::ConfItem {
+ 'key' => $basename,
+ 'section' => 'billing',
+ 'description' => "Alternate Notes section for HTML invoices. Defaults to the same data in $latexname if not specified.",
+ 'type' => 'textarea',
+ }
+ } glob($self->dir. '/invoice_htmlnotes_*')
+ ),
+ ( map {
+ my $basename = basename($_);
+ $basename =~ /^(.*)$/;
+ $basename = $1;
+ new FS::ConfItem {
+ 'key' => $basename,
+ 'section' => 'billing',
+ 'description' => 'Alternate LaTeX template for invoices. See the billing documentation for details.',
+ 'type' => 'textarea',
+ }
+ } glob($self->dir. '/invoice_latex_*')
+ ),
+ ( map {
+ my $basename = basename($_);
+ $basename =~ /^(.*)$/;
+ $basename = $1;
+ new FS::ConfItem {
+ 'key' => $basename,
+ 'section' => 'billing',
+ 'description' => 'Alternate Notes section for LaTeX typeset PostScript invoices. See the billing documentation for details.',
+ 'type' => 'textarea',
+ }
+ } glob($self->dir. '/invoice_latexnotes_*')
+ );
}
=back
@@ -228,8 +308,8 @@ httemplate/docs/config.html
{
'key' => 'apacheip',
- 'section' => 'apache',
- 'description' => 'The current IP address to assign to new virtual hosts',
+ 'section' => 'deprecated',
+ 'description' => 'DEPRECATED, add an apache export instead. Used to be the current IP address to assign to new virtual hosts',
'type' => 'text',
},
@@ -242,8 +322,8 @@ httemplate/docs/config.html
{
'key' => 'apachemachines',
- 'section' => 'apache',
- 'description' => 'Your Apache machines, one per line. This enables export of `/etc/apache/vhosts.conf\', which can be included in your Apache configuration via the Include directive.',
+ 'section' => 'deprecated',
+ 'description' => 'DEPRECATED, add an apache export instead. Used to be Apache machines, one per line. This enables export of `/etc/apache/vhosts.conf\', which can be included in your Apache configuration via the Include directive.',
'type' => 'textarea',
},
@@ -261,6 +341,34 @@ httemplate/docs/config.html
'type' => 'textarea',
},
+ {
+ 'key' => 'encryption',
+ 'section' => 'billing',
+ 'description' => 'Enable encryption of credit cards.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'encryptionmodule',
+ 'section' => 'billing',
+ 'description' => 'Use which module for encryption?',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'encryptionpublickey',
+ 'section' => 'billing',
+ 'description' => 'Your RSA Public Key - Required if Encryption is turned on.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'encryptionprivatekey',
+ 'section' => 'billing',
+ 'description' => 'Your RSA Private Key - Including this will enable the "Bill Now" feature. However if the system is compromised, a hacker can use this key to decode the stored credit card information. This is generally not a good idea.',
+ 'type' => 'textarea',
+ },
+
{
'key' => 'business-onlinepayment',
'section' => 'billing',
@@ -278,7 +386,14 @@ httemplate/docs/config.html
{
'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 to which the invoiced being charged applies)',
+ '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)',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'business-onlinepayment-email-override',
+ 'section' => 'billing',
+ 'description' => 'Email address used instead of customer email address when submitting a BOP transaction.',
'type' => 'text',
},
@@ -320,7 +435,14 @@ httemplate/docs/config.html
{
'key' => 'deletepayments',
'section' => 'UI',
- 'description' => 'Enable deletion of unclosed payments. Be very careful! Only delete payments that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.',
+ 'description' => 'Enable deletion of unclosed payments. Be very careful! Only delete payments that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.',
+ 'type' => [qw( checkbox text )],
+ },
+
+ {
+ 'key' => 'deletecredits',
+ 'section' => 'UI',
+ 'description' => '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.',
'type' => [qw( checkbox text )],
},
@@ -331,6 +453,13 @@ httemplate/docs/config.html
'type' => 'checkbox',
},
+ {
+ 'key' => 'unapplycredits',
+ 'section' => 'UI',
+ 'description' => 'Enable "unapplication" of unclosed credits.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'dirhash',
'section' => 'shell',
@@ -374,16 +503,16 @@ httemplate/docs/config.html
},
{
- 'key' => 'excludeaddr',
- 'section' => 'deprecated',
- 'description' => 'Addresses to exclude from assignment, one per line.',
+ 'key' => 'exclude_ip_addr',
+ 'section' => '',
+ 'description' => 'Exclude these from the list of available broadband service IP addresses. (One per line)',
'type' => 'textarea',
},
{
'key' => 'erpcdmachines',
- 'section' => '',
- 'description' => 'Your ERPCD authenticaion machines, one per line. This enables export of `/usr/annex/acp_passwd\' and `/usr/annex/acp_dialup\'',
+ 'section' => 'deprecated',
+ 'description' => 'DEPRECATED, ERPCD is no longer supported. Used to be ERPCD authenticaion machines, one per line. This enables export of `/usr/annex/acp_passwd\' and `/usr/annex/acp_dialup\'',
'type' => 'textarea',
},
@@ -418,21 +547,21 @@ httemplate/docs/config.html
{
'key' => 'icradius_mysqldest',
'section' => 'deprecated',
- 'description' => 'DEPRECATED, add an sqlradius https://billing.crosswind.net/freeside/browse/part_export.cgi">export instead. Used to be the destination directory for the MySQL databases, on the ICRADIUS/FreeRADIUS machines. Defaults to "/usr/local/var/".',
+ 'description' => 'DEPRECATED, add an sqlradius export instead. Used to be the destination directory for the MySQL databases, on the ICRADIUS/FreeRADIUS machines. Defaults to "/usr/local/var/".',
'type' => 'text',
},
{
'key' => 'icradius_mysqlsource',
'section' => 'deprecated',
- 'description' => 'DEPRECATED, add an sqlradius https://billing.crosswind.net/freeside/browse/part_export.cgi">export instead. Used to be the source directory for for the MySQL radcheck table files, on the Freeside machine. Defaults to "/usr/local/var/freeside".',
+ 'description' => 'DEPRECATED, add an sqlradius export instead. Used to be the source directory for for the MySQL radcheck table files, on the Freeside machine. Defaults to "/usr/local/var/freeside".',
'type' => 'text',
},
{
'key' => 'icradius_secrets',
'section' => 'deprecated',
- 'description' => 'DEPRECATED, add an sqlradius https://billing.crosswind.net/freeside/browse/part_export.cgi">export instead. This option used to specify a database for ICRADIUS/FreeRADIUS export. Three lines: DBI data source, username and password.',
+ 'description' => 'DEPRECATED, add an sqlradius export instead. This option used to specify a database for ICRADIUS/FreeRADIUS export. Three lines: DBI data source, username and password.',
'type' => 'textarea',
},
@@ -450,6 +579,107 @@ httemplate/docs/config.html
'type' => 'textarea',
},
+ {
+ 'key' => 'invoice_html',
+ 'section' => 'billing',
+ 'description' => 'Optional HTML template for invoices. See the billing documentation for details.',
+
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_htmlnotes',
+ 'section' => 'billing',
+ 'description' => 'Notes section for HTML invoices. Defaults to the same data in invoice_latexnotes if not specified.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_htmlfooter',
+ 'section' => 'billing',
+ 'description' => 'Footer for HTML invoices. Defaults to the same data in invoice_latexfooter if not specified.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_htmlreturnaddress',
+ 'section' => 'billing',
+ 'description' => 'Return address for HTML invoices. Defaults to the same data in invoice_latexreturnaddress if not specified.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_latex',
+ 'section' => 'billing',
+ 'description' => 'Optional LaTeX template for typeset PostScript invoices. See the billing documentation for details.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_latexnotes',
+ 'section' => 'billing',
+ 'description' => 'Notes section for LaTeX typeset PostScript invoices.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_latexfooter',
+ 'section' => 'billing',
+ 'description' => 'Footer for LaTeX typeset PostScript invoices.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_latexreturnaddress',
+ 'section' => 'billing',
+ 'description' => 'Return address for LaTeX typeset PostScript invoices.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_latexsmallfooter',
+ 'section' => 'billing',
+ 'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'invoice_email_pdf',
+ 'section' => 'billing',
+ 'description' => 'Send PDF invoice as an attachment to emailed invoices. By default, includes the plain text invoice as the email body, unless invoice_email_pdf_note is set.',
+ 'type' => 'checkbox'
+ },
+
+ {
+ 'key' => 'invoice_email_pdf_note',
+ 'section' => 'billing',
+ 'description' => 'If defined, this text will replace the default plain text invoice as the body of emailed PDF invoices.',
+ 'type' => 'textarea'
+ },
+
+
+ {
+ 'key' => 'invoice_default_terms',
+ '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' ],
+ },
+
+ {
+ 'key' => 'invoice_send_receipts',
+ 'section' => 'deprecated',
+ 'description' => 'DEPRECATED, this used to send an invoice copy on payments and credits. See the payment_receipt_email and XXXX instead.',
+ '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:
$date
$name
$paynum
- Freeside payment number $paid
- Amount of payment $payby
- Payment type (Card, Check, Electronic check, etc.) $payinfo
- Masked credit card number or check number $balance
- New balancepoptoaster.domain.tld /home/vpopmail 508 508
Note: vpopuid and vpopgid are values taken from the vpopmail machine\'s /etc/passwd',
+ 'description' => 'DEPRECATED, add a vpopmail export instead. This option used to contain your vpopmail pop toasters, one per line. Each line is of the form "machinename vpopdir vpopuid vpopgid". For example: poptoaster.domain.tld /home/vpopmail 508 508
Note: vpopuid and vpopgid are values taken from the vpopmail machine\'s /etc/passwd',
'type' => 'textarea',
},
@@ -831,8 +1082,8 @@ httemplate/docs/config.html
{
'key' => 'safe-part_pkg',
- 'section' => 'UI',
- 'description' => 'Validates package definition setup and recur expressions against a preset list. Useful for webdemos, annoying to powerusers.',
+ 'section' => 'deprecated',
+ 'description' => 'DEPRECATED, obsolete. Used to validate package definition setup and recur expressions against a preset list. Useful for webdemos, annoying to powerusers.',
'type' => 'checkbox',
},
@@ -864,6 +1115,13 @@ httemplate/docs/config.html
'type' => 'checkbox',
},
+ {
+ 'key' => 'legacy_link-steal',
+ 'section' => 'UI',
+ 'description' => 'Allow "stealing" an already-audited service from one customer (or package) to another using the link function.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'queue_dangerous_controls',
'section' => 'UI',
@@ -888,15 +1146,15 @@ httemplate/docs/config.html
{
'key' => 'selfservice_server-quiet',
- 'section' => '',
- 'description' => 'Disable decline and cancel emails generated by transactions initiated by the selfservice server. Not recommended, unless the customer will get instant feedback from a customer service UI, and receiving an email would be confusing/overkill.',
+ 'section' => 'deprecated',
+ 'description' => 'DEPRECATED, the self-service server no longer sends superfluous decline and cancel emails. Used to disable decline and cancel emails generated by transactions initiated by the selfservice server.',
'type' => 'checkbox',
},
{
'key' => 'signup_server-quiet',
- 'section' => '',
- 'description' => 'Disable decline and cancel emails generated by transactions initiated by the signup server. Not recommended, unless the customer will get instant feedback from a customer service UI, and receiving an email would be confusing/overkill. Does not disable welcome emails.',
+ 'section' => 'deprecated',
+ 'description' => 'DEPRECATED, the signup server is now part of the self-service server and no longer sends superfluous decline and cancel emails. Used to disable decline and cancel emails generated by transactions initiated by the signup server. Does not disable welcome emails.',
'type' => 'checkbox',
},
@@ -910,11 +1168,24 @@ httemplate/docs/config.html
{
'key' => 'signup_server-email',
+ 'section' => 'deprecated',
+ 'description' => 'DEPRECATED, this feature is no longer available. See the ***fill me in*** report instead. Used to contain a comma-separated list of email addresses to receive notification of signups via the signup server.',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'signup_server-default_agentnum',
'section' => '',
- 'description' => 'Comma-separated list of email addresses to receive notification of signups via the signup server.',
+ 'description' => 'Default agentnum for the signup server',
'type' => 'text',
},
+ {
+ 'key' => 'signup_server-default_refnum',
+ 'section' => '',
+ 'description' => 'Default advertising source number for the signup server',
+ 'type' => 'text',
+ },
{
'key' => 'show-msgcat-codes',
@@ -926,7 +1197,14 @@ httemplate/docs/config.html
{
'key' => 'signup_server-realtime',
'section' => '',
- 'description' => 'Run billing for signup server signups immediately, and suspend accounts which subsequently have a balance.',
+ 'description' => 'Run billing for signup server signups immediately, and do not provision accounts which subsequently have a balance.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'backend-realtime',
+ 'section' => '',
+ 'description' => 'Run billing for backend signups immediately.',
'type' => 'checkbox',
},
@@ -944,6 +1222,13 @@ httemplate/docs/config.html
'type' => 'checkbox',
},
+ {
+ 'key' => 'emaildecline-exclude',
+ 'section' => 'billing',
+ 'description' => 'List of error messages that should not trigger email decline notices, one per line.',
+ 'type' => 'textarea',
+ },
+
{
'key' => 'cancelmessage',
'section' => 'billing',
@@ -979,10 +1264,17 @@ httemplate/docs/config.html
'type' => 'checkbox',
},
+ {
+ 'key' => 'require_taxclasses',
+ 'section' => 'billing',
+ 'description' => 'Require a taxclass to be entered for every package',
+ '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: $username
, $password
, $first
, $last
and $pkg
.',
+ '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$username
$password
$first
$last
$pkg
DBI:Pg:user=rt_user;password=rt_word;host=rt.example.com;dbname=rt
',
+ 'type' => 'text',
+
+ },
+
+ {
+ 'key' => 'ticket_system-rt_external_url',
+ 'section' => '',
+ 'description' => 'With external RT integration, the URL for the external RT installation, for example, https://rt.example.com/rt
',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'company_name',
+ 'section' => 'required',
+ 'description' => 'Your company name',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'echeck-void',
+ 'section' => 'billing',
+ 'description' => 'Enable local-only voiding of echeck payments in addition to refunds against the payment gateway',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cc-void',
+ 'section' => 'billing',
+ 'description' => 'Enable local-only voiding of credit card payments in addition to refunds against the payment gateway',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'address2-search',
+ 'section' => 'UI',
+ 'description' => 'Enable a "Unit" search box which searches the second address field',
+ '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).",
+ 'type' => 'checkbox',
+ },
+
+ { 'key' => 'selfservice_server-cache_module',
+ 'section' => '',
+ 'description' => 'Module used to store self-service session information. All modules handle any number of self-service servers. Cache::SharedMemoryCache is appropriate for a single database / single Freeside server. Cache::FileCache is useful for multiple databases on a single server, or when IPC::ShareLite is not available (i.e. FreeBSD).', # _Database stores session information in the database and is appropriate for multiple Freeside servers, but may be slower.',
+ 'type' => 'select',
+ 'select_enum' => [ 'Cache::SharedMemoryCache', 'Cache::FileCache', ], # '_Database' ],
+ },
+
+ {
+ 'key' => 'hylafax',
+ 'section' => '',
+ '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' => 'svc_acct-usage_suspend',
+ 'section' => 'billing',
+ 'description' => 'Suspends the package an account belongs to when svc_acct.seconds is decremented to 0 or below (accounts with an empty seconds value are ignored). Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'svc_acct-usage_unsuspend',
+ 'section' => 'billing',
+ 'description' => 'Unuspends the package an account belongs to when svc_acct.seconds is incremented from 0 or below to a positive value (accounts with an empty seconds value are ignored). Typically used in conjunction with prepaid packages and freeside-sqlradius-radacctd.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'cust-fields',
+ 'section' => 'UI',
+ 'description' => 'Which customer fields to display on reports',
+ 'type' => 'select',
+ 'select_enum' => [
+ 'Customer: Last, First or Company (Last, First)',
+ 'Cust# | Customer: custnum | Last, First or Company (Last, First)',
+ 'Name | Company: Last, First | Company',
+ 'Cust# | Name | Company: custnum | Last, First | Company',
+ '(bill) Customer | (service) Customer: Last, First or Company (Last, First) | (same for service address if present)',
+ 'Cust# | (bill) Customer | (service) Customer: custnum | Last, First or Company (Last, First) | (same for service address if present)',
+ '(bill) Name | (bill) Company | (service) Name | (service) Company: Last, First | Company | (same for service address if present)',
+ 'Cust# | (bill) Name | (bill) Company | (service) Name | (service) Company: custnum | Last, First | Company | (same for service address if present)',
+ ],
+ },
+
+ {
+ 'key' => 'cust_pkg-display_times',
+ 'section' => 'UI',
+ 'description' => 'Display full timestamps (not just dates) for customer packages. Useful if you are doing real-time things like hourly prepaid.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'svc_acct-edit_uid',
+ 'section' => 'shell',
+ 'description' => 'Allow UID editing.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'svc_acct-edit_gid',
+ 'section' => 'shell',
+ 'description' => 'Allow GID editing.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'zone-underscore',
+ 'section' => 'BIND',
+ 'description' => 'Allow underscores in zone names. As underscores are illegal characters in zone names, this option is not recommended.',
+ 'type' => 'checkbox',
+ },
+
);
1;