<%-# 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('fees_submission') %>

<%= @student.full_name %>

<%= link_to_function image_tag("/images/buttons/back.png",:border => 0), "history.back()" %>
<% unless flash[:notice].nil? %>

<%= flash[:notice] %>

<% end %>
<%= t('fees_receipt_no') %>
:F<%= @financefee.id %>
<% unless @fee_category.nil? %>
<%= t('fee_category_name') %>
:<%= @fee_category.name %>
<% end %> <% unless @student.student_category.nil? %>
<%= t('student_category') %>
:<%= @student.student_category.name %>
<%= t('student_category') %>
:N.A
<% end %>

<% total_fees =0 %> <% unless @financefee.is_paid %> <%= render :partial=> 'defaulters_fine_submission' if @fine.nil? %> <% end %> <% form_for :fees, :url => {:action => 'pay_fees_defaulters', :student => @student.id,:date => @date.id, :fine => @fine} do |form| %> <% unless @fee_particulars.nil? %> <% i = 0 %> <% @fee_particulars.each do |fee| %> "> <% total_fees += fee.amount %> <% end %> <% unless @total_discount == 0 %> " cellpadding="1" cellspacing="1"> <% @batch_discounts.each do |d| %> "> <% i += 1 %> <% end %> <% @student_discounts.each do |d| %> "> <% i += 1 %> <% end %> <% @category_discounts.each do |d| %> "> <% i += 1 %> <% end %> " cellpadding="1" cellspacing="1"> <% total_fees = (total_fees - ((total_fees*@total_discount)/100)) %> " cellpadding="1" cellspacing="1"> <% end %> <% unless @fine.nil? %> "> <% total_fees += @fine.to_f %> <% end %> <% unless @financefee.transaction_id.nil? %> <% @transactions = FinanceTransaction.all(:conditions=>"id IN (#{@financefee.transaction_id})") %> <% unless @transactions.blank? %> <% @transactions.each do |trans| %> <% if trans.fine_included %> "> <% total_fees += trans.fine_amount.to_f %> <% end %> <% end %> <% end %> <% end %> <% unless @paid_fees.nil? %> " cellpadding="1" cellspacing="1"> <% paid = 0 %> <% @paid_fees.each do |p| %> <% paid += p.amount.to_f %> "> <% end %> <% total_fees -= paid %> <% end %> " cellpadding="1" cellspacing="1">
<%= t('sl_no') %> <%= t('particulars') %> <%= t('amount') %> (<%= currency %> )
<%= i+1 %> <%= fee.name %> <%= fee.amount%>
<%= t('discount') %>
<%= i+1 %> <%= d.name %> <%= d.discount%>
<%= i+1 %> <%= d.name %> <%= d.discount%>
<%= i+1 %> <%= d.name %> <%= d.discount%>
<%= t('total_discount') %> <%= "#{@total_discount} %" %>
<%= t('total_fees') %> <%= total_fees %>
<%= i+=1 %> <%= t('fine_on') %> <%= Date.today %> <%= @fine %>
<%= i+=1 %> <%= t('fine_on') %> <%= trans.transaction_date %> <%= trans.fine_amount %>
<%= t('payment_done') %>
<%= i+=1 %> <%= t('partial_payment_on') %> <%= p.transaction_date %> <%= p.amount.to_f %>
<%= t('amount_to_pay') %> <%= total_fees%>
<%unless total_fees.to_f ==0 %>
<%= form.text_field :fees_paid, :value=>total_fees %>
<%= hidden_field_tag :total_fees, total_fees %>
<%= submit_tag "►#{t('pay_fees')}",:class=>'submit_button' %> <%= link_to "► #{t('print_receipt')}", {:controller => "finance", :action => "student_fee_receipt_pdf", :id => @student.id, :id2=>@date.id},:target => '_blank', :class=> 'user_button' unless @trans.nil? %>
<% else %>

<%= t('fees_paid') %>

<% end %>
<% unless @paid_fees.nil? or not total_fees.to_f == 0 %> <%= link_to "► #{t('print_receipt')}", {:controller => "finance", :action => "student_fee_receipt_pdf", :id => @student.id, :id2=>@date.id},:target => '_blank', :class=> 'user_button' %> <% end %>
<%end%> <%end%>