+=item void_access_user_name
+
+Returns the voiding employee name.
+
+=cut
+
+sub void_access_user_name {
+ my $self = shift;
+ my $user = $self->void_access_user;
+ return unless $user;
+ return $user->name;
+}
+
+=item void_reason
+
+Returns the text of the associated void credit reason (see L<FS::reason>) for this voided credit.
+
+The reason for the original credit remains accessible through the reason method.
+
+=cut
+
+sub void_reason {
+ my ($self, $value, %options) = @_;
+ my $reason_text;
+ if ( $self->void_reasonnum ) {
+ my $reason = FS::reason->by_key($self->void_reasonnum);
+ $reason_text = $reason->reason;
+ } else { # in case one of these somehow still exists
+ $reason_text = $self->get('void_reason');
+ }
+
+ return $reason_text;
+}
+
+# _upgrade_data
+#
+# Used by FS::Upgrade to migrate to a new database.
+sub _upgrade_data { # class method
+ my ( $class, %opts ) = @_;
+
+ warn "$me upgrading $class\n" if $DEBUG;
+
+ $class->_upgrade_reasonnum(%opts);
+}
+