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;
} 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;
} elsif ( $svcdb eq 'svc_external' ) {
my $conf = new FS::Conf;
if ( $conf->config('svc_external-display_type') eq 'artera_turbo' ) {
- $tag = sprintf('%010d', $svc_x->id). '-'. sprintf('%010d', $svc_x->title);
+ $tag = sprintf('%010d', $svc_x->id). '-'.
+ substr('0000000000'.uc($svc_x->title), -10);
} else {
$tag = $svc_x->id. ': '. $svc_x->title;
}
}
-=item get_session_history_sqlradacct TIMESTAMP_START TIMESTAMP_END
+=item get_session_history TIMESTAMP_START TIMESTAMP_END
-See L<FS::svc_acct/get_session_history_sqlradacct>. Equivalent to
-$cust_svc->svc_x->get_session_history_sqlradacct, but more efficient.
-Meaningless for records where B<svcdb> is not "svc_acct".
+See L<FS::svc_acct/get_session_history>. Equivalent to
+$cust_svc->svc_x->get_session_history, but more efficient. Meaningless for
+records where B<svcdb> is not "svc_acct".
=cut
my @sessions = ();
foreach my $part_export ( @part_export ) {
- push @sessions, $part_export->usage_sessions( $start, $end, $self->svc_x );
+ push @sessions,
+ @{ $part_export->usage_sessions( $start, $end, $self->svc_x ) };
}
- \@sessions;
+ @sessions;
}