<%= render "layouts/portlet-config" %> <%= render "layouts/theme-panel" %> <%= render "layouts/breadcrumbs" %>
<% if flash[:error] %>
× <%= flash[:error] %>
<% end %> <%= form_tag({:action=>'create'} ,:multipart=>true,:id=>:myforms ) do %>
<% if @mymonths.to_i <=0 @mymonths = @myCurrentMonth end %>
<% end %>
<% months = 0 myyears = 0 if @mymonths.to_i months = @mymonths.to_i else months = @myCurrentMonth end myyears = @currentYear numbermonths = get_total_days_of_month(months,myyears) %>
<% for k in 1..numbermonths do %> <% end %> <% if numbermonths.to_i ==30 %> <% elsif numbermonths.to_i ==28 %> <% elsif numbermonths.to_i ==29 %> <% end %> <% i = 1 if @AttendanceList && @AttendanceList.length >0 @AttendanceList.each do |newattd| sewdar = "" lds_profile = "" desicode = "" department = "" oldsewadar = "" sw_catgeory = "" location = "" sewnmaesobj = get_mysewdar_list_details(newattd.al_empcode) if sewnmaesobj lds_profile = sewnmaesobj.sw_image sewdar = sewnmaesobj.sw_sewadar_name desicode = sewnmaesobj.sw_desigcode oldsewadar = sewnmaesobj.sw_oldsewdarcode sw_gender = sewnmaesobj.sw_gender sw_catgeory = sewnmaesobj.sw_catgeory dobs = sewnmaesobj.sw_date_of_birth deprtobj = get_all_department_detail(sewnmaesobj.sw_depcode) if deprtobj department = deprtobj.departDescription end locobj = get_location_detail(sewnmaesobj.sw_location) if locobj location = locobj.hof_description end end desiname = "" sewdesobj = get_sewdar_designation_detail(desicode) if sewdesobj desiname = sewdesobj.ds_description end %> <% end %> <% tholidy = hl.to_i nebsents = absent.to_i+lwp.to_i tpaidays = presents.to_i+hl.to_i+wo.to_i+lp.to_i workhrs = find_actual_hours_minuts(whrsfirst,whrsmnsfirst) ovhrs = find_actual_hours_minuts(ovhrsfirst,ovhrsmnsfirst) %> <% i +=1 end else %> <% end %>
Srl.No Pay Code/ Card no
Name/Desg/Dept/Location
Date<%=k%>
<%=get_week_days(k,months,myyears)%>
31
29
30
31
30
31
Days/Payable Total
<%=i%> <%=newattd.al_empcode%>
<%=sewdar%>
<%=desiname%>
<%=department%>
<%=location%>
Shift
IN
Out
Hours
OT
Status <% whrsfirst = 0 whrsmnsfirst = 0 ovhrsfirst = 0 ovhrsmnsfirst = 0 presents = 0 absent = 0 wo = 0 ## wekkly off hl = 0 ## holiday lwp = 0 ## leave withoy pay lp = 0 ## leave with pay hlfd = 0 ## half days tpaidays = 0 adysobj = get_perday_attendance(newattd.al_empcode,'',months,myyears) for c in 1..31 do %>
<% if adysobj && adysobj.length >0 adysobj.each do |newitem| vartest = newitem.al_arrtime if newitem.al_empcode.to_s == newattd.al_empcode && newitem.days.to_i==c if c == 4 if newitem.al_arrtime !=nil && newitem.al_arrtime !='' # die end end shift = newitem.al_shift timein = newitem.al_arrtime timeout = newitem.all_deptime othrs = newitem.al_overtime ppstatus = newitem.al_presabsent workhrs = newitem.al_workhrs mystatus = ppstatus.to_s presents += newitem.al_present.to_f absent += newitem.al_absent.to_f lp += newitem.al_paidleave.to_f lwp += newitem.al_unpaidleave.to_f mymipunch = "" if newitem.al_arrtime.to_s.gsub(":",".").to_f >0 && newitem.all_deptime.to_s.gsub(":",".").to_f<=0 mymipunch = "*" end if ppstatus.to_s=='WO' wo +=1 end if ppstatus.to_s=='AP' || ppstatus.to_s=='PA' || ppstatus.to_s=='LP' || ppstatus.to_s=='PL' hlfd +=1 end if ppstatus.to_s=='HL' hl +=1 end ######## HRS & MNS & OVT SUM ######### whrsfirst += get_calculated_hours_minute(workhrs,'H').to_f whrsmnsfirst += get_calculated_hours_minute(workhrs,'M').to_f ovhrsfirst += get_calculated_hours_minute(othrs,'H').to_f ovhrsmnsfirst += get_calculated_hours_minute(othrs,'M').to_f ########## END HRS & OVT CALC ########### htmls = shift.to_s+"
"+timein.to_s+"
"+timeout.to_s+"
"+workhrs.to_s+"
"+othrs.to_s+"
"+mystatus.to_s+mymipunch.to_s %> <%=htmls.to_s.html_safe%> <% end end end %>
Present  <%=presents%>
Absent+LWP  <%=nebsents%>
Holiday  <%=tholidy%>
WO  <%=wo%>
Leave  <%=lp%>
Half Days  <%=hlfd%>
PYD  <%=tpaidays%>
Whrs  <%=workhrs%>
OVT  <%=ovhrs%>
No record(s) found.