<%= stylesheet_link_tag 'application' , :media => "all" %>
<%= stylesheet_link_tag 'wk-time', :plugin => "redmine_wktime" %>

<style type="text/css">		
		.tbl-report{
			width : 2200px;
			table-layout: fixed; !important;
			word-wrap: break-word; !important;
			text-align: center; 
			margin-top:5px; margin-bottom:10px; padding-left: 10px; color:#333333;
			font-family:Verdana, sans-serif; font-size:12px; 
		}
 </style>
<% if !data[:userlist].blank? %>
<div id="attn-rpt-dlg", style="overflow-x:auto;">
<table class="tbl-report" border="1" style="border-collapse:collapse;" cellspacing="0",frame="box">
 <caption style="text-align:left"><b><%= l(:label_wk_form_q) %><br><%= l(:label_wk_register_for_shops) %></b></br>
 <b><%= l(:label_wk_name_address) %>:</b> <%= Setting.app_title %>
 <b><%= l(:label_month) %>:</b> <%= data[:month]%>
 <b><%= l(:label_year) %>:</b> <%= data[:year]%></caption>
<thead bgcolor="#e6e6e6">
<tr>
<th rowspan="2" width="25px"><%= l(:label_attn_sl_no) %></th>
<th rowspan="2" width="150px"><%= l(:field_user) %></th>
<th rowspan="2" width="80px"><%= l(:label_date_of_entry_into_service) %></th>
<th rowspan="2" width="80px"><%= l(:label_age)+ " / " +l(:label_wk_attn_user_dob) %></th>
<th rowspan="2" width="80px"><%= l(:label_wk_designation) %></th> 
<th colspan="3" width="140px"><%= l(:label_leave_beginning_of_mnth) %></th>
<th colspan="3" width="140px"><%= l(:label_leave_during_mnth) %></th>
<th colspan="3" width="140px"><%= l(:label_wk_leave)+" "+l(:wk_field_balance)  %></th>
<th colspan="31" width="1300px"><%= l(:label_daily_workdone_inclede_ot) %></th>
<th rowspan="2" width="45px"><%= l(:label_total_hours_ot) %></th>
<th rowspan="2" width="45px"><%= l(:label_total_hours_during_mnth) %></th>
<th rowspan="2" width="45px"><%= l(:label_total_no_of_maternity_leave) %></th>
<th rowspan="2" width="25px"><%= l(:label_attn_sl_no) %></th>
</tr>
<tr>
<th ><%= data[:shortName][data[:headIssueId][0].to_i] %></th>
<th ><%= data[:shortName][data[:headIssueId][1].to_i] %></th>
<th ><%= data[:shortName][data[:headIssueId][2].to_i] %></th>
<th ><%= data[:shortName][data[:headIssueId][0].to_i] %></th>
<th ><%= data[:shortName][data[:headIssueId][1].to_i] %></th>
<th ><%= data[:shortName][data[:headIssueId][2].to_i] %></th>
<th ><%= data[:shortName][data[:headIssueId][0].to_i] %></th>
<th ><%= data[:shortName][data[:headIssueId][1].to_i] %></th>
<th ><%= data[:shortName][data[:headIssueId][2].to_i] %></th>
<% for i in 1..31%>
	<th><%= i %></th>
<% end -%>
</tr>
</thead>
<tbody>
<%
	showSlno = false #if Setting.plugin_redmine_wktime['wktime_attn_employee_id_cf'].blank? || Setting.plugin_redmine_wktime['wktime_attn_employee_id_cf'].to_i == 0
%>
<% data[:user_data].each do |key, entry| -%>
<tr class="<%= cycle("odd", "even") %>">
<%if showSlno %>
	<td class="lbl-txt-align"><%= index+1 %></td>
<%else%>
	<td class="lbl-txt-align"><%= entry['employee_id'] %></td>
<%end%>
<td class="lbl-txt-align"><%= entry['name'] %></td>
<td class="lbl-txt-align"><%= entry['join_date'] %></td>
<td class="lbl-txt-align"><%= entry['birth_date'] %></td>
<td class="lbl-txt-align"><%= entry['designation'] %></td>
<td ><%= entry['balance1'] %></td>
<td ><%= entry['balance2'] %></td>
<td ><%= entry['balance3'] %></td>
<td ><%= entry['used1'] %></td>
<td ><%= entry['used2'] %></td>
<td ><%= entry['used3'] %></td>
<td ><%= entry['accrual1']%></td>
<td ><%= entry['accrual2'] %></td>
<td ><%= entry['accrual3'] %></td>
<% for i in 0..30 %>
	<td class="fixed"><%= entry['date'][i] %></td>
<% end -%>
<td class="lbl-txt-align"><%= "" %></td>
<td class="lbl-txt-align"><%= entry['totalhours'] %></td>
<td class="lbl-txt-align"><%= "" %></td>
<%if showSlno %>
	<td class="lbl-txt-align"><%= index+1 %></td>
<%else%>
	<td class="lbl-txt-align"><%= entry['employee_id'] %></td>
<%end%>
</tr>
<% end -%>
</tbody>
</table>
</div>
<% else %>
	<label><b><%= l(:label_no_data) %></b></label>
<% end -%>