summaryrefslogtreecommitdiff
path: root/FS/FS/sales_pkg_class.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/sales_pkg_class.pm')
-rw-r--r--FS/FS/sales_pkg_class.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/FS/FS/sales_pkg_class.pm b/FS/FS/sales_pkg_class.pm
index 0fb7e86..90867a8 100644
--- a/FS/FS/sales_pkg_class.pm
+++ b/FS/FS/sales_pkg_class.pm
@@ -2,7 +2,7 @@ package FS::sales_pkg_class;
use base qw( FS::Record );
use strict;
-#use FS::Record qw( qsearch qsearchs );
+use FS::Record qw( qsearchs ); # qsearch qsearchs );
use FS::sales;
use FS::pkg_class;
@@ -110,6 +110,17 @@ sub check {
$self->SUPER::check;
}
+sub pkg_class {
+ my $self = shift;
+ qsearchs('pkg_class', { 'classnum' => $self->classnum });
+}
+
+sub classname {
+ my $self = shift;
+ my $pkg_class = $self->pkg_class;
+ $pkg_class ? $pkg_class->classname : '(no package class)';
+}
+
=back
=head1 BUGS