summaryrefslogtreecommitdiff
path: root/FS/FS/svc_Common.pm
diff options
context:
space:
mode:
authorivan <ivan>2001-09-06 20:42:00 +0000
committerivan <ivan>2001-09-06 20:42:00 +0000
commit57d69d5c1f98f778a0df82795ce21ee7bd21042a (patch)
tree63f890cf25311b66c712933c84f64e43718039cd /FS/FS/svc_Common.pm
parentdb1b6ebfe35aba1f4d2580b13a0a74ac317784ba (diff)
finally fix part_svc!!!
Diffstat (limited to 'FS/FS/svc_Common.pm')
-rw-r--r--FS/FS/svc_Common.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm
index bc5b75640..c47cdbf8f 100644
--- a/FS/FS/svc_Common.pm
+++ b/FS/FS/svc_Common.pm
@@ -164,9 +164,11 @@ sub setx {
return "Unkonwn svcpart" unless $part_svc;
#set default/fixed/whatever fields from part_svc
- foreach my $field ( fields('svc_acct') ) {
- if ( $part_svc->getfield('svc_acct__'. $field. '_flag') eq $x ) {
- $self->setfield( $field, $part_svc->getfield('svc_acct__'. $field) );
+ my $table = $self->table;
+ foreach my $field ( grep { $_ ne 'svcnum' } fields($table) ) {
+ my $part_svc_column = $part_svc->part_svc_column($field);
+ if ( $part_svc_column->columnflag eq $x ) {
+ $self->setfield( $field, $part_svc_column->columnvalue );
}
}
@@ -193,7 +195,7 @@ sub cancel { ''; }
=head1 VERSION
-$Id: svc_Common.pm,v 1.4 2001-04-22 00:49:30 ivan Exp $
+$Id: svc_Common.pm,v 1.5 2001-09-06 20:41:59 ivan Exp $
=head1 BUGS