Skip to content

Commit

Permalink
fixed par
Browse files Browse the repository at this point in the history
  • Loading branch information
piyushranjan committed Aug 13, 2010
1 parent 7cc29b1 commit 78b3b5a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/dashboard.rb
Expand Up @@ -287,7 +287,12 @@ def loans
graph.data_type = :individual graph.data_type = :individual
graph.data(vals.map{|x| graph.data(vals.map{|x|
branch=Branch.get(x.branch_id) branch=Branch.get(x.branch_id)
[(100*(LoanHistory.defaulted_loan_info_for(branch).principal_due/(x.actual_outstanding_principal||0)).to_f).round(2), branch.name] principal_overdue = if history = LoanHistory.defaulted_loan_info_for(branch)
history.principal_due
else
0
end
[(100*(principal_overdue/(x.actual_outstanding_principal||0)).to_f).round(2), branch.name]
}) })
return graph.generate return graph.generate
end end
Expand Down

0 comments on commit 78b3b5a

Please sign in to comment.