X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=5f2c3b3556bede48b92c611ba8938c00ae2399ed;hb=4b4b3ca9cb0b7336293b759549b78fc903a7d8c8;hp=8ca2c1ba26b95a1b422855cdd85884f75d6bc991;hpb=beba6672fb9c9c5769c81f8029bb88cd2bc910e9;p=freeside.git diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 8ca2c1ba2..5f2c3b355 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 @@ -209,6 +224,31 @@ sub config_items { 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', } @@ -540,9 +580,38 @@ httemplate/docs/config.html }, { + '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.', + 'description' => 'Optional LaTeX template for typeset PostScript invoices. See the billing documentation for details.', 'type' => 'textarea', }, @@ -561,6 +630,13 @@ httemplate/docs/config.html }, { + '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.', @@ -592,7 +668,7 @@ httemplate/docs/config.html { 'key' => 'invoice_send_receipts', - 'section' => 'deprecated',q + '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', }, @@ -600,7 +676,7 @@ httemplate/docs/config.html { 'key' => 'payment_receipt_email', 'section' => 'billing', - 'description' => 'Template file for payment receipts.', + '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' => 'textarea', }, @@ -974,6 +1050,13 @@ httemplate/docs/config.html 'type' => 'checkbox', }, + { + 'key' => 'username-percent', + 'section' => 'username', + 'description' => 'Allow the percent character (%) in usernames.', + 'type' => 'checkbox', + }, + { 'key' => 'username_policy', 'section' => 'deprecated', @@ -1175,9 +1258,16 @@ httemplate/docs/config.html }, { + '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', 'type' => 'textarea', }, @@ -1382,8 +1472,16 @@ httemplate/docs/config.html { 'key' => 'ticket_system-default_queueid', 'section' => '', - 'description' => 'Default queue number used when creating new customer tickets.', - 'type' => 'text', + 'description' => 'Default queue used when creating new customer tickets.', + 'type' => 'select-sub', + 'options_sub' => sub { eval "use FS::TicketSystem;"; + die $@ if $@; + FS::TicketSystem->queues(); + }, + 'option_sub' => sub { eval "use FS::TicketSystem;"; + die $@ if $@; + FS::TicketSystem->queue(shift); + }, }, { @@ -1422,6 +1520,13 @@ httemplate/docs/config.html }, { + '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', @@ -1455,6 +1560,52 @@ httemplate/docs/config.html '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', + }, + + ); 1;