if ( $new->svcpart != $old->svcpart ) {
my $svc_x = $new->svc_x;
my $new_svc_x = ref($svc_x)->new({$svc_x->hash, svcpart=>$new->svcpart });
+ local($FS::Record::nowarn_identical) = 1;
my $error = $new_svc_x->replace($svc_x);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
=item cust_pkg
-Returns the definition for this service, as a FS::part_svc object (see
-L<FS::part_svc>).
+Returns the package this service belongs to, as a FS::cust_pkg object (see
+L<FS::cust_pkg>).
=cut
- The name of this service (from part_svc)
- A meaningful identifier (username, domain, or mail alias)
- The table name (i.e. svc_domain) for this service
+- svcnum
=cut
} elsif ( $svcdb eq 'svc_domain' ) {
$tag = $svc_x->getfield('domain');
} elsif ( $svcdb eq 'svc_www' ) {
- my $domain_record = $svc_x->domain_record;
+ my $domain_record = $svc_x->domain_record(@_);
$tag = $domain_record->zone;
} elsif ( $svcdb eq 'svc_broadband' ) {
$tag = $svc_x->ip_addr;
my $conf = new FS::Conf;
if ( $conf->config('svc_external-display_type') eq 'artera_turbo' ) {
$tag = sprintf('%010d', $svc_x->id). '-'.
- uc( sprintf('%010x', hex($svc_x->title)) );
+ substr('0000000000'.uc($svc_x->title), -10);
} else {
$tag = $svc_x->id. ': '. $svc_x->title;
}
$tag = $svc_x->getfield('svcnum');
}
- $self->part_svc->svc, $tag, $svcdb;
+ $self->part_svc->svc, $tag, $svcdb, $self->svcnum;
}
my $svc_x = $self->svc_x;
- my @part_export = $self->part_svc->part_export('sqlradius');
- push @part_export, $self->part_svc->part_export('sqlradius_withdomain');
- die "no sqlradius or sqlradius_withdomain export configured for this".
- "service type"
+ my @part_export = $self->part_svc->part_export_usage;
+ die "no usage-capable export configured for this service type"
unless @part_export;
#or return undef;