projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT#24684: Payments for Online Bill Pay
[freeside.git]
/
FS
/
FS
/
pkg_svc.pm
diff --git
a/FS/FS/pkg_svc.pm
b/FS/FS/pkg_svc.pm
index
065ddbe
..
4efffd9
100644
(file)
--- a/
FS/FS/pkg_svc.pm
+++ b/
FS/FS/pkg_svc.pm
@@
-1,12
+1,7
@@
package FS::pkg_svc;
package FS::pkg_svc;
+use base qw(FS::Record);
use strict;
use strict;
-use vars qw( @ISA );
-use FS::Record qw( qsearchs );
-use FS::part_pkg;
-use FS::part_svc;
-
-@ISA = qw( FS::Record );
=head1 NAME
=head1 NAME
@@
-50,6
+45,8
@@
definition includes
=item primary_svc - primary flag, empty or 'Y'
=item primary_svc - primary flag, empty or 'Y'
+=item hidden - 'Y' to hide this service on invoices, null otherwise.
+
=back
=head1 METHODS
=back
=head1 METHODS
@@
-82,7
+79,9
@@
returns the error, otherwise returns false.
=cut
sub replace {
=cut
sub replace {
- my ( $new, $old ) = ( shift, shift );
+ my( $new, $old ) = ( shift, shift );
+
+ $old = $new->replace_old unless defined($old);
return "Can't change pkgpart!" if $old->pkgpart != $new->pkgpart;
return "Can't change svcpart!" if $old->svcpart != $new->svcpart;
return "Can't change pkgpart!" if $old->pkgpart != $new->pkgpart;
return "Can't change svcpart!" if $old->svcpart != $new->svcpart;
@@
-107,6
+106,7
@@
sub check {
|| $self->ut_number('pkgpart')
|| $self->ut_number('svcpart')
|| $self->ut_number('quantity')
|| $self->ut_number('pkgpart')
|| $self->ut_number('svcpart')
|| $self->ut_number('quantity')
+ || $self->ut_enum('hidden', [ '', 'Y' ] )
;
return $error if $error;
;
return $error if $error;
@@
-125,24
+125,10
@@
sub check {
Returns the FS::part_pkg object (see L<FS::part_pkg>).
Returns the FS::part_pkg object (see L<FS::part_pkg>).
-=cut
-
-sub part_pkg {
- my $self = shift;
- qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } );
-}
-
=item part_svc
Returns the FS::part_svc object (see L<FS::part_svc>).
=item part_svc
Returns the FS::part_svc object (see L<FS::part_svc>).
-=cut
-
-sub part_svc {
- my $self = shift;
- qsearchs( 'part_svc', { 'svcpart' => $self->svcpart } );
-}
-
=back
=head1 BUGS
=back
=head1 BUGS