<%= render "layouts/portlet-config" %> <%= render "layouts/theme-panel" %> <% if flash[:error] %>
× <%= flash[:error] %>
<% end %> <%= render "layouts/breadcrumbs" %>
 
<%= form_tag({:action=>'create'} ,:multipart=>true,:id=>'myForms' ) do %>
 
 
Employee
From Date
Upto Date
Department


checked="checked"<% elsif @processdetail ==nil %>checked="checked"<% end %> name="radiodetail" id="radiodetail1" value="DTL"/>Detail checked="checked"<% end %> value="SMRY"/>Summary
<% if @listAttend && @listAttend.length >0 %> <% @myEditAld = true @myDeletAld = true presents = 0 absent = 0 workhrct = 0 latect = 0 earlyct = 0 othrsct = 0 fwkhrs = 0 fwkmns = 0 fovthrs = 0 fovtmns = 0 lateplhrs = 0 lateplmns = 0 pagestart = params[:page] ? params[:page] : 1 if pagestart.to_i <=1 i = 1 else i = ((pagestart.to_i-1)*25)+1 i = i.to_i end if @listAttend && @listAttend.length >0 @listAttend.each do |gps| %> <% departname = "" desnation = "" empname = "" empobj = get_employee_detail(gps.al_compcode,gps.al_empcode) if empobj empname = empobj.emp_name dpobj = get_department_detail(empobj.emp_compcode,empobj.emp_department) if dpobj departname = dpobj.dp_name end desobj = get_designation_detail(empobj.emp_compcode,empobj.emp_designation) if desobj desnation = desobj.mydescript end end if gps.al_presabsent == 'P' presents += 1 end if gps.al_presabsent == 'A' absent +=1 end if gps.al_workhrs !=nil && gps.al_workhrs != '' newkhrs = get_calculated_hours_minute(gps.al_workhrs,'H') newmnts = get_calculated_hours_minute(gps.al_workhrs,'M') fwkhrs += newkhrs.to_i fwkmns += newmnts.to_i end if gps.al_latehrs != nil && gps.al_latehrs !='' nlates = gps.al_latehrs.to_s.gsub(":",".") if nlates.to_f >0 latect +=1 end end if gps.al_earlhrs != nil && gps.al_earlhrs !='' erlys = gps.al_earlhrs.to_s.gsub(":",".") if erlys.to_f >0 earlyct +=1 end end if gps.al_overtime !=nil && gps.al_overtime != '' ovthrs = get_calculated_hours_minute(gps.al_overtime,'H') ovtmns = get_calculated_hours_minute(gps.al_overtime,'M') fovthrs += ovthrs.to_i fovtmns += ovtmns.to_i end if gps.al_latepelanty != nil && gps.al_latepelanty != '' lateplhrsf = get_calculated_hours_minute(gps.al_latepelanty,'H') lateplmnsf = get_calculated_hours_minute(gps.al_latepelanty,'M') lateplhrs += lateplhrsf.to_i lateplmns += lateplmnsf.to_i end %> <% i +=1 end %> <% else %> <% end %>
SL No. Emp.Code Name Department Date Shift Code Arrival Time Departure Time Working Hrs Late Hrs Early Hrs OT Miss punch Late Penalty Remark
<%=i%> <%=gps.al_empcode%> <%=empname%> <%=departname%> <%=formatted_date(gps.al_trandate)%> <%=gps.al_shift%> <%=gps.al_arrtime%> <%=gps.all_deptime%> <%=gps.al_workhrs%> <%=gps.al_latehrs%> <%=gps.al_earlhrs%> <%=gps.al_overtime%> <%=gps.al_misspunch%> <%=gps.al_latepelanty.to_s.gsub(":",".")%> <% if gps.al_presabsent == 'P' %> Present <% elsif gps.al_presabsent == 'A' %> Absent <% elsif gps.al_presabsent == 'HD' %> Half Day <% elsif gps.al_presabsent == 'HL' %> Holiday <% elsif gps.al_presabsent == 'WO' %> Week Off <% end %>
Total Present : <%=presents%> Absent :  <%=absent%> <% wrkshrs = 0 if fwkmns.to_i >=60 nwhs = fwkmns.to_f/60 nwhs = currency_formatted(nwhs) wrkshrs = fwkhrs.to_f+nwhs.to_f else wrkshrs = fwkhrs.to_s+":"+fwkmns.to_s end %> Working Hrs :  <%=wrkshrs%> Late :  <%=latect%> Early :  <%=earlyct%> <% ovtiems = 0 if fovtmns.to_i >=60 novtmns = fovtmns.to_f/60 novtmns = currency_formatted(novtmns) ovtiems = fovthrs.to_f+novtmns.to_f else ovtiems = fovthrs.to_s+":"+fovtmns.to_s end %> OT Hrs : <%=ovtiems%> <% ltspenty = 0 if lateplmns.to_i >=60 nlpts = lateplmns.to_f/60 nlpts = currency_formatted(nlpts) ltspenty = lateplhrs.to_f+nlpts.to_f ltspenty = ltspenty #.to_s.gsub(".",":") else ltspenty = lateplhrs.to_s+"."+lateplmns.to_s end %> LPT : <%=ltspenty%>
No Records Found
<% end %> <% if @SummListed && @SummListed.length >0 %> <% @myEditAld = true @myDeletAld = true myxpresents = 0 myxabsent = 0 myxlatect = 0 myxearlyct = 0 mytotalwkhrs = 0 mytotalwkmns = 0 mytotalovthrs = 0 mytotalovtmns = 0 mytotalplhrs = 0 mytotalplmns = 0 pagestart = params[:page] ? params[:page] : 1 if pagestart.to_i <=1 i = 1 else i = ((pagestart.to_i-1)*25)+1 i = i.to_i end if @SummListed && @SummListed.length >0 @SummListed.each do |gps| %> <% departname = "" desnation = "" empname = "" empobj = get_employee_detail(gps.al_compcode,gps.al_empcode) if empobj empname = empobj.emp_name dpobj = get_department_detail(empobj.emp_compcode,empobj.emp_department) if dpobj departname = dpobj.dp_name end desobj = get_designation_detail(empobj.emp_compcode,empobj.emp_designation) if desobj desnation = desobj.mydescript end end sumpresents = get_all_counts(gps.al_empcode,'P') sumabsent = get_all_counts(gps.al_empcode,'A') sumlatect = get_all_counts(gps.al_empcode,'L') sumearlyct = get_all_counts(gps.al_empcode,'E') myxpresents += sumpresents.to_i myxabsent += sumabsent.to_i myxlatect += sumlatect.to_i myxearlyct += sumearlyct.to_i myxwkhrs = 0 if gps.workinghrs !=nil && gps.workinghrs != '' newwrktimes = gps.workinghrs.to_s.split(",") myfwkhrs = 0 myfwkmns = 0 newwrktimes.each do |newmtimes| newkhrsx = get_calculated_hours_minute(newmtimes,'H') newmntsx = get_calculated_hours_minute(newmtimes,'M') myfwkhrs += newkhrsx.to_i myfwkmns += newmntsx.to_i mytotalwkhrs += newkhrsx.to_i mytotalwkmns += newmntsx.to_i end if myfwkmns.to_i >=60 newmywkmns = myfwkmns.to_f/60 myxwkhrs = myfwkhrs.to_f+newmywkmns.to_f myxwkhrs = myxwkhrs.to_s.gsub(".",":") else myxwkhrs = myfwkhrs.to_s+":"+myfwkmns.to_s end end myfinalovtime = 0 if gps.ovrtimes != nil && gps.ovrtimes != '' newovtimes = gps.ovrtimes.to_s.split(",") myfovthrs = 0 myfovtmns = 0 newovtimes.each do |mynewovertm| ovthrsx = get_calculated_hours_minute(mynewovertm,'H') ovtmnsx = get_calculated_hours_minute(mynewovertm,'M') myfovthrs += ovthrsx.to_i myfovtmns += ovtmnsx.to_i mytotalovthrs += ovthrsx.to_i mytotalovtmns += ovtmnsx.to_i end if myfovtmns.to_i >=60 myovnstm = myfovtmns.to_f/60 myfinalovtime = myfovthrs.to_f+myovnstm.to_f myfinalovtime = myfinalovtime.to_s.gsub(".",":") else myfinalovtime = myfovthrs.to_s+":"+myfovtmns.to_s end end myfinalpenty = 0 if gps.al_latepelanty != nil && gps.al_latepelanty != '' myplt = gps.al_latepelanty.to_s.split(",") myplthrs = 0 mypltmns = 0 myplt.each do |newplts| plthrsx = get_calculated_hours_minute(newplts,'H') pltmnsx = get_calculated_hours_minute(newplts,'M') myplthrs += plthrsx.to_i mypltmns += pltmnsx.to_i mytotalplhrs += myplthrs.to_i mytotalplmns += mypltmns.to_i end if mypltmns.to_i >=60 myplntm = mypltmns.to_f/60 myfinalpenty = myplthrs.to_f+myplntm.to_f myfinalpenty = myfinalpenty #.to_s.gsub(".",":") else myfinalpenty = myplthrs.to_s+"."+mypltmns.to_s end end %> <% i +=1 end %> <% else %> <% end %>
SL No. Emp.Code Name Department Shift Code Present Absent Working Hrs Late Early OT Hrs Late Penalty
<%=i%> <%=gps.al_empcode%> <%=empname%> <%=departname%> <%=gps.al_shift%> <%=sumpresents%> <%=sumabsent%> <%=myxwkhrs%> <%=sumlatect%> <%=sumearlyct%> <%=myfinalovtime%> <%=myfinalpenty%>
Total Present : <%=myxpresents%> Absent :  <%=myxabsent%> <% mytotalwrkshrs = 0 if mytotalwkmns.to_i >=60 nwhs = mytotalwkmns.to_f/60 nwhs = currency_formatted(nwhs) wrkshrs = mytotalwkhrs.to_f+nwhs.to_f mytotalwrkshrs = wrkshrs.to_s.gsub(".",":") else mytotalwrkshrs = mytotalwkhrs.to_s+":"+mytotalwkmns.to_s end %> Working Hrs :  <%=mytotalwrkshrs%> Late :  <%=myxlatect%> Early :  <%=myxearlyct%> <% mytotalovtiems = 0 if mytotalovtmns.to_i >=60 novtmns = mytotalovtmns.to_f/60 novtmns = currency_formatted(novtmns) mytotalovtiems = mytotalovthrs.to_f+novtmns.to_f mytotalovtiems = mytotalovtiems.to_s.gsub(".",":") else mytotalovtiems = mytotalovthrs.to_s+":"+mytotalovtmns.to_s end %> OT Hrs : <%=mytotalovtiems%> <% myfinalpmetys = 0 if mytotalplmns.to_i >=60 plntsmns = mytotalplmns.to_f/60 plntsmns = currency_formatted(plntsmns) myfinalpmetys = mytotalplhrs.to_f+plntsmns.to_f myfinalpmetys = myfinalpmetys #.to_s.gsub(".",":") else myfinalpmetys = mytotalplhrs.to_s+"."+mytotalplmns.to_s end %> LPT : <%=myfinalpmetys%>
No Records Found
<% end %>
<% end %>
<%=render "layouts/popupforms"%>