<%= render "layouts/portlet-config" %>
<%
myimages = "#{root_url}assets/img/profiles/avatar-02.jpg"
if @seawdarsobj
if @seawdarsobj.sw_image !=nil && @seawdarsobj.sw_image !=''
chekpath = chekpaths = "#{Rails.root}/public/images/sewadar/"+@seawdarsobj.sw_image.to_s
if File.file?(chekpath)
myimages = "#{root_url}images/sewadar/"+@seawdarsobj.sw_image.to_s
end
end
end
%>
Welcome, <% if @seawdarsobj %><%=@seawdarsobj.sw_sewadar_name%><% end %> View Profile
<%=Date.today.strftime("%A")%>, <%=Date.today.strftime("%d %b %Y")%>
Quick Access
Advance Summary
<%
myselectcount = 0
if @advListobj!=nil && @advListobj.length >0 && @advListobj[0].al_approvestatus !=nil && @advListobj[0].al_approvestatus != ''
myselectcount = 1
end
if myselectcount.to_i >0
@advListobj.each do |advs|
totals = advs.adamounts
mytypes = ""
status = 0
if advs.al_approvestatus.to_s == 'A'
status = "Approved"
elsif advs.al_approvestatus.to_s == 'R'
status = 'Rejected'
elsif advs.al_approvestatus.to_s == 'N'
status = 'Pending'
else
status = 'Pending'
end
if advs.al_requesttype.to_s == 'Loan'
mytypes = "Advance"
elsif advs.al_requesttype.to_s == 'Advance'
mytypes = "Salary Advance"
end
%>
<%
end
else
%>
<%
end
%>
Advance Type | Amount | EMI | Status |
---|---|---|---|
<%=mytypes%> | <%=totals%> | <%=advs.al_installpermonth%> | <%=status%> |
No record(s) found. |
Leave Summary
<%
if @leaveLedger && @leaveLedger.length >0
@leaveLedger.each do |inv|
creiditedlv = inv.credits.to_f
debitedleve = inv.debits.to_f
obs = get_all_opening_balance(inv.leavecode)
balances = (obs.to_f+inv.credits.to_f).to_f-inv.debits.to_f
@clbal = balances
%>
<%
end
else
%>
<%
end
%>
Leave Type | OB | Credit | Taken | Balance |
---|---|---|---|---|
<%=inv.leavecode%> | <%=obs%> | <%=creiditedlv%> | <%=debitedleve%> | <%=balances%> |
No record(s) found. |