summaryrefslogtreecommitdiff
path: root/FS/FS/cust_pkg_reason.pm
diff options
context:
space:
mode:
authorjeff <jeff>2008-04-16 18:32:58 +0000
committerjeff <jeff>2008-04-16 18:32:58 +0000
commit9e4bc4c0c9c77d75618196f4f0eeeeeb35e2ee08 (patch)
tree6c310e398496e44c13cf78c07b0f72d22978e62d /FS/FS/cust_pkg_reason.pm
parent81026510972881108c9bd9c72d146d3d47d72f2e (diff)
show user who created (cancel/suspend) reason and possibly fix a lingering spurious usergroup bug
Diffstat (limited to 'FS/FS/cust_pkg_reason.pm')
-rw-r--r--FS/FS/cust_pkg_reason.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/FS/FS/cust_pkg_reason.pm b/FS/FS/cust_pkg_reason.pm
index 2f92740..24808f9 100644
--- a/FS/FS/cust_pkg_reason.pm
+++ b/FS/FS/cust_pkg_reason.pm
@@ -106,6 +106,29 @@ sub check {
$self->SUPER::check;
}
+=item reason
+
+Returns the reason (see L<FS::reason>) associated with this cust_pkg_reason.
+
+=cut
+
+sub reason {
+ my $self = shift;
+ qsearchs( 'reason', { 'reasonnum' => $self->reasonnum } );
+}
+
+=item reasontext
+
+Returns the text of the reason (see L<FS::reason>) associated with this
+cust_pkg_reason.
+
+=cut
+
+sub reasontext {
+ my $reason = shift->reason;
+ $reason ? $reason->reason : '';
+}
+
=back
=head1 BUGS