<%-# 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. -%>
<%= image_tag("/images/show_finance.png") %>

<%= t('transactions') %>

<%= t('finance_transactions_view') %>

<%= link_to_function image_tag("/images/buttons/back.png",:border => 0), "history.back()" %>
<% index = 0 %> <%income_total = 0%> <%expenses_total = 0%> <% unless @hr.nil? %> <% unless @salary == 0 %> <% else %> <% end %> <% end %> <% unless @donations_total == 0 %> <% else %> <% end %> <% unless @transactions_fees == 0 %> <% else %> <% end %> <% FedenaPlugin::FINANCE_CATEGORY.each do |category| %> <% if @category_transaction_totals["#{category[:category_name]}"][:category_type] == "income" %> <% else %> <% end %> <% end %> <% @other_transaction_categories.each_with_index do |t,i| %> <% income = t.total_income(@start_date,@end_date) %> <% expense = t.total_expense(@start_date,@end_date) %> "> <%income_total +=income %> <%expenses_total +=expense %> <%end%> <% if @grand_total >= 0 %> <% else %> <% end %>
<%= t('sl_no') %> <%= t('particulars') %> <%= t('expenses') %> ( <%= currency %> ) <%= t('income') %> ( <%= currency %> )
<%= index+=1 %><%= link_to "#{t('salary_account')}" , :action => 'salary_department' , :start => @start_date,:end => @end_date%> <%= t('salary_account') %><%= @salary[:total_salary]%>
<%= index+=1 %><%= link_to "#{t('donations')}" , :action => 'donations_report',:start => @start_date,:end => @end_date%><%= t('donations') %> <%=@donations_total%>
<%= index+=1 %><%= link_to "#{t('fees_account')}" , :action => 'fees_report' , :start => @start_date,:end => @end_date%> <%= t('fees_account') %> <%=@transactions_fees%>
<%= index+=1 %> <%= link_to "#{t(category[:category_name]+'_account')}" , category[:destination].merge(:start => @start_date,:end => @end_date)%> <%=@category_transaction_totals["#{category[:category_name]}"][:amount]%><%=@category_transaction_totals["#{category[:category_name]}"][:amount]%>
<%=i+index+1%> <%= link_to t.name,:controller => "finance",:action => "income_details",:start => @start_date,:end => @end_date,:id => t.id %> <%= expense %> <%= income %>
<%= t('grand_total') %> <%= sprintf("%.2f",@grand_total)%><%= sprintf("%.2f",@grand_total * -1) %>


<% unless @salary == 0 and @donations_total == 0 and @transactions_fees and @other_transactions.empty? %> <%= @graph %> <% end %>