X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_acct.pm;h=14e18442ffaf7c54df947694a4eef6cdb9c16e27;hb=b8956e0f375e56b05677d4ef4889edab3e01614b;hp=7ff0ed889d7d8f01096913ff3b929df0f7ea93ba;hpb=869c40cba02a24ea2c876e0a7dc97bc88a6d3938;p=freeside.git diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 7ff0ed889..14e18442f 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -66,6 +66,9 @@ $FS::UID::callback{'FS::svc_acct'} = sub { $welcome_mimetype = $conf->config('welcome_email-mimetype') || 'text/plain'; } else { $welcome_template = ''; + $welcome_from = ''; + $welcome_subject = ''; + $welcome_mimetype = ''; } $smtpmachine = $conf->config('smtpmachine'); $radius_password = $conf->config('radius-password') || 'Password'; @@ -370,7 +373,6 @@ sub insert { 'svcnum' => $self->svcnum, 'job' => 'FS::svc_acct::send_email' }; - warn "attempting to queue email to $to"; my $error = $wqueue->insert( 'to' => $to, 'from' => $welcome_from, @@ -387,14 +389,14 @@ sub insert { ); if ( $error ) { $dbh->rollback if $oldAutoCommit; - return "queuing welcome email: $error"; + return "error queuing welcome email: $error"; } foreach my $jobnum ( @jobnums ) { my $error = $wqueue->depend_insert($jobnum); if ( $error ) { $dbh->rollback if $oldAutoCommit; - return "queuing welcome email job dependancy: $error"; + return "error queuing welcome email job dependancy: $error"; } } @@ -610,6 +612,8 @@ error, returns the error, otherwise returns false. Called by the suspend method of FS::cust_pkg (see L). +Calls any export-specific suspend hooks. + =cut sub suspend { @@ -634,6 +638,8 @@ an error, returns the error, otherwise returns false. Called by the unsuspend method of FS::cust_pkg (see L). +Calls any export-specific unsuspend hooks. + =cut sub unsuspend { @@ -680,7 +686,8 @@ sub check { } my $error = $self->ut_numbern('svcnum') - || $self->ut_number('domsvc') + #|| $self->ut_number('domsvc') + || $self->ut_foreign_key('domsvc', 'svc_domain', 'svcnum' ) || $self->ut_textn('sec_phrase') ; return $error if $error; @@ -932,6 +939,8 @@ sub svc_domain { Returns the FS::cust_svc record for this account (see L). +=cut + sub cust_svc { my $self = shift; qsearchs( 'cust_svc', { 'svcnum' => $self->svcnum } );