summaryrefslogtreecommitdiff
path: root/FS/FS/svc_forward.pm
diff options
context:
space:
mode:
authorJeremy Davis <jeremyd@freeside.biz>2014-10-30 10:19:39 -0400
committerJeremy Davis <jeremyd@freeside.biz>2014-10-30 10:19:39 -0400
commit62fabd84e06e5a346f6386304803ad277d6e5e4d (patch)
treeb5f7b7149267443c5c44f57657f48d3647c0042c /FS/FS/svc_forward.pm
parent4716b68d53f303a7a1b4c9702f02a097fee2b1c0 (diff)
Ticket #29773 Add methods to svc_forward to make exporting more effective
Diffstat (limited to 'FS/FS/svc_forward.pm')
-rw-r--r--FS/FS/svc_forward.pm48
1 files changed, 48 insertions, 0 deletions
diff --git a/FS/FS/svc_forward.pm b/FS/FS/svc_forward.pm
index 9e27a32e0..5612cfc33 100644
--- a/FS/FS/svc_forward.pm
+++ b/FS/FS/svc_forward.pm
@@ -353,6 +353,54 @@ sub dstsvc_acct {
qsearchs('svc_acct', { 'svcnum' => $self->dstsvc } );
}
+=item src_email
+
+Returns the email address to be forwarded regardless of weither it is local
+or remote
+
+=cut
+
+sub src_email {
+my $self = shift;
+
+if ($self->srcsvc eq '0'){
+ return $self->src;
+} else {
+ my $svc_acct = $self->srcsvc_acct;
+ return $svc_acct->email;
+}}
+
+=item dst_email
+
+Returns the email address which gets forwarded to regardless of weither it is local
+or remote
+
+=cut
+
+sub dst_email {
+my $self = shift;
+
+if ($self->dstsvc eq '0'){
+ return $self->dst;
+} else {
+ my $svc_acct = $self->dstsvc_acct;
+ return $svc_acct->email;
+}}
+
+=item srcsvc_acct_domain
+
+Returns the domain of the srcsvc_acct
+
+=cut
+
+sub srcsvc_acct_domain {
+my $self = shift;
+
+ my $svc_acct = $self->srcsvc_acct;
+ return $svc_acct->domain;
+}
+
+
=back
=head1 BUGS