use IO::File;
use File::Basename;
use MIME::Base64;
+use Email::Address;
use FS::ConfItem;
use FS::ConfDefaults;
use FS::Conf_compat17;
sub invoice_from_full {
my ($self, $agentnum) = @_;
- return $self->config('invoice_from_name', $agentnum ) ?
- $self->config('invoice_from_name', $agentnum ) . ' <' .
- $self->config('invoice_from', $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' => 'invoicing',
'description' => 'Indicates that html and latex invoices should be in summary style and make use of invoice_latexsummary.',
'type' => 'checkbox',
+ 'per_agent' => 1,
},
{
'type' => 'textarea'
},
+ {
+ 'key' => 'quotation_disable_after_days',
+ 'section' => '',
+ 'description' => 'The number of days, if set, after which a non-converted quotation will be automatically disabled.',
+ 'type' => 'text'
+ },
+
{
'key' => 'invoice_print_pdf',
'section' => 'invoicing',
{
'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' => 'invoicing',
+ 'description' => 'Omit the "Please pay by (date)" from invoices.',
+ 'type' => 'checkbox',
+ 'per_agent' => 1,
+ },
+
+ {
+ 'key' => 'invoice_pay_by_msg',
+ 'section' => 'invoicing',
+ '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',
'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',
'type' => 'checkbox',
},
+ {
+ 'key' => 'cancel_msgnum-referring_cust-pkg_class',
+ 'section' => 'notification',
+ 'description' => 'Enable cancellation messages to the referring customer for these package classes.',
+ 'type' => 'select-pkg_class',
+ 'multiple' => 1,
+ },
+
+ {
+ 'key' => 'cancel_msgnum-referring_cust',
+ 'section' => 'notification',
+ 'description' => 'Template to use for cancellation emails sent to the referring customer.',
+ %msg_template_options,
+ },
+
{
'key' => 'require_cardname',
'section' => 'billing',
],
},
+ {
+ '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' => 'cust_main_note-require_class',
- 'section' => 'customer_fields',
+ 'section' => 'UI',
'description' => 'Require customer note classes for customer notes',
'type' => 'checkbox',
},
'' => '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' => 'UI',
'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_method',
- 'section' => 'UI',
+ 'section' => 'billing', # 'UI', #???
'description' => 'The method to use to look up tax district codes.',
'type' => 'select',
#'select_hash' => [ FS::Misc::Geo::get_district_methods() ],
],
},
+ {
+ 'key' => 'tax_district_taxname',
+ 'section' => 'billing',
+ 'description' => 'The tax name to display on the invoice for district sales taxes. Defaults to "Tax".',
+ 'type' => 'text',
+ },
+
{
'key' => 'company_latitude',
'section' => 'UI',
'Change billing address',
'Change service address',
'Change payment information',
+ 'Change packages',
'Change password(s)',
'Logout',
],
'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 => "vonage-password", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "vonage-fromnumber", section => "deprecated", description => "<b>DEPRECATED</b>", 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
#{
);
1;
-