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 = (
'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',
{
'key' => 'invoice_default_terms',
'section' => 'invoicing',
- 'description' => 'Optional default invoice term, used to calculate a due date printed on invoices.',
+ 'description' => 'Optional default invoice term, used to calculate a due date printed on invoices. WARNING: If you do not want to change the terms on existing invoices, do not change this after going live.',
'type' => 'select',
'per_agent' => 1,
'select_enum' => \@invoice_terms,
'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',
},
{
'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' ],
},
{
'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',
{
'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.',
+ 'section' => 'deprecated',
+ 'description' => 'Deprecated, used to 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',
'' => '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' => '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',
],
{
'key' => 'ie-compatibility_mode',
- 'section' => 'UI',
+ 'section' => 'deprecated',
'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' ],
'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',
'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
#{