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
{
'key' => 'credit-card-surcharge-percentage',
'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%.',
+ 'description' => 'Add a credit card surcharge to invoices, as a % of the invoice total. WARNING: Although permitted to US merchants in general since 2013, specific consumer protection laws may prohibit or restrict this practice in California, Colorado, Connecticut, Florda, Kansas, Maine, Massachusetts, New York, Oklahoma, 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,
+ },
+
+ {
+ 'key' => 'credit-card-surcharge-flatfee',
+ 'section' => 'credit_cards',
+ 'description' => 'Add a credit card surcharge to invoices, as a flat fee. WARNING: Although permitted to US merchants in general since 2013, specific consumer protection laws may prohibit or restrict this practice in California, Colorado, Connecticut, Florda, Kansas, Maine, Massachusetts, New York, Oklahoma, 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,
+ },
+
+ {
+ 'key' => 'credit-card-surcharge-text',
+ 'section' => 'credit_cards',
+ 'description' => 'Text for the credit card surcharge invoice line. If not set, it will default to Credit Card Surcharge.',
'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' => 'invoicing',
'description' => 'Indicates that html and latex invoices should be in summary style and make use of invoice_latexsummary.',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
'per_agent' => 1,
},
+ {
+ 'key' => 'invoice_latexcouponlocation',
+ 'section' => 'invoicing',
+ 'description' => 'Location of the remittance coupon.Either top or bottom of page, defaults to bottom.',
+ 'type' => 'select',
+ 'select_hash' => [
+ 'bottom' => 'Bottom of page (default)',
+ 'top' => 'Top of page',
+ ],
+ 'per_agent' => 1,
+ },
+
{
'key' => 'invoice_latexsmallfooter',
'section' => 'invoice_templates',
{
'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,
'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',
- 'description' => 'Split invoice into sections and label according to package category when enabled.',
+ 'description' => 'Split invoice into sections and label according to either package category or location when enabled.',
'type' => 'checkbox',
'per_agent' => 1,
+ 'config_bool' => 1,
+ },
+
+ {
+ 'key' => 'invoice_sections_multilocation',
+ 'section' => 'invoicing',
+ 'description' => 'Enable invoice_sections for for any bill with at least this many locations on the bill.',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ 'validate' => sub { shift =~ /^\d+$/ ? undef : 'Please enter a number' },
},
{
'select_enum' => [ qw(category location) ],
},
+ {
+ 'key' => 'invoice_sections_with_taxes',
+ 'section' => 'invoicing',
+ 'description' => 'Include taxes within each section of mutli-section invoices.',
+ 'type' => 'checkbox',
+ 'per_agent' => 1,
+ 'agent_bool' => 1,
+ },
+
{
'key' => 'summary_subtotals_method',
'section' => 'invoicing',
'type' => 'checkbox',
},
+ {
+ 'key' => 'allow_payment_receipt_noemail',
+ 'section' => 'notification',
+ 'description' => 'Add option on customer edit/view page to disable emailing of payment receipts. If this option is set to NO it will override customer specific option, so when set to NO system will not check for payment_receipt_noemail option at customer level.',
+ 'type' => 'checkbox',
+ 'per_agent' => 1,
+ 'agent_bool' => 1,
+ },
+
{
'key' => 'payment_receipt',
'section' => 'notification',
'description' => 'Template to use for manual payment receipts.',
%msg_template_options,
},
+
+ {
+ 'key' => 'payment_receipt_msgnum_auto',
+ 'section' => 'notification',
+ 'description' => 'Automatic payments will cause a post-payment to use a message template for automatic payment receipts rather than a post payment statement.',
+ %msg_template_options,
+ },
{
'key' => 'payment_receipt_from',
{
'key' => 'passwordmin',
'section' => 'password',
- 'description' => 'Minimum password length (default 6)',
+ 'description' => 'Minimum password length (default 8)',
'type' => 'text',
},
'25-starttls' => 'STARTTLS (port 25)',
'587-starttls' => 'STARTTLS / submission (port 587)',
'465-tls' => 'SMTPS (SSL) (port 465)',
+ '2525' => 'None (Non-standard port 2525)',
],
},
],
},
+ {
+ 'key' => 'unsuspend_reason_type',
+ 'section' => 'suspension',
+ 'description' => 'If set, limits automatic unsuspension to packages which were suspended for this reason type.',
+ reason_type_options('S'),
+ },
+
{
'key' => 'unsuspend-always_adjust_next_bill_date',
'section' => 'suspension',
{
'key' => 'unmask_ss',
- 'section' => 'e-checks',
+ 'section' => 'deprecated',
'description' => "Don't mask social security numbers in the web interface.",
'type' => 'checkbox',
},
'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',
'section' => 'payments',
'description' => 'Available payment types.',
'type' => 'selectmultiple',
- 'select_enum' => [ qw(CARD DCRD CHEK DCHK) ], #BILL CASH WEST MCRD MCHK PPAL) ],
+ 'select_enum' => [ qw(CARD DCRD CHEK DCHK PPAL) ], #BILL CASH WEST MCRD MCHK PPAL) ],
+ },
+
+ {
+ 'key' => 'processing-fee',
+ 'section' => 'payments',
+ 'description' => 'Fee for back end payment processing.',
+ 'type' => 'text',
+ 'per_agent' => 1,
+ },
+
+ {
+ 'key' => 'processing-fee_on_separate_invoice',
+ 'section' => 'payments',
+ 'description' => 'Places the processing fee on a separate invoice by itself. Only works with real time processing.',
+ 'type' => 'checkbox',
+ 'validate' => sub {
+ my $conf = new FS::Conf;
+ !$conf->config('batch-enable_payby') ? '' : 'You can not set this option while batch processing is enabled.';
+ },
},
{
{
'key' => 'manual_process-single_invoice_amount',
- 'section' => 'payments',
+ 'section' => 'deprecated',
'description' => 'When entering manual credit card and ACH payments, amount will not autofill if the customer has more than one open invoice',
'type' => 'checkbox',
},
'description' => 'Enable batch processing for the specified payment types.',
'type' => 'selectmultiple',
'select_enum' => [qw( CARD CHEK )],
+ 'validate' => sub {
+ ## can not create a new invoice and pay it silently with batch processing, only realtime processing.
+ my $conf = new FS::Conf;
+ !$conf->exists('processing-fee_on_separate_invoice') ? '' : 'You can not enable batch processing while processing-fee_on_separate_invoice option is enabled.';
+ },
},
{
'select_enum' => [ '', 'ITSP_fsinc_hosted', ],
},
+ {
+ 'key' => 'dashboard-topnotes',
+ 'section' => 'UI',
+ 'description' => 'Note to display on the top of the front page',
+ 'type' => 'textarea',
+ },
+
{
'key' => 'dashboard-toplist',
'section' => 'UI',
'' => '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',
],
},
{
'key' => 'census_year',
+ 'section' => 'deprecated',
+ 'description' => 'Deprecated. Used to control the year used for census lookups. 2020 census data is now the default. Use the freeside-censustract-update tool if exisitng customers need to be changed. See the <a href ="#census_legacy">census_legacy</a> configuration option if you need old census data to re-file pre-2022 FCC 477 reports.',
+ 'type' => 'select',
+ 'select_enum' => [ qw( 2017 2016 2015 ) ],
+ },
+
+ {
+ 'key' => 'census_legacy',
'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.',
+ 'description' => 'Use old census data (and source). Should only be needed if re-filing pre-2022 FCC 477 reports.',
'type' => 'select',
- 'select_enum' => [ qw( 2013 2012 2011 ) ],
+ 'select_hash' => [ '' => 'Disabled (2020)',
+ '2015' => '2015',
+ '2016' => '2016',
+ '2017' => '2017',
+ ],
},
{
'Change billing address',
'Change service address',
'Change payment information',
+ 'Change packages',
'Change password(s)',
'Logout',
],
{
'key' => 'cdr-charged_party-field',
'section' => 'telephony',
- 'description' => 'Set the charged_party field of CDRs to this field.',
+ 'description' => 'Set the charged_party field of CDRs to this field. Restart Apache and Freeside daemons after changing.',
'type' => 'select-sub',
'options_sub' => sub { my $fields = FS::cdr->table_info->{'fields'};
map { $_ => $fields->{$_}||$_ }
{
'key' => 'cdr-charged_party-accountcode',
'section' => 'telephony',
- 'description' => 'Set the charged_party field of CDRs to the accountcode.',
+ 'description' => 'Set the charged_party field of CDRs to the accountcode. Restart Apache and Freeside daemons after changing.',
'type' => 'checkbox',
},
{
'key' => 'cdr-charged_party-accountcode-trim_leading_0s',
'section' => 'telephony',
- 'description' => 'When setting the charged_party field of CDRs to the accountcode, trim any leading zeros.',
+ 'description' => 'When setting the charged_party field of CDRs to the accountcode, trim any leading zeros. Restart Apache and Freeside daemons after changing.',
'type' => 'checkbox',
},
'type' => 'checkbox',
},
+ {
+ 'key' => 'cdr-max_duration',
+ 'section' => 'telephony',
+ 'description' => 'If set, defines a global maximum billsec/duration for (prefix-based) call rating, in seconds. Used with questionable/dirty CDR data that may contain bad records with long billsecs/durations. Restart Apache and Freeside daemons after changing.',
+ 'type' => 'text',
+ },
+
{
'key' => 'disable-cust-pkg_class',
'section' => 'packages',
{
'key' => 'cdr-prerate',
'section' => 'telephony',
- 'description' => 'Experimental feature to rate CDRs immediately, rather than waiting until invoice generation time. Can reduce invoice generation time when processing lots of CDRs. Currently works with "VoIP/telco CDR rating (standard)" price plans using "Phone numbers (svc_phone.phonenum)" CDR service matching, without any included minutes.',
+ 'description' => 'Experimental feature to rate CDRs immediately, rather than waiting until invoice generation time. Can reduce invoice generation time when processing lots of CDRs. Currently works with "VoIP/telco CDR rating (standard)" price plans using "Phone numbers (svc_phone.phonenum)" CDR service matching, without any included minutes. Restart Apache and Freeside daemons after changing.',
'type' => 'checkbox',
},
{
'key' => 'cdr-prerate-cdrtypenums',
'section' => 'telephony',
- 'description' => 'When using cdr-prerate to rate CDRs immediately, limit processing to these CDR types.',
+ 'description' => 'When using cdr-prerate to rate CDRs immediately, limit processing to these CDR types. Restart Apache and Freeside daemons after changing.',
'type' => 'select-sub',
'multiple' => 1,
'options_sub' => sub { require FS::Record;
{
'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>.',
+ '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>. Restart Apache and Freeside daemons after changing.',
'type' => 'checkbox',
},
'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',
},
{
'key' => 'agent-disable_counts',
- 'section' => 'scalability',
+ 'section' => 'deprecated',
'description' => 'On the agent browse page, disable the customer and package counts. Typically used for very large installs when this page takes too long to render.',
'type' => 'checkbox',
},
+ {
+ 'key' => 'config-disable_counts',
+ 'section' => 'scalability',
+ 'description' => 'Disable the customer and package counts on the Agents, Packages, and Services pages. Use for very large installs where these pages take too long to render.',
+ 'type' => 'checkbox',
+ },
+
{
'key' => 'tollfree-country',
'section' => 'telephony',
- 'description' => 'Country / region for toll-free recognition',
+ 'description' => 'Country / region for toll-free recognition. Restart Apache and Freeside daemons after changing.',
'type' => 'select',
'select_hash' => [ '' => 'NANPA (US/Canada)',
'AU' => 'Australia',
'type' => 'checkbox',
},
+ {
+ 'key' => 'deposit_slip-bank_name',
+ 'section' => 'payments', #XXX payment_deposit_slips
+ 'description' => 'Bank name to print on check deposit slips',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'deposit_slip-bank_address',
+ 'section' => 'payments', #XXX payment_deposit_slips
+ 'description' => 'Bank address to print on check deposit slips',
+ 'type' => 'textarea',
+ },
+
+ {
+ 'key' => 'deposit_slip-bank_routingnumber',
+ 'section' => 'payments', #XXX payment_deposit_slips
+ 'description' => '9 digit bank routing number to print on check deposit slips',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'deposit_slip-bank_accountnumber',
+ 'section' => 'payments', #XXX payment_deposit_slips
+ 'description' => 'Bank account number to print on check deposit slips',
+ 'type' => 'text',
+ },
+
# for internal use only; test databases should declare this option and
# everyone else should pretend it doesn't exist
);
1;
-