X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Ftimeworked.html;h=a0cf7437160819fa4060f75a5fe6600392313e24;hp=ac5996087540351bcd06f69165705df342ab7cbb;hb=7d80f005462758e0271215240cdf99a9336f03dd;hpb=f481fcc27b20d1a3aee48a613a52395e7cffd871 diff --git a/httemplate/misc/timeworked.html b/httemplate/misc/timeworked.html index ac5996087..a0cf74371 100755 --- a/httemplate/misc/timeworked.html +++ b/httemplate/misc/timeworked.html @@ -1,76 +1,95 @@ <% include('/elements/header.html', $title, '' ) %> -% if ( $cgi->param('error') ) { - Error: <% $cgi->param('error') %> -

-% } +<% include('/elements/error.html') %>
- - - - - - - - - - - - - - - - - - - - -% foreach my $tr_id ( keys %ticketmap ) { -% my (@customers) = @{$customers{$ticketmap{$tr_id}}}; -% next unless @customers; -% my $multiplier = sprintf("%.2f", 1/@customers); -% my ($custnum, $name) = split(':', pop @customers, 2); -% my $link = $p. 'rt/Ticket/Display.html?id='. $ticketmap{$tr_id}. -% '#txn-'. $tr_id; - - - - - - - - - - - -% foreach ( @customers ) { -% ($custnum, $name) = split(':', $_, 2); - - - - - - - -% } -% } + + + + + + + + + + + +% foreach my $tr_id ( keys %ticketmap ) { +% my (@customers) = @{$customers{$ticketmap{$tr_id}}}; +% next unless @customers; +% my $default_multiplier = sprintf("%.2f", 1/@customers); +% 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; + + + + + +% my $seconds = 0; +% if ( $cgi->param("seconds$tr_id") =~ /^(\d+)$/ ) { +% $seconds = $1; +% } + + + + + + + +% foreach ( @customers ) { +% ($custnum, $name) = split(':', $_, 2); +% $clink = $p. 'view/cust_main.cgi?'. $custnum; + + + + + + + + +% } +% } + +
TransTicketTimeCustomerMultiplier
##Subjecthours#Name
<% $tr_id %><% $ticketmap{$tr_id} %><% $ticket{$ticketmap{$tr_id}} %><% sprintf("%0.2f", $cgi->param("seconds$tr_id")/3600) %><% $custnum %><% $name %> - - " > - param("multiplier${_}_$custnum") : $multiplier %>" > -
<% $custnum %><% $name %> - param("multiplier${tr_id}_$custnum") : $multiplier %>" > -
TicketHoursCustomerMultiplier
<% $ticketmap{$tr_id} %><% $ticket{$ticketmap{$tr_id}} |h %><% sprintf("%0.2f", $seconds/3600) %><% $custnum %><% $name %> + + + +% my $multiplier = $default_multiplier; +% my $mult_paramname = "multiplier${tr_id}_$custnum"; +% if ( $cgi->param($mult_paramname) =~ /^\s*([\d\.]+)\s*$/ ) { +% $multiplier = $1; +% } + + +
<% $custnum %><% $name %> + +% $multiplier = $default_multiplier; +% $mult_paramname = "multiplier${tr_id}_$custnum"; +% if ( $cgi->param($mult_paramname) =~ /^\s*([\d\.]+)\s*$/ ) { +% $multiplier = $1; +% } + + + +
+
+ + + + +
- - + +<% include('/elements/footer.html') %> <%init> @@ -79,8 +98,7 @@ die "access denied" my(%ticketmap, %ticket, %customers); my $title = 'Assign Time Worked'; - -RT::Init(); +tie %ticketmap, 'Tie::IxHash'; my $CurrentUser = RT::CurrentUser->new(); $CurrentUser->LoadByName($FS::CurrentUser::CurrentUser->username);