<%= 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 @AttendanceList && @AttendanceList.length >0 %>
Post Data
<% 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) %>
<% 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 %> <% whrsfirst = 0 whrsmnsfirst = 0 ovhrsfirst = 0 ovhrsmnsfirst = 0 presents = 0 absent = 0 wo = 0 ## weekly off hl = 0 ## holiday lwp = 0 ## leave withoy pay lp = 0 ## leave with pay hlfd = 0 ## half days nebsents = 0 tholidy = 0 latecount = 0 earlycount = 0 mispuchcount = 0 mypaiddays = 0 adysobj = get_perday_attendance(newattd.al_empcode,'',@fromdate,@uptodate) for c in 1..31 do if adysobj && adysobj.length >0 adysobj.each do |newitem| if newitem.al_empcode.to_s == newattd.al_empcode && newitem.days.to_i==c 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 if newitem.al_arrtime.to_s.gsub(":",".").to_f >0 && newitem.all_deptime.to_s.gsub(":",".").to_f <=0 mispuchcount +=1 end if newitem.al_latehrs.to_s.gsub(":",".").to_f >0 latecount +=1 end if newitem.al_earlhrs.to_s.gsub(":",".").to_f >0 earlycount +=1 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 HRMS ###################### end end end end %> <% tholidy = hl.to_i nebsents = absent.to_f+lwp.to_f mypaiddays = presents.to_f+hl.to_f+wo.to_f+lp.to_f totaldays = mypaiddays.to_f+nebsents.to_f workhrs = find_actual_hours_minuts(whrsfirst,whrsmnsfirst) ovhrs = find_actual_hours_minuts(ovhrsfirst,ovhrsmnsfirst) %> <% i +=1 end else %> <% end %>
SL.No. Code Name Department Present Absent+LWP Holiday Weekly Off Leave Paid Days Late Early Total Days Mis Punch
<%=i%> <%=newattd.al_empcode%> <%=sewdar%> <%=department%> <%=presents%> <%=nebsents%> <%=tholidy%> <%=wo%> <%=lp%> <%=mypaiddays%> <%=latecount%> <%=earlycount%> <%=totaldays%> <%=mispuchcount%>
No record(s) found.
<% end %>