projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 82955 Fix egc_truncate error in FS::pay_batch::paymentech
[freeside.git]
/
FS
/
FS
/
type_pkgs.pm
diff --git
a/FS/FS/type_pkgs.pm
b/FS/FS/type_pkgs.pm
index
bf34e7c
..
8cc2345
100644
(file)
--- a/
FS/FS/type_pkgs.pm
+++ b/
FS/FS/type_pkgs.pm
@@
-1,12
+1,7
@@
package FS::type_pkgs;
package FS::type_pkgs;
+use base qw( FS::Record );
use strict;
use strict;
-use vars qw( @ISA );
-use FS::Record qw( qsearchs );
-use FS::agent_type;
-use FS::part_pkg;
-
-@ISA = qw( FS::Record );
=head1 NAME
=head1 NAME
@@
-83,17
+78,11
@@
sub check {
my $error =
$self->ut_numbern('typepkgnum')
my $error =
$self->ut_numbern('typepkgnum')
- || $self->ut_
number('typenum'
)
- || $self->ut_
number('pkgpart'
)
+ || $self->ut_
foreign_key('typenum', 'agent_type', 'typenum'
)
+ || $self->ut_
foreign_key('pkgpart', 'part_pkg', 'pkgpart'
)
;
return $error if $error;
;
return $error if $error;
- return "Unknown typenum"
- unless qsearchs( 'agent_type', { 'typenum' => $self->typenum } );
-
- return "Unknown pkgpart"
- unless qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } );
-
$self->SUPER::check;
}
$self->SUPER::check;
}
@@
-101,12
+90,9
@@
sub check {
Returns the FS::part_pkg object associated with this record.
Returns the FS::part_pkg object associated with this record.
-=
cut
+=
item agent_type
-sub part_pkg {
- my $self = shift;
- qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } );
-}
+Returns the FS::agent_type object associated with this record.
=cut
=cut
@@
-116,7
+102,7
@@
sub part_pkg {
=head1 SEE ALSO
=head1 SEE ALSO
-L<FS::Record>, L<FS::agent_type>, L<FS::part_pkg
s
>, schema.html from the base
+L<FS::Record>, L<FS::agent_type>, L<FS::part_pkg>, schema.html from the base
documentation.
=cut
documentation.
=cut