projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo in the package name caused a warning. Fixed.
[freeside.git]
/
FS
/
FS
/
type_pkgs.pm
diff --git
a/FS/FS/type_pkgs.pm
b/FS/FS/type_pkgs.pm
index
8e0d4ef
..
bf34e7c
100644
(file)
--- a/
FS/FS/type_pkgs.pm
+++ b/
FS/FS/type_pkgs.pm
@@
-35,6
+35,8
@@
FS::Record. The following fields are currently supported:
=over 4
=over 4
+=item typepkgnum - primary key
+
=item typenum - Agent type, see L<FS::agent_type>
=item pkgpart - Billing item definition, see L<FS::part_pkg>
=item typenum - Agent type, see L<FS::agent_type>
=item pkgpart - Billing item definition, see L<FS::part_pkg>
@@
-80,7
+82,8
@@
sub check {
my $self = shift;
my $error =
my $self = shift;
my $error =
- $self->ut_number('typenum')
+ $self->ut_numbern('typepkgnum')
+ || $self->ut_number('typenum')
|| $self->ut_number('pkgpart')
;
return $error if $error;
|| $self->ut_number('pkgpart')
;
return $error if $error;
@@
-91,14
+94,23
@@
sub check {
return "Unknown pkgpart"
unless qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } );
return "Unknown pkgpart"
unless qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } );
- ''; #no error
+ $self->SUPER::check;
}
}
-=back
+=item part_pkg
+
+Returns the FS::part_pkg object associated with this record.
+
+=cut
-=head1 VERSION
+sub part_pkg {
+ my $self = shift;
+ qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } );
+}
-$Id: type_pkgs.pm,v 1.1 1999-08-04 09:03:53 ivan Exp $
+=cut
+
+=back
=head1 BUGS
=head1 BUGS