has_accounts_engine 3.0.0.beta10 → 3.0.0.beta11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/accounts_controller.rb +2 -1
- data/app/controllers/bookings_controller.rb +1 -0
- data/app/views/bookings/_filter_form.html.haml +13 -0
- data/app/views/bookings/_form.html.haml +2 -2
- data/app/views/bookings/index.html.haml +1 -12
- data/lib/has_accounts_engine/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a9a0fc966a5f625dece331009a3d9f15d95d34e
|
4
|
+
data.tar.gz: f96c0f4ee3acf648b9bd1a25db88e184d0061431
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b8fec12a5c69246ec8e23179105a98c65db7d62ea1be2c573d0f397b5f15b88e0fdb431864519c503833cabe580625232663007977aedc7f605c69a218ca6d9
|
7
|
+
data.tar.gz: f1e334312c52edcdd66c233c442e423932a7d3cc4d4aba8d959eea1a8c7dc3dc4948ce1a93f1c9255d032b241b1dbe5fb4266cdefe2c500027b4fa9326455df8
|
@@ -12,7 +12,8 @@ class AccountsController < HasAccountsController
|
|
12
12
|
def show
|
13
13
|
@account = Account.find(params[:id])
|
14
14
|
@bookings = apply_scopes(Booking).includes(:debit_account => :account_type, :credit_account => :account_type).by_account(@account)
|
15
|
-
@bookings = @bookings.page(params[:page]
|
15
|
+
@bookings = @bookings.page(params[:page] || 1)
|
16
|
+
@bookings = @bookings.per_page(params[:per_page].to_i) if params[:per_page].present?
|
16
17
|
|
17
18
|
if params[:only_credit_bookings]
|
18
19
|
@bookings = @bookings.where(:credit_account_id => @account.id)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
= simple_form_for '', :method => :get, remote: true do |f|
|
2
|
+
.container-fluid
|
3
|
+
.row-fluid
|
4
|
+
.span3= f.input :by_code, label: t_attr(:code), required: false
|
5
|
+
.span6= f.input :by_text, label: t(:by_text, scope: 'bookings.search'), required: false
|
6
|
+
.row-fluid
|
7
|
+
.span3= f.input 'by_amount[from]', label: t(:by_amount_from, scope: 'bookings.search'), required: false
|
8
|
+
.span3= f.input 'by_amount[to]', label: t(:by_amount_to, scope: 'bookings.search'), required: false
|
9
|
+
.span3= f.input 'by_date[from]', label: t(:by_date_from, scope: 'bookings.search'), required: false, input_html: { value: try_parse_date(params[:by_date][:from]) }
|
10
|
+
.span3= f.input 'by_date[to]', label: t(:by_date_to, scope: 'bookings.search'), required: false, input_html: { value: try_parse_date(params[:by_date][:to]) }
|
11
|
+
|
12
|
+
.form-actions
|
13
|
+
= f.button :submit, t_action(:search)
|
@@ -2,18 +2,7 @@
|
|
2
2
|
|
3
3
|
= boot_page_title
|
4
4
|
|
5
|
-
=
|
6
|
-
.container-fluid
|
7
|
-
.row-fluid
|
8
|
-
.span6= f.input :by_text, label: t(:by_text, scope: 'bookings.search'), required: false
|
9
|
-
.row-fluid
|
10
|
-
.span3= f.input 'by_amount[from]', label: t(:by_amount_from, scope: 'bookings.search'), required: false
|
11
|
-
.span3= f.input 'by_amount[to]', label: t(:by_amount_to, scope: 'bookings.search'), required: false
|
12
|
-
.span3= f.input 'by_date[from]', label: t(:by_date_from, scope: 'bookings.search'), required: false, input_html: { value: try_parse_date(params[:by_date][:from]) }
|
13
|
-
.span3= f.input 'by_date[to]', label: t(:by_date_to, scope: 'bookings.search'), required: false, input_html: { value: try_parse_date(params[:by_date][:to]) }
|
14
|
-
|
15
|
-
.form-actions
|
16
|
-
= f.button :submit, t_action(:search)
|
5
|
+
= render 'filter_form'
|
17
6
|
|
18
7
|
.index
|
19
8
|
= render 'list'
|
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.beta11
|
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-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -292,6 +292,7 @@ files:
|
|
292
292
|
- app/views/booking_templates/_list.html.haml
|
293
293
|
- app/views/bookings/_booking.html.haml
|
294
294
|
- app/views/bookings/_booking_form.html.haml
|
295
|
+
- app/views/bookings/_filter_form.html.haml
|
295
296
|
- app/views/bookings/_form.html.haml
|
296
297
|
- app/views/bookings/_form_fields.html.haml
|
297
298
|
- app/views/bookings/_list.html.haml
|