has_accounts_engine 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- = paginated_section @bookings, :params => url_params.merge(:query => params[:query]) do
3
- = simple_form_for :bookings, :url => update_bookings_account_path do |f|
4
- %table.table.table-striped
5
- %thead
6
- %tr
7
- %th= t_attr :value_date, Booking
8
- %th= t_attr :title, Booking
9
- %th= t_attr :amount, Booking
10
- %th= t_attr :debit_account, Booking
11
- %th= t_attr :credit_account, Booking
12
- %tbody
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
- = f.button :submit
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 defined?(Attachment)
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
- //= 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
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
@@ -11,6 +11,4 @@
11
11
  %tbody
12
12
  = render collection, :item_action => (item_action ||= nil)
13
13
 
14
- = paginate collection
15
-
16
14
  = render 'bookings/sidebar'
@@ -1,5 +1,8 @@
1
1
  = simple_form_for @booking, :url => select_bookings_path do |f|
2
2
  = hidden_field_tag :stage, 'select'
3
- = f.input :title, :input_html => {'data-autofocus' => true}
4
- = f.input :value_date, :as => :date_field, :input_html => {:size => 10, :style => 'text-align: right'}
5
- = f.button :submit
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
@@ -21,5 +21,5 @@
21
21
  .span12
22
22
  = f.input :comments, :input_html => {:rows => 4}
23
23
 
24
- = f.button :submit
25
-
24
+ .form-actions
25
+ = f.button :submit
@@ -13,6 +13,7 @@ de:
13
13
  title: Titel
14
14
  saldo: Saldo
15
15
  account_type: Kontentyp
16
+ tag_list: Tags
16
17
  account_type:
17
18
  name: Name
18
19
  title: Titel
@@ -1,3 +1,3 @@
1
1
  module HasAccountsEngine
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
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.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-02-12 00:00:00.000000000 Z
12
+ date: 2014-03-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails