use File::Basename;
use MIME::Base64;
use Locale::Currency;
+use Email::Address;
use FS::ConfItem;
use FS::ConfDefaults;
use FS::Locales;
sub invoice_from_full {
my ($self, $agentnum) = @_;
- ( $self->config('invoice_from_name', $agentnum)
- || $self->config('company_name', $agentnum)
- ).
- ' <'. $self->config('invoice_from', $agentnum ). '>';
+ my $name = $self->config('invoice_from_name', $agentnum)
+ || $self->config('company_name', $agentnum);
+
+ Email::Address->new( $name => $self->config('invoice_from', $agentnum ) )
+ ->format;
}
=back
'',
'Payable upon receipt',
'Net 0', 'Net 3', 'Net 5', 'Net 7', 'Net 9', 'Net 10', 'Net 14',
- 'Net 15', 'Net 18', 'Net 20', 'Net 21', 'Net 25', 'Net 30', 'Net 45',
- 'Net 60', 'Net 90'
+ 'Net 15', 'Net 18', 'Net 20', 'Net 21', 'Net 25', 'End of Month', 'Net 30',
+ 'Net 45', 'Net 60', 'Net 90'
);
my %msg_template_options = (
);
map { $_->gatewaynum, $_->label } @gateways;
},
+ 'per_agent' => 1,
);
my %invoice_mode_options = (
'section' => 'credit_cards',
'description' => 'Add a credit card surcharge to invoices, as a % of the invoice total. WARNING: Although recently permitted to US merchants in general, specific consumer protection laws may prohibit or restrict this practice in California, Colorado, Connecticut, Florda, Kansas, Maine, Massachusetts, New York, Oklahome, and Texas. Surcharging is also generally prohibited in most countries outside the US, AU and UK. When allowed, typically not permitted to be above 4%.',
'type' => 'text',
+ 'per_agent' => 1,
},
{
'per_agent' => 1,
},
+ {
+ 'key' => 'email-to-voice_domain',
+ 'section' => 'email_to_voice_services',
+ 'description' => 'The domain name that phone numbers will be attached to for sending email to voice emails via a 3rd party email to voice service. You will get this domain from your email to voice service provider. This is utilized on the email customer page or when using the email to voice billing event action. There you will be able to select the phone number for the email to voice service.',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
{
'key' => 'next-bill-ignore-time',
'section' => 'billing',
'section' => 'credit_cards',
'description' => 'Currency parameter for Business::OnlinePayment transactions.',
'type' => 'select',
- 'select_enum' => [ '', qw( USD AUD CAD DKK EUR GBP ILS JPY NZD ) ],
+ 'select_enum' => [ '', qw( USD AUD CAD DKK EUR GBP ILS JPY NZD ARS ) ],
},
{
'section' => 'localization',
'description' => 'Main accounting currency',
'type' => 'select',
- 'select_enum' => [ '', qw( USD AUD CAD DKK EUR GBP ILS JPY NZD XAF ) ],
+ 'select_enum' => [ '', qw( USD AUD CAD DKK EUR GBP ILS JPY NZD XAF ARS ) ],
},
{
'type' => 'textarea'
},
+ {
+ 'key' => 'quotation_disable_after_days',
+ 'section' => 'quotations',
+ 'description' => 'The number of days, if set, after which a non-converted quotation will be automatically disabled.',
+ 'type' => 'text'
+ },
+
{
'key' => 'invoice_print_pdf',
'section' => 'printing',
'type' => 'checkbox',
},
+ {
+ 'key' => 'invoice_omit_due_date',
+ 'section' => 'invoice_balances',
+ 'description' => 'Omit the "Please pay by (date)" from invoices.',
+ 'type' => 'checkbox',
+ 'per_agent' => 1,
+ },
+
+ {
+ 'key' => 'invoice_pay_by_msg',
+ 'section' => 'invoice_balances',
+ 'description' => 'Test of the "Please pay by (date)" message. Include [_1] to indicate the date, for example: "Please pay by [_1]"',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
{
'key' => 'invoice_sections',
'section' => 'invoicing',
{
'key' => 'usage_class_summary',
- 'section' => 'telephony',
+ 'section' => 'telephony_invoicing',
'description' => 'On invoices, summarize total usage by usage class in a separate section',
'type' => 'checkbox',
},
{
'key' => 'usage_class_as_a_section',
- 'section' => 'telephony',
+ 'section' => 'telephony_invoicing',
'description' => 'On invoices, split usage into sections and label according to usage class name when enabled. Only valid when invoice_sections is enabled.',
'type' => 'checkbox',
},
{
'key' => 'phone_usage_class_summary',
- 'section' => 'telephony',
+ 'section' => 'telephony_invoicing',
'description' => 'On invoices, summarize usage per DID by usage class and display all CDRs together regardless of usage class. Only valid when svc_phone_sections is enabled.',
'type' => 'checkbox',
},
{
'key' => 'svc_phone_sections',
- 'section' => 'telephony',
+ 'section' => 'telephony_invoicing',
'description' => 'On invoices, create a section for each svc_phone when enabled. Only valid when invoice_sections is enabled.',
'type' => 'checkbox',
},
{
'key' => 'separate_usage',
- 'section' => 'telephony',
+ 'section' => 'telephony_invoicing',
'description' => 'On invoices, split the rated call usage into a separate line from the recurring charges.',
'type' => 'checkbox',
},
'type' => 'text',
},
+ {
+ 'key' => 'cust_main-packages-num_per_page',
+ 'section' => 'packages',
+ 'description' => 'Number of packages to display per page on customer view (default 10).',
+ 'type' => 'text',
+ },
+
{
'key' => 'disable_maxselect',
'section' => 'reporting',
'type' => 'checkbox',
},
+ {
+ 'key' => 'google_maps_api_key',
+ 'section' => 'addresses',
+ 'description' => 'API key for google maps. This must be set for map and directions links to work. See <a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_top">Getting a Google Maps API Key</a>',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'company_physical_address',
+ 'section' => 'addresses',
+ 'description' => 'Your physical company address, for use in supplying google map directions, defaults to company_address',
+ 'type' => 'textarea',
+ 'per_agent' => 1,
+ },
+
{
'key' => 'show_ship_company',
'section' => 'addresses',
{
'key' => 'selfservice-payment_gateway',
- 'section' => 'self-service',
- 'description' => 'Force the use of this payment gateway for self-service.',
+ 'section' => 'deprecated',
+ 'description' => '(no longer supported) Force the use of this payment gateway for self-service.',
%payment_gateway_options,
},
'type' => 'checkbox',
},
+ {
+ 'key' => 'cancel_msgnum-referring_cust-pkg_class',
+ 'section' => 'cancellation',
+ 'description' => 'Enable cancellation messages to the referring customer for these package classes.',
+ 'type' => 'select-pkg_class',
+ 'multiple' => 1,
+ },
+
+ {
+ 'key' => 'cancel_msgnum-referring_cust',
+ 'section' => 'cancellation',
+ 'description' => 'Template to use for cancellation emails sent to the referring customer.',
+ %msg_template_options,
+ },
+
{
'key' => 'require_cardname',
'section' => 'credit_cards',
'section' => 'taxation',
'description' => 'Tax data vendor you are using.',
'type' => 'select',
- 'select_enum' => [ '', 'cch', 'billsoft', 'avalara', 'suretax' ],
+ 'select_enum' => [ '', 'cch', 'billsoft', 'avalara', 'suretax', 'compliance_solutions' ],
},
{
{
'key' => 'billsoft-company_code',
'section' => 'taxation',
- 'description' => 'Billsoft tax service company code (3 letters)',
+ 'description' => 'Billsoft (AvaTax for Communications) tax service company code (3 letters)',
'type' => 'text',
},
+ {
+ 'key' => 'billsoft-taxconfig',
+ 'section' => 'taxation',
+ 'description' => 'Billsoft tax configuration flags. Four lines: Facilities, Franchise, Regulated, Business Class. See the Avalara documentation for instructions on setting these flags.',
+ 'type' => 'textarea',
+ },
+
{
'key' => 'avalara-taxconfig',
'section' => 'taxation',
'per_agent' => 1,
},
+ {
+ 'key' => 'compliance_solutions-access_code',
+ 'section' => 'taxation',
+ 'description' => 'Access code for <a href="http://csilongwood.com/">Compliance Solutions</a> tax rating service',
+ 'type' => 'text',
+ },
+ {
+ 'key' => 'compliance_solutions-regulatory_code',
+ 'section' => 'taxation',
+ 'description' => 'Compliance Solutions regulatory status.',
+ 'type' => 'select',
+ 'select_enum' => [ '', 'ILEC', 'IXC', 'CLEC', 'VOIP', 'ISP', 'Wireless' ],
+ 'per_agent' => 1,
+ },
{
'key' => 'welcome_msgnum',
],
},
+ {
+ 'key' => 'selfservice-password_reset_hours',
+ 'section' => 'self-service',
+ 'description' => 'Numbers of hours an email password reset is valid. Defaults to 24.',
+ 'type' => 'text',
+ },
+
{
'key' => 'selfservice-password_reset_msgnum',
'section' => 'self-service',
'type' => 'text',
},
+ {
+ 'key' => 'pingd-interval',
+ 'section' => 'network_monitoring',
+ 'description' => 'Run ping scans of broadband services at this interval.',
+ 'type' => 'select',
+ 'select_hash' => [ '' => '',
+ 60 => '1 min',
+ 300 => '5 min',
+ 600 => '10 min',
+ 1800 => '30 min',
+ 3600 => '1 hour',
+ 14400 => '4 hours',
+ 28800 => '8 hours',
+ 86400 => '1 day',
+ ],
+ },
+
{
'key' => 'ticket_system-default_queueid',
'section' => 'ticketing',
{
'key' => 'voip-cust_accountcode_cdr',
- 'section' => 'telephony',
+ 'section' => 'telephony_invoicing',
'description' => 'Enable the per-customer option for CDR breakdown by accountcode.',
'type' => 'checkbox',
},
- {
- 'key' => 'voip-cust_cdr_spools',
- 'section' => 'telephony',
- 'description' => 'Enable the per-customer option for individual CDR spools.',
- 'type' => 'checkbox',
- },
-
{
'key' => 'voip-cust_cdr_squelch',
- 'section' => 'telephony',
+ 'section' => 'telephony_invoicing',
'description' => 'Enable the per-customer option for not printing CDR on invoices.',
'type' => 'checkbox',
},
{
'key' => 'voip-cdr_email',
- 'section' => 'telephony',
+ 'section' => 'telephony_invoicing',
'description' => 'Include the call details inline on emailed invoices (and HTML invoices viewed in the backend), even if the customer is configured for not printing them on the invoices. Useful for including these details in electronic delivery but omitting them when printing.',
'type' => 'checkbox',
},
{
'key' => 'voip-cdr_email_attach',
- 'section' => 'telephony',
+ 'section' => 'telephony_invoicing',
'description' => 'Enable the per-customer option for including CDR information as an attachment on emailed invoices.',
'type' => 'select',
'select_hash' => [ '' => 'Disabled',
'type' => 'checkbox',
},
+ {
+ 'key' => 'cust_main_note-require_class',
+ 'section' => 'customer_fields',
+ 'description' => 'Require customer note classes for customer notes',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'cust_main-ticket_statuses',
'section' => 'ticketing',
'per_agent' => 1,
},
+ {
+ 'key' => 'cust_main-require_classnum',
+ 'section' => 'customer_fields',
+ 'description' => 'Customer class is required: require customer class for all customer records.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'cust_main-check_unique',
'section' => 'customer_fields',
'' => 'Numeric only',
'\d{7}' => 'Numeric only, exactly 7 digits',
'ww?d+' => 'Numeric with one or two letter prefix',
+ 'd+-w' => 'Numeric with a dash and one letter suffix',
],
},
'section' => 'invoice_balances',
'description' => 'Text for the label of the total previous balance, when it is shown separately. Defaults to "Previous Balance".',
'type' => 'text',
+ 'per_locale' => 1,
},
{
'section' => 'invoice_balances',
'description' => 'Text for the label of the total of new charges, when it is shown separately. If invoice_show_prior_due_date is enabled, the due date of current charges will be appended. Defaults to "Total New Charges".',
'type' => 'text',
+ 'per_locale' => 1,
},
{
'section' => 'addresses',
'description' => 'The year to use in census tract lookups. NOTE: you need to select 2012 or 2013 for Year 2010 Census tract codes. A selection of 2011 provides Year 2000 Census tract codes. Use the freeside-censustract-update tool if exisitng customers need to be changed.',
'type' => 'select',
- 'select_enum' => [ qw( 2013 2012 2011 ) ],
+ 'select_enum' => [ qw( 2017 2016 2015 ) ],
},
{
],
},
+ {
+ 'key' => 'tax_district_taxname',
+ 'section' => 'taxation',
+ 'description' => 'The tax name to display on the invoice for district sales taxes. Defaults to "Tax".',
+ 'type' => 'text',
+ },
+
{
'key' => 'company_latitude',
'section' => 'taxation',
'Change billing address',
'Change service address',
'Change payment information',
+ 'Change packages',
'Change password(s)',
'Logout',
],
'type' => 'checkbox',
},
+ {
+ 'key' => 'cdr-userfield_dnis_rewrite',
+ 'section' => 'telephony',
+ 'description' => 'If the CDR userfield contains "DNIS=" followed by a sequence of digits, use that as the destination number for the call.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'cdr-intl_to_domestic_rewrite',
'section' => 'telephony',
{
'key' => 'note-classes',
- 'section' => 'customer_fields',
- 'description' => 'Use customer note classes',
+ 'section' => 'deprecated',
+ 'description' => 'Use customer note classes (now automatically used if classes are defined)',
'type' => 'select',
'select_hash' => [
0 => 'Disabled',
{
'key' => 'cust_bill-latex_lineitem_maxlength',
- 'section' => 'invoicing',
- 'description' => 'Truncate long line items to this number of characters on typeset invoices, to avoid losing things off the right margin. Defaults to 50. ',
+ 'section' => 'deprecated',
+ 'description' => 'With old invoice_latex template, truncate long line items to this number of characters on typeset invoices, to avoid losing things off the right margin. (With current invoice_latex template, this is handled internally in the template itself instead.)',
'type' => 'text',
},
'type' => 'checkbox',
},
- {
- 'key' => 'ie-compatibility_mode',
- 'section' => 'UI',
- 'description' => "Compatibility mode META tag for Internet Explorer, used on the customer view page. Not necessary in normal operation unless custom content (notes, cust_main-custom_link) is included on customer view that is incompatibile with newer IE verisons.",
- 'type' => 'select',
- 'select_enum' => [ '', '7', 'EmulateIE7', '8', 'EmulateIE8' ],
- },
-
{
'key' => 'disable_payauto_default',
'section' => 'payments',
'rate_low' => 'Lowest rate first',
],
},
+
+ {
+ 'key' => 'cdr-lrn_lookup',
+ 'section' => 'telephony',
+ 'description' => 'Look up LRNs of destination numbers for exact matching to the terminating carrier. This feature requires a Freeside support contract for paid access to the central NPAC database; see <a href ="#support-key">support-key</a>.',
+ 'type' => 'checkbox',
+ },
{
'key' => 'brand-agent',
'type' => 'checkbox',
},
+ {
+ 'key' => 'selfservice-ACH_info_readonly',
+ 'section' => 'self-service',
+ 'description' => 'make ACH on self service portal read only',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'selfservice-announcement',
'section' => 'self-service',
{
'key' => 'logout-timeout',
- 'section' => 'UI',
- 'description' => 'If set, automatically log users out of the backoffice after this many minutes.',
+ 'section' => 'deprecated',
+ 'description' => 'Deprecated. Used to automatically log users out of the backoffice after this many minutes. Set session timeouts in employee groups instead.',
'type' => 'text',
},
'type' => 'text',
},
+ {
+ 'key' => 'selfservice-db_profile',
+ 'section' => 'development',
+ 'description' => 'Enable collection and logging of database profiling information for self-service servers. This has significant overhead, do not leave enabled in production beyond that necessary to collect profiling data.',
+ 'type' => 'checkbox',
+ },
+
+
# for internal use only; test databases should declare this option and
# everyone else should pretend it doesn't exist
#{