my $attachnum = $1;
my $curuser = $FS::CurrentUser::CurrentUser;
-my $otaker = $curuser->name;
-$otaker = $curuser->username if ($otaker eq "User, Legacy");
my $delete = $cgi->param('delete');
my $undelete = $cgi->param('undelete');
attachnum => $attachnum,
custnum => $custnum,
_date => time,
- otaker => $otaker,
+ usernum => $curuser->usernum,
disabled => '',
});
my $old;
or die "Illegal notenum: ". $cgi->param('notenum');
my $notenum = $1;
-my $otaker = $FS::CurrentUser::CurrentUser->name;
-$otaker = $FS::CurrentUser::CurrentUser->username
- if ($otaker eq "User, Legacy");
-
my $new = new FS::cust_main_note ( {
notenum => $notenum,
custnum => $custnum,
_date => time,
- otaker => $otaker,
- comments => $cgi->param('comment'),
+ usernum => $FS::CurrentUser::CurrentUser->usernum,
+ comments => scalar($cgi->param('comment')),
} );
my $error;
<TR>
<% note_datestr($attach,$conf,$bgcolor) %>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- <% $attach->otaker%>
+ <% $attach->usernum ? $attach->access_user->name : $attach->otaker %>
</TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
<% $attach->filename %>
<TR>
<% note_datestr($note,$conf,$bgcolor) %>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- <% $note->otaker%>
+ <% $note->usernum ? $note->access_user->name : $note->otaker %>
</TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
<% $note->comments | defang %>