invoice_bar 0.0.4 → 0.0.5
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/invoice_bar/accounts_controller.rb +6 -6
- data/app/controllers/invoice_bar/contacts_controller.rb +6 -4
- data/app/controllers/invoice_bar/invoice_templates_controller.rb +6 -4
- data/app/controllers/invoice_bar/invoices_controller.rb +6 -0
- data/app/controllers/invoice_bar/receipt_templates_controller.rb +6 -4
- data/app/controllers/invoice_bar/receipts_controller.rb +6 -4
- data/app/views/invoice_bar/accounts/show.html.erb +26 -22
- data/app/views/invoice_bar/contacts/show.html.erb +43 -39
- data/app/views/invoice_bar/currencies/show.html.erb +14 -10
- data/lib/invoice_bar/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +14421 -0
- metadata +49 -49
@@ -8,6 +8,12 @@ module InvoiceBar
|
|
8
8
|
before_filter :require_login
|
9
9
|
before_filter :fetch_currencies, :only => [:new, :create, :edit, :update]
|
10
10
|
|
11
|
+
def index
|
12
|
+
@accounts = current_user.accounts.page(params[:page])
|
13
|
+
|
14
|
+
index! {}
|
15
|
+
end
|
16
|
+
|
11
17
|
def create
|
12
18
|
@account = Account.new(params[:account])
|
13
19
|
current_user.accounts << @account
|
@@ -22,11 +28,5 @@ module InvoiceBar
|
|
22
28
|
def destroy
|
23
29
|
destroy! {}
|
24
30
|
end
|
25
|
-
|
26
|
-
protected
|
27
|
-
|
28
|
-
def begin_of_association_chain
|
29
|
-
current_user
|
30
|
-
end
|
31
31
|
end
|
32
32
|
end
|
@@ -6,6 +6,12 @@ module InvoiceBar
|
|
6
6
|
respond_to :html, :json
|
7
7
|
|
8
8
|
before_filter :require_login
|
9
|
+
|
10
|
+
def index
|
11
|
+
@contacts = current_user.contacts.page(params[:page])
|
12
|
+
|
13
|
+
index! {}
|
14
|
+
end
|
9
15
|
|
10
16
|
def new
|
11
17
|
@contact = Contact.new
|
@@ -32,10 +38,6 @@ module InvoiceBar
|
|
32
38
|
end
|
33
39
|
|
34
40
|
protected
|
35
|
-
|
36
|
-
def begin_of_association_chain
|
37
|
-
current_user
|
38
|
-
end
|
39
41
|
|
40
42
|
def collection
|
41
43
|
@contacts ||= end_of_association_chain.page(params[:page])
|
@@ -8,6 +8,12 @@ module InvoiceBar
|
|
8
8
|
before_filter :require_login
|
9
9
|
before_filter :fetch_user_contacts, :only => [:new, :create, :edit, :update]
|
10
10
|
before_filter :fetch_user_accounts, :only => [:new, :create, :edit, :update]
|
11
|
+
|
12
|
+
def index
|
13
|
+
@invoice_templates = current_user.invoice_templates.page(params[:page])
|
14
|
+
|
15
|
+
index! {}
|
16
|
+
end
|
11
17
|
|
12
18
|
def show
|
13
19
|
@invoice_template = current_user.invoice_templates.find(params[:id])
|
@@ -93,10 +99,6 @@ module InvoiceBar
|
|
93
99
|
end
|
94
100
|
|
95
101
|
protected
|
96
|
-
|
97
|
-
def begin_of_association_chain
|
98
|
-
current_user
|
99
|
-
end
|
100
102
|
|
101
103
|
def collection
|
102
104
|
@invoice_templates ||= end_of_association_chain.page(params[:page])
|
@@ -11,6 +11,12 @@ module InvoiceBar
|
|
11
11
|
before_filter :fetch_user_contacts, :only => [:new, :create, :edit, :update, :from_template]
|
12
12
|
before_filter :fetch_user_invoice_templates, :only => [:new, :create, :edit, :update, :from_template]
|
13
13
|
|
14
|
+
def index
|
15
|
+
@invoices = current_user.invoices.page(params[:page])
|
16
|
+
|
17
|
+
index! {}
|
18
|
+
end
|
19
|
+
|
14
20
|
def show
|
15
21
|
@invoice = current_user.invoices.find(params[:id])
|
16
22
|
@address = @invoice.address
|
@@ -9,6 +9,12 @@ module InvoiceBar
|
|
9
9
|
before_filter :fetch_user_contacts, :only => [:new, :create, :edit, :update]
|
10
10
|
before_filter :fetch_user_accounts, :only => [:new, :create, :edit, :update]
|
11
11
|
|
12
|
+
def index
|
13
|
+
@receipt_templates = current_user.receipt_templates.page(params[:page])
|
14
|
+
|
15
|
+
index! {}
|
16
|
+
end
|
17
|
+
|
12
18
|
def show
|
13
19
|
@receipt_template = current_user.receipt_templates.find(params[:id])
|
14
20
|
@address = @receipt_template.address
|
@@ -93,10 +99,6 @@ module InvoiceBar
|
|
93
99
|
end
|
94
100
|
|
95
101
|
protected
|
96
|
-
|
97
|
-
def begin_of_association_chain
|
98
|
-
current_user
|
99
|
-
end
|
100
102
|
|
101
103
|
def collection
|
102
104
|
@receipt_templates ||= end_of_association_chain.page(params[:page])
|
@@ -11,6 +11,12 @@ module InvoiceBar
|
|
11
11
|
before_filter :fetch_user_contacts, :only => [:new, :create, :edit, :update, :from_template]
|
12
12
|
before_filter :fetch_user_receipt_templates, :only => [:new, :create, :edit, :update, :from_template]
|
13
13
|
|
14
|
+
def index
|
15
|
+
@receipts = current_user.receipts.page(params[:page])
|
16
|
+
|
17
|
+
index! {}
|
18
|
+
end
|
19
|
+
|
14
20
|
def show
|
15
21
|
@receipt = current_user.receipts.find(params[:id])
|
16
22
|
@address = @receipt.address
|
@@ -128,10 +134,6 @@ module InvoiceBar
|
|
128
134
|
|
129
135
|
protected
|
130
136
|
|
131
|
-
def begin_of_association_chain
|
132
|
-
current_user
|
133
|
-
end
|
134
|
-
|
135
137
|
def filter_params(bills)
|
136
138
|
@bills = bills.for_numbers(params[:number])
|
137
139
|
.within_dates(params[:from_date], params[:to_date])
|
@@ -1,24 +1,28 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<div class="controller">
|
2
|
+
<div class="row">
|
3
|
+
<div class="span12" style="padding-bottom:20px">
|
4
|
+
<%= link_to t('buttons.edit'), edit_account_path(@account), class: 'btn' %>
|
5
|
+
<%= link_to t('buttons.destroy'), account_path(@account), method: :delete, confirm: t('buttons.destroy_confirm'), class: 'btn' %>
|
6
|
+
</div>
|
5
7
|
|
6
|
-
<div class="show span4">
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
8
|
+
<div class="show span4">
|
9
|
+
<b><%= t('attributes.account.name') %></b>
|
10
|
+
<%= @account.name %>
|
11
|
+
<br>
|
12
|
+
<b><%= t('attributes.account.bank_account_number') %></b>
|
13
|
+
<%= @account.bank_account_number %>
|
14
|
+
<br>
|
15
|
+
<b><%= t('attributes.account.iban') %></b>
|
16
|
+
<%= @account.iban %>
|
17
|
+
<br>
|
18
|
+
<b><%= t('attributes.account.swift') %></b>
|
19
|
+
<%= @account.swift %>
|
20
|
+
<br>
|
21
|
+
<b><%= t('attributes.account.currency_id') %></b>
|
22
|
+
<%= @account.currency_name %>
|
23
|
+
<br>
|
24
|
+
<b><%= t('attributes.account.amount') %></b>
|
25
|
+
<%= @account.amount %>
|
26
|
+
</div>
|
27
|
+
</div>
|
24
28
|
</div>
|
@@ -1,43 +1,47 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<div class="controller">
|
2
|
+
<div class="row">
|
3
|
+
<div class="span12" style="padding-bottom:20px">
|
4
|
+
<%= link_to t('buttons.edit'), edit_contact_path(@contact), class: 'btn' %>
|
5
|
+
<%= link_to t('buttons.destroy'), contact_path(@contact), method: :delete, confirm: t('buttons.destroy_confirm'), class: 'btn' %>
|
6
|
+
</div>
|
5
7
|
|
6
|
-
<div class="show span4">
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<br>
|
16
|
-
<b><%= t('attributes.contact.web') %></b>
|
17
|
-
<%= @contact.web %>
|
18
|
-
<br>
|
19
|
-
<b><%= t('attributes.contact.bank_account') %></b>
|
20
|
-
<%= @contact.bank_account %>
|
21
|
-
<br>
|
22
|
-
<b><%= t('attributes.contact.ic') %></b>
|
23
|
-
<%= @contact.ic %>
|
24
|
-
<br>
|
25
|
-
<b><%= t('attributes.contact.dic') %></b>
|
26
|
-
<%= @contact.dic %>
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<% if @contact.address %>
|
30
|
-
<div class="show span4">
|
31
|
-
<b><%= t('attributes.address.street') %></b>
|
32
|
-
<%= @contact.address.street %> <%= @contact.address.street_number %>
|
8
|
+
<div class="show span4">
|
9
|
+
<b><%= t('attributes.contact.name') %></b>
|
10
|
+
<%= @contact.name %>
|
11
|
+
<br>
|
12
|
+
<b><%= t('attributes.contact.email') %></b>
|
13
|
+
<%= @contact.email %>
|
14
|
+
<br>
|
15
|
+
<b><%= t('attributes.contact.phone') %></b>
|
16
|
+
<%= @contact.phone %>
|
33
17
|
<br>
|
34
|
-
|
35
|
-
|
18
|
+
<b><%= t('attributes.contact.web') %></b>
|
19
|
+
<%= @contact.web %>
|
36
20
|
<br>
|
37
|
-
|
38
|
-
|
21
|
+
<b><%= t('attributes.contact.bank_account') %></b>
|
22
|
+
<%= @contact.bank_account %>
|
39
23
|
<br>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
24
|
+
<b><%= t('attributes.contact.ic') %></b>
|
25
|
+
<%= @contact.ic %>
|
26
|
+
<br>
|
27
|
+
<b><%= t('attributes.contact.dic') %></b>
|
28
|
+
<%= @contact.dic %>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<% if @contact.address %>
|
32
|
+
<div class="show span4">
|
33
|
+
<b><%= t('attributes.address.street') %></b>
|
34
|
+
<%= @contact.address.street %> <%= @contact.address.street_number %>
|
35
|
+
<br>
|
36
|
+
<b><%= t('attributes.address.city') %></b>
|
37
|
+
<%= @contact.address.postcode %> <%= @contact.address.city %>
|
38
|
+
<br>
|
39
|
+
<b><%= t('attributes.address.city_part') %></b>
|
40
|
+
<%= @contact.address.city_part %>
|
41
|
+
<br>
|
42
|
+
<b><%= t('attributes.address.extra_address_line') %></b>
|
43
|
+
<%= @contact.address.extra_address_line %>
|
44
|
+
</div>
|
45
|
+
<% end %>
|
46
|
+
<div>
|
47
|
+
</div>
|
@@ -1,12 +1,16 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<div class="controller">
|
2
|
+
<div class="row">
|
3
|
+
<div class="span12" style="padding-bottom:20px">
|
4
|
+
<%= link_to t('buttons.edit'), edit_currency_path(@currency), class: 'btn' %>
|
5
|
+
<%= link_to t('buttons.destroy'), currency_path(@currency), method: :delete, confirm: t('buttons.destroy_confirm'), class: 'btn' %>
|
6
|
+
</div>
|
5
7
|
|
6
|
-
<div class="show span4">
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
<div class="show span4">
|
9
|
+
<b><%= t('attributes.currency.name') %>:</b>
|
10
|
+
<%= @currency.name %>
|
11
|
+
<br>
|
12
|
+
<b><%= t('attributes.currency.symbol') %>:</b>
|
13
|
+
<%= @currency.symbol %>
|
14
|
+
</div>
|
15
|
+
</div>
|
12
16
|
</div>
|
data/lib/invoice_bar/version.rb
CHANGED
Binary file
|