},
{
+ 'key' => 'emailinvoiceautoalways',
+ 'section' => 'billing',
+ 'description' => 'Automatically adds new accounts to the email invoice list even when the list contains email addresses',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'exclude_ip_addr',
'section' => '',
'description' => 'Exclude these from the list of available broadband service IP addresses. (One per line)',
$payname = "$payfirst $paylast";
}
+ # invoicing_list_emailonly instead? push one? which one?
my @invoicing_list = grep { $_ ne 'POST' } $self->invoicing_list;
- if ( $conf->exists('emailinvoiceauto')
+ if ( $conf->exists('emailinvoiceautoalways')
+ || $conf->exists('emailinvoiceauto') && ! @invoicing_list
|| ( $conf->exists('emailinvoiceonly') && ! @invoicing_list ) ) {
push @invoicing_list, $self->all_emails;
}
$payname = "$payfirst $paylast";
}
+ # invoicing_list_emailonly instead? push one? which one?
my @invoicing_list = grep { $_ ne 'POST' } $self->invoicing_list;
- if ( $conf->exists('emailinvoiceauto')
+ if ( $conf->exists('emailinvoiceautoalways')
+ || $conf->exists('emailinvoiceauto') && ! @invoicing_list
|| ( $conf->exists('emailinvoiceonly') && ! @invoicing_list ) ) {
push @invoicing_list, $self->all_emails;
}
if ( $cust_pkg ) {
my $cust_main = $cust_pkg->cust_main;
- if ( $conf->exists('emailinvoiceauto') ) {
+ if ( $conf->exists('emailinvoiceautoalways')
+ || $conf->exists('emailinvoiceauto')
+ && $cust_main->invoicing_list_emailonly
+ ) {
my @invoicing_list = $cust_main->invoicing_list;
push @invoicing_list, $self->email;
$cust_main->invoicing_list(\@invoicing_list);