has_accounts_engine 2.0.0 → 2.0.1
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.
- data/app/controllers/accounts_controller.rb +5 -0
- data/app/views/accounts/_edit_bookings.html.haml +14 -13
- data/app/views/accounts/_show.html.haml +3 -1
- data/app/views/accounts/_show_bookings.html.haml +0 -3
- data/app/views/bookings/_form.html.haml +2 -2
- data/app/views/bookings/_list.html.haml +0 -2
- data/app/views/bookings/_new_form.html.haml +6 -3
- data/app/views/bookings/_simple_form.html.haml +2 -2
- data/config/locales/de.yml +1 -0
- data/lib/has_accounts_engine/version.rb +1 -1
- metadata +2 -2
@@ -22,6 +22,11 @@ class AccountsController < HasAccountsController
|
|
22
22
|
end
|
23
23
|
@bookings = @bookings
|
24
24
|
@carry_booking = @bookings.all.first
|
25
|
+
@saldo = @account.saldo(@carry_booking, false)
|
26
|
+
|
27
|
+
if @account.is_profit_account? && params[:by_value_period] && params[:by_value_period][:to]
|
28
|
+
@saldo -= @account.saldo(Date.parse(params[:by_value_period][:from]), false)
|
29
|
+
end
|
25
30
|
|
26
31
|
show!
|
27
32
|
end
|
@@ -1,15 +1,16 @@
|
|
1
1
|
- url_params = {:controller => 'accounts', :action => 'show', :id => params[:account_id] || params[:id]}
|
2
|
-
=
|
3
|
-
|
4
|
-
%
|
5
|
-
%
|
6
|
-
%
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
= render :partial => 'edit_booking', :collection => @bookings, :locals => {:f => f}
|
2
|
+
= simple_form_for :bookings, :url => update_bookings_account_path do |f|
|
3
|
+
%table.table.table-striped
|
4
|
+
%thead
|
5
|
+
%tr
|
6
|
+
%th= t_attr :value_date, Booking
|
7
|
+
%th= t_attr :title, Booking
|
8
|
+
%th= t_attr :amount, Booking
|
9
|
+
%th= t_attr :debit_account, Booking
|
10
|
+
%th= t_attr :credit_account, Booking
|
11
|
+
%tbody
|
12
|
+
= render :partial => 'edit_booking', :collection => @bookings, :locals => {:f => f}
|
14
13
|
|
15
|
-
|
14
|
+
= f.button :submit
|
15
|
+
|
16
|
+
= paginate @bookings, :params => url_params.merge(:query => params[:query]) do
|
@@ -2,9 +2,11 @@
|
|
2
2
|
%ul.nav.nav-tabs
|
3
3
|
%li.active= link_to t_title(:journal, Account), '#tab-bookings', {:data => {:toggle => 'tab'}}
|
4
4
|
%li= link_to t_title(:info, Account), '#tab-info', {:data => {:toggle => 'tab'}}
|
5
|
-
- if
|
5
|
+
- if resource.respond_to? :attachments
|
6
6
|
%li= link_to t_title(:list, Attachment), '#tab-attachments', {:data => {:toggle => 'tab'}}
|
7
7
|
|
8
8
|
.tab-content
|
9
9
|
#tab-bookings.tab-pane.active= render 'show_bookings'
|
10
10
|
#tab-info.tab-pane= render "form"
|
11
|
+
- if resource.respond_to? :attachments
|
12
|
+
#tab-attachments.tab-pane= render 'show_attachments'
|
@@ -3,7 +3,6 @@
|
|
3
3
|
%table.table.table-striped.bookings.collection
|
4
4
|
%thead
|
5
5
|
= render 'accounts/booking_list_header'
|
6
|
-
- @saldo = @account.saldo(@carry_booking, false)
|
7
6
|
%tbody
|
8
7
|
= render 'accounts/carry_booking' unless @saldo == 0
|
9
8
|
|
@@ -15,5 +14,3 @@
|
|
15
14
|
= render 'accounts/booking_item'
|
16
15
|
%tfoot
|
17
16
|
= render 'accounts/booking_list_footer' unless @bookings.empty?
|
18
|
-
= paginate @bookings
|
19
|
-
|
@@ -23,8 +23,8 @@
|
|
23
23
|
|
24
24
|
.row-fluid
|
25
25
|
.span12
|
26
|
-
|
27
|
-
|
26
|
+
= f.input :reference_type, :as => :hidden, :input_html => {:value => 'Invoice'}
|
27
|
+
= f.association :reference, :collection => suggested_invoices_for_booking(@booking, :include_all => true), :as => :combobox, :include_blank => true
|
28
28
|
|
29
29
|
.form-actions
|
30
30
|
= f.button :submit
|
@@ -1,5 +1,8 @@
|
|
1
1
|
= simple_form_for @booking, :url => select_bookings_path do |f|
|
2
2
|
= hidden_field_tag :stage, 'select'
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
data/config/locales/de.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_accounts_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-03-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|