projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
deprecate signup_server-quiet config option
[freeside.git]
/
FS
/
FS
/
cust_pkg.pm
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
a423c55
..
9a54b95
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-2,7
+2,6
@@
package FS::cust_pkg;
use strict;
use vars qw(@ISA $disable_agentcheck);
use strict;
use vars qw(@ISA $disable_agentcheck);
-use vars qw( $quiet );
use FS::UID qw( getotaker dbh );
use FS::Record qw( qsearch qsearchs );
use FS::Misc qw( send_email );
use FS::UID qw( getotaker dbh );
use FS::Record qw( qsearch qsearchs );
use FS::Misc qw( send_email );
@@
-249,21
+248,25
@@
sub check {
$self->manual_flag($1);
}
$self->manual_flag($1);
}
- ''; #no error
+ $self->SUPER::check;
}
}
-=item cancel
+=item cancel
[ OPTION => VALUE ... ]
Cancels and removes all services (see L<FS::cust_svc> and L<FS::part_svc>)
in this package, then cancels the package itself (sets the cancel field to
now).
Cancels and removes all services (see L<FS::cust_svc> and L<FS::part_svc>)
in this package, then cancels the package itself (sets the cancel field to
now).
+Available options are: I<quiet>
+
+I<quiet> can be set true to supress email cancellation notices.
+
If there is an error, returns the error, otherwise returns false.
=cut
sub cancel {
If there is an error, returns the error, otherwise returns false.
=cut
sub cancel {
- my
$self = shift
;
+ my
( $self, %options ) = @_
;
my $error;
local $SIG{HUP} = 'IGNORE';
my $error;
local $SIG{HUP} = 'IGNORE';
@@
-304,7
+307,7
@@
sub cancel {
my $conf = new FS::Conf;
my @invoicing_list = grep { $_ ne 'POST' } $self->cust_main->invoicing_list;
my $conf = new FS::Conf;
my @invoicing_list = grep { $_ ne 'POST' } $self->cust_main->invoicing_list;
- if ( !$
quiet
&& $conf->exists('emailcancel') && @invoicing_list ) {
+ if ( !$
options{'quiet'}
&& $conf->exists('emailcancel') && @invoicing_list ) {
my $conf = new FS::Conf;
my $error = send_email(
'from' => $conf->config('invoice_from'),
my $conf = new FS::Conf;
my $error = send_email(
'from' => $conf->config('invoice_from'),