%-# Fedena #Copyright 2010 Foradian Technologies Private Limited # #This product includes software developed at #Project Fedena - http://www.projectfedena.org/ # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable law or agreed to in writing, #software distributed under the License is distributed on an #"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY #KIND, either express or implied. See the License for the #specific language governing permissions and limitations #under the License. -%>
<%= flash[:notice] %>
<% end %> <% form_for :payslip do |f| %><%= t('sl_no') %> | <%= t('employee_text') %> | <%= t('employee_no') %> | <%= t('net_salary') %> | <%= t('payslip_status') %> | |
<%= i+=1 %> | <%= payslip.first.active_or_archived_employee.full_name %> | <%= payslip.first.active_or_archived_employee.employee_number %> | <% grouped_individual_payslip_category = nil %> <% unless grouped_individual_payslip_categories.blank? %> <% grouped_individual_payslip_category = grouped_individual_payslip_categories[empid] unless grouped_individual_payslip_categories[empid].nil? %> <% end %> <% emp_payslip = Employee.calculate_salary(payslip,grouped_individual_payslip_category) %><%="%.2f" %emp_payslip[:net_amount] unless emp_payslip.nil? %> | <%= payslip.first.status_as_text %> | <%= link_to "#{t('view')}",{:action=>"view_employee_payslip",:id=>payslip.first.employee_id,:salary_date=>params[:payslip][:salary_date]} %> | <% end %> <% total_salary += emp_payslip[:net_amount].to_f unless emp_payslip.nil? %> <% total_approved_salary += emp_payslip[:net_amount].to_f if !emp_payslip.nil? and payslip.first.is_approved %> <% total_employees = i %>
<%= t('total_employees') %>: | <%= total_employees %> | <%= t('total_salary') %> : | <%="%.2f" %total_salary %> | <%= t('approved_salary') %>: | <%="%.2f" %total_approved_salary %> |
<%= t('no_payslip_found') %>
<% end %> <% end %>