has_accounts_engine 3.0.0.beta6 → 3.0.0.beta7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92d02380a3cb2d5eda13943a8ecbb569a3d81ba9
|
4
|
+
data.tar.gz: dee2443a0c07e4bd3ccb1d60c4c85ba17abff87e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d8d4d1bf8a5cd7ccaf712294a8c9f553b954f965d6a30b3e55b4434ffcd494bbe265357248849f54554bbc9e1d8697458c43b3271ac765c832f6d05f88f72f6
|
7
|
+
data.tar.gz: 6fd8b0e24235e7d1b37ce4939e5403606ac8071daa5adf29a2dbcc82a4882ae3b20ba165f35bb11253a1890a981a7c5997ffdbcba6d277caef77476ca3a41a80
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class AccountsController < HasAccountsController
|
2
2
|
# Scopes
|
3
|
-
has_scope :
|
3
|
+
has_scope :by_date, :using => [:from, :to], :default => proc { |c| c.session[:has_scope] }
|
4
4
|
has_scope :by_text
|
5
5
|
|
6
6
|
has_scope :page, :only => :index
|
@@ -24,8 +24,8 @@ class AccountsController < HasAccountsController
|
|
24
24
|
@carry_booking = @bookings.all.first
|
25
25
|
@saldo = @account.saldo(@carry_booking, false)
|
26
26
|
|
27
|
-
if @account.profit_account? && params[:
|
28
|
-
@saldo -= @account.saldo(Date.parse(params[:
|
27
|
+
if @account.profit_account? && params[:by_date] && params[:by_date][:to]
|
28
|
+
@saldo -= @account.saldo(Date.parse(params[:by_date][:from]), false)
|
29
29
|
end
|
30
30
|
|
31
31
|
show!
|
@@ -1,6 +1,5 @@
|
|
1
1
|
class BookingsController < HasAccountsController
|
2
2
|
# Scopes
|
3
|
-
has_scope :by_value_period, :using => [:from, :to], :default => proc { |c| c.session[:has_scope] }
|
4
3
|
has_scope :by_text
|
5
4
|
has_scope :by_amount, :using => [:from, :to]
|
6
5
|
has_scope :by_date, :using => [:from, :to]
|
@@ -1,12 +1,12 @@
|
|
1
1
|
%tr[account]
|
2
2
|
%td= account.code
|
3
3
|
%td
|
4
|
-
= link_to account.title, url_for(account), {'data-href-container' => 'tr'}, :
|
4
|
+
= link_to account.title, url_for(account), {'data-href-container' => 'tr'}, :by_date => params[:by_date]
|
5
5
|
.pull-right= account.tags.map{|tag| boot_label(tag.name)}.join(' ').html_safe
|
6
6
|
- if @date
|
7
7
|
%td{:style => "text-align: right"}= currency_fmt(account.saldo(@date))
|
8
|
-
- elsif params[:
|
9
|
-
%td{:style => "text-align: right"}= currency_fmt(account.saldo(params[:
|
8
|
+
- elsif params[:by_date]
|
9
|
+
%td{:style => "text-align: right"}= currency_fmt(account.saldo(params[:by_date][:from]..params[:by_date][:to]))
|
10
10
|
- else
|
11
11
|
%td{:style => "text-align: right"}= currency_fmt(account.saldo)
|
12
12
|
%td.action-links
|
@@ -1 +1 @@
|
|
1
|
-
- filter_name = :
|
1
|
+
- filter_name = :by_date
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_accounts_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.beta7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Hürlimann (CyT)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -351,9 +351,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
351
351
|
version: 1.3.1
|
352
352
|
requirements: []
|
353
353
|
rubyforge_project:
|
354
|
-
rubygems_version: 2.
|
354
|
+
rubygems_version: 2.4.5
|
355
355
|
signing_key:
|
356
356
|
specification_version: 4
|
357
357
|
summary: HasAccountsEngine provides controllers, views for has_accounts.
|
358
358
|
test_files: []
|
359
|
-
has_rdoc:
|