use FS::Conf;
use FS::Record qw( qsearch qsearchs fields dbh );
use FS::svc_Common;
-use Net::SSH;
use FS::cust_svc;
use FS::part_svc;
use FS::svc_acct_pop;
-use FS::svc_acct_sm;
use FS::cust_main_invoice;
use FS::svc_domain;
use FS::raddb;
return "queueing job (transaction rolled back): $error";
}
- #welcome email
my $cust_pkg = $self->cust_svc->cust_pkg;
- my( $cust_main, $to ) = ( '', '' );
+ my $cust_main = $cust_pkg->cust_main;
+
+ my $cust_pkg = $self->cust_svc->cust_pkg;
+
+ if ( $conf->exists('emailinvoiceauto') ) {
+ my @invoicing_list = $cust_main->invoicing_list;
+ push @invoicing_list, $self->email;
+ $cust_main->invoicing_list(@invoicing_list);
+ }
+
+ #welcome email
+ my $to = '';
if ( $welcome_template && $cust_pkg ) {
- my $cust_main = $cust_pkg->cust_main;
my $to = join(', ', grep { $_ ne 'POST' } $cust_main->invoicing_list );
if ( $to ) {
my $wqueue = new FS::queue {
sub delete {
my $self = shift;
- if ( defined( $FS::Record::dbdef->table('svc_acct_sm') ) ) {
- return "Can't delete an account which has (svc_acct_sm) mail aliases!"
- if $self->uid && qsearch( 'svc_acct_sm', { 'domuid' => $self->uid } );
- }
-
return "Can't delete an account which is a (svc_forward) source!"
if qsearch( 'svc_forward', { 'srcsvc' => $self->svcnum } );
# $error = $self->ut_textn('finger');
# return $error if $error;
$self->getfield('finger') =~
- /^([\w \t\!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\*\<\>]*)$/
+ /^([\w \t\!\@\#\$\%\&\(\)\-\+\;\'\"\,\.\?\/\*\<\>]*)$/
or return "Illegal finger: ". $self->getfield('finger');
$self->setfield('finger', $1);
L<FS::svc_Common>, edit/part_svc.cgi from an installed web interface,
export.html from the base documentation, L<FS::Record>, L<FS::Conf>,
L<FS::cust_svc>, L<FS::part_svc>, L<FS::cust_pkg>, L<FS::queue>,
-L<freeside-queued>), L<Net::SSH>, L<ssh>, L<FS::svc_acct_pop>,
+L<freeside-queued>), L<FS::svc_acct_pop>,
schema.html from the base documentation.
=cut