projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
oops, losing notes!
[freeside.git]
/
FS
/
FS
/
part_export
/
shellcommands.pm
diff --git
a/FS/FS/part_export/shellcommands.pm
b/FS/FS/part_export/shellcommands.pm
index
4431cc0
..
665ec47
100644
(file)
--- a/
FS/FS/part_export/shellcommands.pm
+++ b/
FS/FS/part_export/shellcommands.pm
@@
-176,14
+176,25
@@
sub _export_delete {
sub _export_suspend {
my($self) = shift;
sub _export_suspend {
my($self) = shift;
- $self->_export_command('suspend', @_);
+ $self->_export_command
_or_super
('suspend', @_);
}
sub _export_unsuspend {
my($self) = shift;
}
sub _export_unsuspend {
my($self) = shift;
- $self->_export_command('unsuspend', @_);
+ $self->_export_command
_or_super
('unsuspend', @_);
}
}
+sub _export_command_or_super {
+ my($self, $action) = (shift, shift);
+ if ( $self->option($action) =~ /^\s*$/ ) {
+ my $method = "SUPER::_export_$action";
+ $self->$method(@_);
+ } else {
+ $self->_export_command($action, @_);
+ }
+};
+
+
sub _export_command {
my ( $self, $action, $svc_acct) = (shift, shift, shift);
my $command = $self->option($action);
sub _export_command {
my ( $self, $action, $svc_acct) = (shift, shift, shift);
my $command = $self->option($action);
@@
-205,7
+216,7
@@
sub _export_command {
my $cust_pkg = $svc_acct->cust_svc->cust_pkg;
if ( $cust_pkg ) {
my $cust_pkg = $svc_acct->cust_svc->cust_pkg;
if ( $cust_pkg ) {
- $email = ( grep { $_
ne 'POST'
} $cust_pkg->cust_main->invoicing_list )[0];
+ $email = ( grep { $_
!~ /^(POST|FAX)$/
} $cust_pkg->cust_main->invoicing_list )[0];
} else {
$email = '';
}
} else {
$email = '';
}