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
'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',
'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',