Skip to content

Commit

Permalink
Merge pull request mbulat#51 from freerobby/reporting-improvements
Browse files Browse the repository at this point in the history
Reporting improvements
  • Loading branch information
mbulat committed Sep 10, 2015
2 parents a76a098 + 130683f commit 20d2e5f
Show file tree
Hide file tree
Showing 12 changed files with 236 additions and 131 deletions.
6 changes: 3 additions & 3 deletions app/views/plutus/accounts/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<tr class="<%= cycle("even", "odd") -%>">
<td><%=h account.name %></td>
<td><%=h account.type.sub('Plutus::','') %></td>
<td><%=h account.credits_balance %></td>
<td><%=h account.debits_balance %></td>
<td><%=h account.balance %></td>
<td><%=h account.credits_balance.round(2) %></td>
<td><%=h account.debits_balance.round(2) %></td>
<td><%=h account.balance.round(2) %></td>
</tr>
<% end %>
</table>
Expand Down
4 changes: 2 additions & 2 deletions app/views/plutus/entries/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<% entry.debit_amounts.each do |debit_amount| %>
<tr class="<%= cycle("odd", "odd") -%>">
<td>&nbsp;&nbsp;&nbsp;&nbsp;<%=h "#{debit_amount.account.name}" %></td>
<td><%=h debit_amount.amount %></td>
<td><%=h debit_amount.amount.round(2) %></td>
<td></td>
<td></td>
</tr>
Expand All @@ -33,7 +33,7 @@
<tr class="<%= cycle("odd", "odd") -%>">
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=h "#{credit_amount.account.name}" %></td>
<td></td>
<td><%=h credit_amount.amount %></td>
<td><%=h credit_amount.amount.round(2) %></td>
<td></td>
</tr>
<% end %>
Expand Down
11 changes: 10 additions & 1 deletion app/views/plutus/reports/_account.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@
</thead>
<% if accounts.count > 0%>
<tbody>
<% running_total = 0 %>
<% accounts.each do |account| %>
<% balance = account.balance(:from_date => @from_date, :to_date => @to_date) %>
<tr class="<%= cycle("even", "odd") -%>">
<td><%=h account.name %></td>
<td><%=h account.balance(:from_date => @from_date, :to_date => @to_date) %></td>
<td><%=h balance.round(2) %></td>
<% running_total += balance %>
</tr>
<% end %>
<tr class="<%= cycle("even", "odd") -%>">
<strong>
<td>Total <%= name %></td>
<td><%= running_total.round(2) %></td>
</strong>
</tr>
</tbody>
<% end %>
</table>
33 changes: 10 additions & 23 deletions fixture_rails_root/Gemfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,20 @@
source 'http://rubygems.org'

gem 'rails', '3.1.0'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'plutus', path: '../'
gem 'rails', '>= 4.0'
gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end

gem 'jquery-rails'
gem 'jquery-ui-rails'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'

group :test do
# Pretty printed test output
gem 'turn', :require => false
end

group :development do
gem 'web-console', '~> 2.0'
end
230 changes: 132 additions & 98 deletions fixture_rails_root/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,120 +1,154 @@
PATH
remote: ../
specs:
plutus (0.12.0)
jquery-rails (~> 3.0)
jquery-ui-rails (~> 4.0)
rails (~> 4.0)

GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.0)
actionpack (= 3.1.0)
mail (~> 2.3.0)
actionpack (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
builder (~> 3.0.0)
actionmailer (4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.4)
actionview (= 4.2.4)
activesupport (= 4.2.4)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.0.3)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.0)
activemodel (3.1.0)
activesupport (= 3.1.0)
bcrypt-ruby (~> 3.0.0)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
activesupport (3.1.0)
multi_json (~> 1.0)
ansi (1.4.2)
arel (2.2.3)
bcrypt-ruby (3.0.1)
builder (3.0.0)
coffee-rails (3.1.1)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.4)
activesupport (= 4.2.4)
globalid (>= 0.3.0)
activemodel (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
activerecord (4.2.4)
activemodel (= 4.2.4)
activesupport (= 4.2.4)
arel (~> 6.0)
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
ansi (1.5.0)
arel (6.0.3)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.3.1)
coffee-script-source (1.9.1.1)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (1.3.2)
multi_json (~> 1.0)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
json (1.7.3)
mail (2.3.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.18)
multi_json (1.3.5)
polyglot (0.3.3)
rack (1.3.6)
rack-cache (1.0.3)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
execjs (2.6.0)
globalid (0.3.6)
activesupport (>= 4.1.0)
i18n (0.7.0)
jquery-rails (3.1.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (4.2.1)
railties (>= 3.2.16)
json (1.8.3)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.6.1)
mini_portile (0.6.2)
minitest (5.8.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails (3.1.0)
actionmailer (= 3.1.0)
actionpack (= 3.1.0)
activerecord (= 3.1.0)
activeresource (= 3.1.0)
activesupport (= 3.1.0)
bundler (~> 1.0)
railties (= 3.1.0)
railties (3.1.0)
actionpack (= 3.1.0)
activesupport (= 3.1.0)
rack-ssl (~> 1.3.2)
rails (4.2.4)
actionmailer (= 4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
activemodel (= 4.2.4)
activerecord (= 4.2.4)
activesupport (= 4.2.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.4)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
railties (4.2.4)
actionpack (= 4.2.4)
activesupport (= 4.2.4)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
sass (3.1.18)
sass-rails (3.1.6)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (>= 3.1.10)
tilt (~> 1.3.2)
sprockets (2.0.4)
hike (~> 1.2)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
sass (3.4.18)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sprockets (3.3.4)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
turn (0.9.5)
sprockets-rails (2.3.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
turn (0.9.6)
ansi
tzinfo (0.3.33)
uglifier (1.2.4)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
json (>= 1.8.0)
web-console (2.0.0)
activemodel (~> 4.0)
binding_of_caller (>= 0.7.2)
railties (~> 4.0)
sprockets-rails (>= 2.0, < 4.0)

PLATFORMS
ruby

DEPENDENCIES
coffee-rails (~> 3.1.0)
coffee-rails
jquery-rails
rails (= 3.1.0)
sass-rails (~> 3.1.0)
jquery-ui-rails
plutus!
rails (>= 4.0)
sass-rails
sqlite3
turn
uglifier
web-console (~> 2.0)

BUNDLED WITH
1.10.4
1 change: 1 addition & 0 deletions fixture_rails_root/app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
// the compiled file.
//
//= require jquery
//= require jquery.ui.all
//= require jquery_ujs
//= require_tree .
1 change: 1 addition & 0 deletions fixture_rails_root/app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require jquery.ui.datepicker
*= require_self
*= require_tree .
*/
5 changes: 1 addition & 4 deletions fixture_rails_root/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
require 'rails/all'

if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
Bundler.require(*Rails.groups)
end

module FixtureRailsRoot
Expand Down
3 changes: 3 additions & 0 deletions fixture_rails_root/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@

# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
config.assets.allow_debugging = true

config.serve_static_files = true
config.static_cache_control = 'public, max-age=3600'
end
Loading

0 comments on commit 20d2e5f

Please sign in to comment.