projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
support multiple primary keys
[freeside.git]
/
FS
/
FS
/
pkg_svc.pm
diff --git
a/FS/FS/pkg_svc.pm
b/FS/FS/pkg_svc.pm
index
2ac1a55
..
065ddbe
100644
(file)
--- a/
FS/FS/pkg_svc.pm
+++ b/
FS/FS/pkg_svc.pm
@@
-39,6
+39,8
@@
FS::Record. The following fields are currently supported:
=over 4
=over 4
+=item pkgsvcnum - primary key
+
=item pkgpart - Billing item definition (see L<FS::part_pkg>)
=item svcpart - Service definition (see L<FS::part_svc>)
=item pkgpart - Billing item definition (see L<FS::part_pkg>)
=item svcpart - Service definition (see L<FS::part_svc>)
@@
-46,6
+48,8
@@
FS::Record. The following fields are currently supported:
=item quantity - Quantity of this service definition that this billing item
definition includes
=item quantity - Quantity of this service definition that this billing item
definition includes
+=item primary_svc - primary flag, empty or 'Y'
+
=back
=head1 METHODS
=back
=head1 METHODS
@@
-99,7
+103,8
@@
sub check {
my $error;
$error =
my $error;
$error =
- $self->ut_number('pkgpart')
+ $self->ut_numbern('pkgsvcnum')
+ || $self->ut_number('pkgpart')
|| $self->ut_number('svcpart')
|| $self->ut_number('quantity')
;
|| $self->ut_number('svcpart')
|| $self->ut_number('quantity')
;
@@
-108,6
+113,11
@@
sub check {
return "Unknown pkgpart!" unless $self->part_pkg;
return "Unknown svcpart!" unless $self->part_svc;
return "Unknown pkgpart!" unless $self->part_pkg;
return "Unknown svcpart!" unless $self->part_svc;
+ if ( $self->dbdef_table->column('primary_svc') ) {
+ $error = $self->ut_enum('primary_svc', [ '', 'Y' ] );
+ return $error if $error;
+ }
+
$self->SUPER::check;
}
$self->SUPER::check;
}
@@
-135,10
+145,6
@@
sub part_svc {
=back
=back
-=head1 VERSION
-
-$Id: pkg_svc.pm,v 1.4 2003-08-05 00:20:45 khoff Exp $
-
=head1 BUGS
=head1 SEE ALSO
=head1 BUGS
=head1 SEE ALSO