has_accounts_engine 3.0.0.beta7 → 3.0.0.beta8
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 +4 -4
- data/app/controllers/accounts_controller.rb +1 -1
- data/app/controllers/booking_templates_controller.rb +3 -7
- data/app/controllers/bookings_controller.rb +2 -25
- data/app/views/accounts/show.html.haml +3 -3
- data/config/locales/de.yml +1 -0
- data/config/locales/en.yml +9 -1
- data/config/routes.rb +0 -1
- data/lib/has_accounts_engine/version.rb +1 -1
- metadata +3 -6
- data/app/views/bookings/_new_form.html.haml +0 -8
- data/app/views/bookings/_simple_form.html.haml +0 -25
- data/app/views/bookings/new.html.haml +0 -8
- data/app/views/bookings/simple_edit.html.haml +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07ebaba05025b7323e2305a1bab6984a8d9770d4
|
4
|
+
data.tar.gz: 1faf2a6f349e8ccd7a17af7e8c35ef37004fdec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39c77f7dc025d83e5ece2de093d6f85adadd9f77d4a627268557d5e3e0e4af861d3d33db75198d822e3c18f8bca9ab80780de03aee1d4be3986f51ab5fa29c9c
|
7
|
+
data.tar.gz: 93f27bb7728660a19b82fe486763f8470b1de74b671570c615657e0d09058ed35d155dd96c1abf0a503e1541ad3d7584d2c0860e81cbc8ffe03513ad460d1c3d
|
@@ -6,7 +6,7 @@ class AccountsController < HasAccountsController
|
|
6
6
|
has_scope :page, :only => :index
|
7
7
|
|
8
8
|
def index
|
9
|
-
@accounts =
|
9
|
+
@accounts = collection.includes(:account_type).includes(:credit_bookings, :credit_bookings).page(params[:page]).per_page(100)
|
10
10
|
end
|
11
11
|
|
12
12
|
def show
|
@@ -1,15 +1,11 @@
|
|
1
1
|
class BookingTemplatesController < HasAccountsController
|
2
2
|
# Actions
|
3
3
|
def create
|
4
|
-
create!
|
5
|
-
success.html { redirect_to collection_path }
|
6
|
-
end
|
4
|
+
create! { collection_path }
|
7
5
|
end
|
8
6
|
|
9
7
|
def update
|
10
|
-
update!
|
11
|
-
success.html { redirect_to collection_path }
|
12
|
-
end
|
8
|
+
update! { collection_path }
|
13
9
|
end
|
14
10
|
|
15
11
|
def new_booking
|
@@ -18,6 +14,6 @@ class BookingTemplatesController < HasAccountsController
|
|
18
14
|
booking_params[:code] ||= (Booking.maximum(:code) || 0) + 1
|
19
15
|
booking_parameters = @booking_template.booking_parameters(booking_params)
|
20
16
|
|
21
|
-
redirect_to
|
17
|
+
redirect_to new_booking_path(:booking => booking_parameters)
|
22
18
|
end
|
23
19
|
end
|
@@ -5,18 +5,6 @@ class BookingsController < HasAccountsController
|
|
5
5
|
has_scope :by_date, :using => [:from, :to]
|
6
6
|
|
7
7
|
# Actions
|
8
|
-
def index
|
9
|
-
# @bookings = apply_scopes(Booking).accessible_by(current_ability, :list).includes(:credit_account, :debit_account).paginate(:page => params[:page], :per_page => params[:per_page])
|
10
|
-
index!
|
11
|
-
end
|
12
|
-
|
13
|
-
def new
|
14
|
-
@booking = Booking.new(:value_date => Date.today)
|
15
|
-
# Only include base class records
|
16
|
-
@booking_templates = BookingTemplate.where(:type => [nil, 'BookingTemplate']).where("NOT(code LIKE '%:%')").paginate(:page => params[:page])
|
17
|
-
new!
|
18
|
-
end
|
19
|
-
|
20
8
|
def select_booking
|
21
9
|
@booking = Booking.find(params[:id]).dup
|
22
10
|
|
@@ -27,11 +15,7 @@ class BookingsController < HasAccountsController
|
|
27
15
|
# Take value date from form
|
28
16
|
@booking.value_date = params[:booking][:value_date]
|
29
17
|
|
30
|
-
render :action => '
|
31
|
-
end
|
32
|
-
|
33
|
-
def simple_edit
|
34
|
-
new!
|
18
|
+
render :action => 'edit'
|
35
19
|
end
|
36
20
|
|
37
21
|
def select
|
@@ -42,14 +26,7 @@ class BookingsController < HasAccountsController
|
|
42
26
|
end
|
43
27
|
|
44
28
|
def create
|
45
|
-
|
46
|
-
|
47
|
-
create! do |success, failure|
|
48
|
-
success.html do
|
49
|
-
redirect_to new_booking_path
|
50
|
-
end
|
51
|
-
failure.html {render 'edit'}
|
52
|
-
end
|
29
|
+
create! { new_booking_path }
|
53
30
|
end
|
54
31
|
|
55
32
|
def copy
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.contextual
|
2
|
-
= icon_link_to
|
3
|
-
= icon_link_to
|
4
|
-
= icon_link_to
|
2
|
+
= icon_link_to :only_debit_bookings, url_for(:only_debit_bookings => true) unless params[:only_debit_bookings]
|
3
|
+
= icon_link_to :only_credit_bookings, url_for(:only_credit_bookings => true) unless params[:only_credit_bookings]
|
4
|
+
= icon_link_to :all_bookings, @account if params[:only_credit_bookings] || params[:only_debit_bookings]
|
5
5
|
= contextual_links_for
|
6
6
|
|
7
7
|
= boot_page_title
|
data/config/locales/de.yml
CHANGED
data/config/locales/en.yml
CHANGED
@@ -13,6 +13,7 @@ en:
|
|
13
13
|
title: Title
|
14
14
|
saldo: Saldo
|
15
15
|
account_type: Account Type
|
16
|
+
tag_list: Tags
|
16
17
|
account_type:
|
17
18
|
name: Name
|
18
19
|
title: Title
|
@@ -60,9 +61,16 @@ en:
|
|
60
61
|
title: Booking Journal
|
61
62
|
copy:
|
62
63
|
title: Copy Booking
|
64
|
+
search:
|
65
|
+
by_text: Content
|
66
|
+
by_amount_from: Amount from
|
67
|
+
by_amount_to: Amount to
|
68
|
+
by_date_from: Date from
|
69
|
+
by_date_to: Date to
|
63
70
|
|
64
71
|
crud:
|
65
72
|
action:
|
66
|
-
copy:
|
73
|
+
copy: Copy
|
74
|
+
all_bookings: All
|
67
75
|
only_credit_bookings: Only Credit
|
68
76
|
only_debit_bookings: Only Debit
|
data/config/routes.rb
CHANGED
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.beta8
|
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-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -295,16 +295,12 @@ files:
|
|
295
295
|
- app/views/bookings/_form.html.haml
|
296
296
|
- app/views/bookings/_form_fields.html.haml
|
297
297
|
- app/views/bookings/_list.html.haml
|
298
|
-
- app/views/bookings/_new_form.html.haml
|
299
298
|
- app/views/bookings/_sidebar.html.haml
|
300
|
-
- app/views/bookings/_simple_form.html.haml
|
301
299
|
- app/views/bookings/index.html.haml
|
302
300
|
- app/views/bookings/index.js.erb
|
303
|
-
- app/views/bookings/new.html.haml
|
304
301
|
- app/views/bookings/select.html.haml
|
305
302
|
- app/views/bookings/show.html.haml
|
306
303
|
- app/views/bookings/show.js.erb
|
307
|
-
- app/views/bookings/simple_edit.html.haml
|
308
304
|
- app/views/bookings/update.js.erb
|
309
305
|
- app/views/has_accounts/_form.html.haml
|
310
306
|
- app/views/has_accounts/_list.html.haml
|
@@ -356,3 +352,4 @@ signing_key:
|
|
356
352
|
specification_version: 4
|
357
353
|
summary: HasAccountsEngine provides controllers, views for has_accounts.
|
358
354
|
test_files: []
|
355
|
+
has_rdoc:
|
@@ -1,8 +0,0 @@
|
|
1
|
-
= simple_form_for @booking, :url => select_bookings_path do |f|
|
2
|
-
= hidden_field_tag :stage, 'select'
|
3
|
-
.row-fluid
|
4
|
-
.span8= f.input :title, :input_html => {'data-autofocus' => true}
|
5
|
-
.span4= f.input :value_date, :as => :date_field, :input_html => {:size => 10, :style => 'text-align: right'}
|
6
|
-
|
7
|
-
.form-actions
|
8
|
-
= f.button :submit
|
@@ -1,25 +0,0 @@
|
|
1
|
-
= simple_form_for @booking do |f|
|
2
|
-
|
3
|
-
.row-fluid
|
4
|
-
.span6
|
5
|
-
= f.input :title, :input_html => {"data-autofocus" => true}
|
6
|
-
.span6
|
7
|
-
= f.input :value_date, :as => :date_field
|
8
|
-
.row-fluid
|
9
|
-
.span6
|
10
|
-
= f.input :amount, :as => :string, :input_html => {:size => 12}
|
11
|
-
.span6
|
12
|
-
= f.input :code
|
13
|
-
|
14
|
-
.row-fluid
|
15
|
-
.span6
|
16
|
-
= f.association :debit_account, :collection => accounts_as_collection(Account.all), :as => :combobox
|
17
|
-
.span6
|
18
|
-
= f.association :credit_account, :collection => accounts_as_collection(Account.all), :as => :combobox
|
19
|
-
|
20
|
-
.row-fluid
|
21
|
-
.span12
|
22
|
-
= f.input :comments, :input_html => {:rows => 4}
|
23
|
-
|
24
|
-
.form-actions
|
25
|
-
= f.button :submit
|