X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Ftimeworked.html;h=24a0f5d40fe9f48f42820ec24c80b8c903c32ec8;hb=7733d727907d15271602cb28c5e32afb288220dd;hp=b0eadc42e5915b75f01e95e46367c2ee7d795325;hpb=fbb0b64be7d4b8e44d87d15b3a55bee57c000331;p=freeside.git diff --git a/httemplate/misc/timeworked.html b/httemplate/misc/timeworked.html index b0eadc42e..24a0f5d40 100755 --- a/httemplate/misc/timeworked.html +++ b/httemplate/misc/timeworked.html @@ -8,22 +8,11 @@ - Trans Ticket - Time + Hours Customer Multiplier - - - # - # - Subject - hours - # - Name - - @@ -35,9 +24,9 @@ % my ($custnum, $name) = split(':', pop @customers, 2); % my $link = $p. 'rt/Ticket/Display.html?id='. $ticketmap{$tr_id}. % '#txn-'. $tr_id; +% my $clink = $p. 'view/cust_main.cgi?'. $custnum; - <% $tr_id %> <% $ticketmap{$tr_id} %> <% $ticket{$ticketmap{$tr_id}} |h %> @@ -47,14 +36,14 @@ % } <% sprintf("%0.2f", $seconds/3600) %> - <% $custnum %> - <% $name %> + <% $custnum %> + <% $name %> % my $multiplier = $default_multiplier; -% my $mult_paramname = "multiplier${tr_id}_$custnum" +% my $mult_paramname = "multiplier${tr_id}_$custnum"; % if ( $cgi->param($mult_paramname) =~ /^\s*([\d\.]+)\s*$/ ) { % $multiplier = $1; % } @@ -65,10 +54,11 @@ % foreach ( @customers ) { % ($custnum, $name) = split(':', $_, 2); +% $clink = $p. 'view/cust_main.cgi?'. $custnum; - <% $custnum %> - <% $name %> + <% $custnum %> + <% $name %> % $multiplier = $default_multiplier; @@ -92,10 +82,14 @@
+ + + + - - + +<% include('/elements/footer.html') %> <%init> @@ -106,8 +100,6 @@ my(%ticketmap, %ticket, %customers); my $title = 'Assign Time Worked'; tie %ticketmap, 'Tie::IxHash'; -RT::Init(); - my $CurrentUser = RT::CurrentUser->new(); $CurrentUser->LoadByName($FS::CurrentUser::CurrentUser->username); @@ -121,12 +113,15 @@ foreach my $id ( map { /^transactionid(\d+)$/; $1; } $ticket->Load($ticketmap{$id}); $ticket{$ticketmap{$id}} = $ticket->Subject; $customers{$ticketmap{$id}} = - [ map { $_->Resolver->AsString } - grep { $_->Resolver->{'fstable'} eq 'cust_main' } - grep { $_->Scheme eq 'freeside' } - map { $_->TargetURI } - @{ $ticket->_Links('Base')->ItemsArrayRef } - ]; + [ map { $_->Resolver->AsString } + grep { $_->Resolver->{'fstable'} eq 'cust_main' } + grep { $_->Scheme eq 'freeside' } + map { $_->TargetURI } + grep { $_->BaseURI->Scheme eq 'fsck.com-rt' + && $_->BaseURI->Resolver->ObjectType eq 'ticket' + } + @{ $ticket->_Links('Base')->ItemsArrayRef } + ]; } }