rock_books 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -3
  3. data/RELEASE_NOTES.md +12 -0
  4. data/assets/fonts/JetBrainsMono-Medium.ttf +0 -0
  5. data/lib/rock_books/cmd_line/command_line_interface.rb +6 -6
  6. data/lib/rock_books/cmd_line/main.rb +1 -9
  7. data/lib/rock_books/documents/book_set.rb +1 -1
  8. data/lib/rock_books/documents/chart_of_accounts.rb +29 -12
  9. data/lib/rock_books/documents/journal.rb +2 -6
  10. data/lib/rock_books/documents/journal_entry.rb +7 -2
  11. data/lib/rock_books/documents/journal_entry_builder.rb +4 -0
  12. data/lib/rock_books/helpers/book_set_loader.rb +3 -3
  13. data/lib/rock_books/helpers/html_helper.rb +22 -16
  14. data/lib/rock_books/reports/balance_sheet.rb +8 -42
  15. data/lib/rock_books/reports/book_set_reporter.rb +104 -86
  16. data/lib/rock_books/reports/data/bs_is_data.rb +61 -0
  17. data/lib/rock_books/reports/data/bs_is_section_data.rb +28 -0
  18. data/lib/rock_books/reports/data/journal_data.rb +37 -0
  19. data/lib/rock_books/reports/data/multidoc_txn_by_account_data.rb +40 -0
  20. data/lib/rock_books/reports/data/multidoc_txn_report_data.rb +39 -0
  21. data/lib/rock_books/reports/data/receipts_report_data.rb +47 -0
  22. data/lib/rock_books/reports/data/tx_one_account_data.rb +37 -0
  23. data/lib/rock_books/reports/helpers/erb_helper.rb +26 -0
  24. data/lib/rock_books/reports/helpers/reporter.rb +134 -0
  25. data/lib/rock_books/reports/income_statement.rb +8 -46
  26. data/lib/rock_books/reports/journal_report.rb +72 -0
  27. data/lib/rock_books/reports/multidoc_txn_by_account_report.rb +32 -0
  28. data/lib/rock_books/reports/multidoc_txn_report.rb +25 -0
  29. data/lib/rock_books/reports/receipts_report.rb +5 -54
  30. data/lib/rock_books/reports/templates/html/index.html.erb +141 -0
  31. data/lib/rock_books/reports/templates/html/report_page.html.erb +12 -0
  32. data/lib/rock_books/reports/templates/text/_receipt_section.txt.erb +17 -0
  33. data/lib/rock_books/reports/templates/text/_totals.txt.erb +8 -0
  34. data/lib/rock_books/reports/templates/text/balance_sheet.txt.erb +21 -0
  35. data/lib/rock_books/reports/templates/text/income_statement.txt.erb +21 -0
  36. data/lib/rock_books/reports/templates/text/journal.txt.erb +20 -0
  37. data/lib/rock_books/reports/templates/text/multidoc_txn_by_account_report.txt.erb +28 -0
  38. data/lib/rock_books/reports/templates/text/multidoc_txn_report.txt.erb +22 -0
  39. data/lib/rock_books/reports/templates/text/receipts_report.txt.erb +13 -0
  40. data/lib/rock_books/reports/templates/text/tx_one_account.txt.erb +18 -0
  41. data/lib/rock_books/reports/tx_one_account.rb +9 -44
  42. data/lib/rock_books/types/account.rb +13 -1
  43. data/lib/rock_books/types/account_type.rb +18 -7
  44. data/lib/rock_books/version.rb +1 -1
  45. data/rock_books.gemspec +1 -0
  46. metadata +41 -9
  47. data/lib/rock_books/reports/index.html.erb +0 -156
  48. data/lib/rock_books/reports/multidoc_transaction_report.rb +0 -66
  49. data/lib/rock_books/reports/receipts.html.erb +0 -54
  50. data/lib/rock_books/reports/reporter.rb +0 -118
  51. data/lib/rock_books/reports/transaction_report.rb +0 -105
  52. data/lib/rock_books/reports/tx_by_account.rb +0 -82
@@ -0,0 +1,8 @@
1
+ Totals
2
+ ------
3
+
4
+ <% totals.keys.sort.each do |acct_code| -%>
5
+ <%= sprintf(line_item_format_string, totals[acct_code], acct_code, fn_acct_name.(acct_code)) %>
6
+ <% end -%>
7
+ ------------
8
+ <%= fn_total_with_ok_or_discrepancy.(grand_total) %>
@@ -0,0 +1,21 @@
1
+ <%= banner_line %>
2
+ <%= fn_center.(entity || 'Unspecified Entity') %>
3
+ <%= fn_center.("Balance Sheet for Period Ending #{end_date}") %>
4
+ <%= banner_line %>
5
+
6
+ <% %i(asset liability equity).each do |section_type| -%>
7
+ <%= fn_section_heading.(section_type) %>
8
+
9
+ <% section_data = sections[section_type] -%>
10
+ <% section_data[:acct_totals].each do |code, amount| -%>
11
+ <%= line_item_format_string % [amount, code, fn_acct_name.(code)] %>
12
+ <% end -%>
13
+ ------------
14
+ <%= sprintf(line_item_format_string, section_data[:total], '', '') %>
15
+ <% end %>
16
+
17
+
18
+ Assets - (Liabilities + Equity)
19
+
20
+ <%= fn_total_with_ok_or_discrepancy.(grand_total) %>
21
+ ============
@@ -0,0 +1,21 @@
1
+ <%= banner_line %>
2
+ <%= fn_center.(entity || 'Unspecified Entity') %>
3
+ <%= fn_center.("Income Statement -- #{start_date} to #{end_date}") %>
4
+ <%= banner_line %>
5
+
6
+ <% %i(income expense).each do |section_type| -%>
7
+ <%= fn_section_heading.(section_type) %>
8
+
9
+ <% section_data = sections[section_type] -%>
10
+ <% section_data[:acct_totals].each do |code, amount| -%>
11
+ <%= line_item_format_string % [amount, code, fn_acct_name.(code)] %>
12
+ <% end -%>
13
+ ------------
14
+ <%= sprintf(line_item_format_string, section_data[:total], '', '') %>
15
+ <% end %>
16
+
17
+
18
+ Net Income
19
+
20
+ <%= sprintf(line_item_format_string, net_income, '', '') %>
21
+ ============
@@ -0,0 +1,20 @@
1
+ <%= banner_line %>
2
+ <%= fn_center.(entity || 'Unspecified Entity') %>
3
+ <%= fn_center.(title) %>
4
+ <% if code && name -%>
5
+ <%= fn_center.("Account: #{name} (#{code})") %>
6
+ <% end -%>
7
+ <% if short_name -%>
8
+ <%= fn_center.("Journal Short Name: #{short_name}") %>
9
+ <% end -%>
10
+ <%= fn_center.("#{start_date} to #{end_date}"
11
+ ) %>
12
+ <%= banner_line %>
13
+
14
+
15
+ <% entries.each do |entry| -%>
16
+ <%= fn_format_entry.(entry) %>
17
+ <% end %>
18
+
19
+ <%= fn_erb_render_binding.('text/_totals.txt.erb', binding) %>
20
+
@@ -0,0 +1,28 @@
1
+ <%= banner_line %>
2
+ <%= fn_center.(entity || 'Unspecified Entity') %>
3
+ <%= fn_center.('Multi Document Transaction Report by Account') %>
4
+
5
+ <%= fn_center.('Source Documents') %>
6
+
7
+ <% journals.each do |journal| -%>
8
+ <% short_name = sprintf(short_name_format_string, journal.short_name) -%>
9
+ <%= fn_center.("#{short_name} -- #{journal.title}") %>
10
+ <% end -%>
11
+ <%= banner_line %>
12
+
13
+ <% acct_sections.each do |acct| %>
14
+
15
+
16
+ <%= banner_line %>
17
+ <% total_string = "%.2f" % acct[:total] -%>
18
+ <%= fn_center.("Total: #{total_string} -- #{fn_account_code_name_type_string_for_code.(acct[:code])}") %>
19
+ <%= banner_line %>
20
+
21
+ <% acct[:entries].each do |entry| -%>
22
+ <%= fn_format_multidoc_entry.(entry) %>
23
+ <% end %>
24
+ <%= fn_account_total_line.(acct[:code], acct[:total]) %>
25
+ <% end %>
26
+
27
+
28
+ <%= fn_erb_render_binding.('text/_totals.txt.erb', binding) %>
@@ -0,0 +1,22 @@
1
+ <%= banner_line %>
2
+ <%= fn_center.(entity || 'Unspecified Entity') %>
3
+ <%= fn_center.('Multi Document Transaction Report') %>
4
+
5
+ <%= fn_center.('Source Documents') %>
6
+
7
+ <% journals.each do |journal| -%>
8
+ <% short_name = sprintf(short_name_format_string, journal.short_name) -%>
9
+ <%= fn_center.("#{short_name} -- #{journal.title}") %>
10
+ <% end -%>
11
+ <%= banner_line %>
12
+
13
+
14
+ Date Document Amount Account
15
+ ---- -------- ------ -------
16
+
17
+ <% entries.each do |entry| -%>
18
+ <%= fn_format_multidoc_entry.(entry) %>
19
+ <% end %>
20
+
21
+
22
+ <%= fn_erb_render_binding.('text/_totals.txt.erb', binding) %>
@@ -0,0 +1,13 @@
1
+ <% create_section = ->(name, list) do
2
+ fn_erb_render_hashes.('text/_receipt_section.txt.erb', { name: name, list: list }, {})
3
+ end -%>
4
+ <%= banner_line %>
5
+ <%= fn_center.(entity || 'Unspecified Entity') %>
6
+ <%= fn_center.('Receipts Report') %>
7
+ <%= banner_line %>
8
+
9
+ <% # Unlike existing and missing, which arrays of hashes with keys :receipt and :journal, unused is an array of receipt filespecs %>
10
+
11
+ <%= create_section.('Missing', missing) %>
12
+ <%= create_section.('Unused', unused.map { |receipt| { receipt: receipt, journal: nil } }) %>
13
+ <%= create_section.('Existing', existing) %>
@@ -0,0 +1,18 @@
1
+ <%= banner_line %>
2
+ <%= fn_center.(entity || 'Unspecified Entity') %>
3
+ <%= fn_center.("Transactions for Account #{account_string}") %>
4
+ <%= fn_center.(sprintf("Total: %.2f", total)) %>
5
+ <%= banner_line %>
6
+
7
+
8
+ <% if entries.empty? %>
9
+ There were no transactions for this account.
10
+
11
+
12
+ <% else -%>
13
+ <% entries.each do |entry| -%>
14
+ <%= fn_format_multidoc_entry.(entry) %>
15
+ <% end -%>
16
+
17
+ <%= fn_erb_render_binding.('text/_totals.txt.erb', binding) %>
18
+ <% end %>
@@ -1,6 +1,8 @@
1
+ require_relative 'data/tx_one_account_data'
1
2
  require_relative '../documents/chart_of_accounts'
2
3
  require_relative '../documents/journal'
3
- require_relative 'reporter'
4
+ require_relative 'helpers/erb_helper'
5
+ require_relative 'helpers/reporter'
4
6
  require_relative 'report_context'
5
7
 
6
8
  module RockBooks
@@ -8,56 +10,19 @@ module RockBooks
8
10
  class TxOneAccount
9
11
 
10
12
  include Reporter
13
+ include ErbHelper
11
14
 
12
- attr_reader :context, :account_code, :account
15
+ attr_reader :context, :account_code, :data
13
16
 
14
17
 
15
- def initialize(report_context, account_code)
18
+ def initialize(data, report_context)
19
+ @data = data
16
20
  @context = report_context
17
- @account_code = account_code
18
- @account = context.chart_of_accounts.account_for_code(account_code)
19
21
  end
20
22
 
21
23
 
22
- def generate_header(account_total)
23
- lines = [banner_line]
24
- lines << center(context.entity || 'Unspecified Entity')
25
- lines << center("Transactions for Account #{account_code_name_type_string(account)}")
26
- lines << center("Total: %.2f" % account_total)
27
- lines << banner_line
28
- lines << ''
29
- lines << ''
30
- lines << ''
31
- lines.join("\n")
24
+ def generate
25
+ ErbHelper.render_hashes('text/tx_one_account.txt.erb', data, template_presentation_context)
32
26
  end
33
-
34
-
35
- def process_account(entries)
36
- entries.each_with_object('') do |entry, output|
37
- output << format_multidoc_entry(entry) << "\n"
38
- output << "\n" if entry.description && entry.description.length > 0
39
- end
40
- end
41
-
42
-
43
- def generate_report
44
- entries = Journal.entries_in_documents(context.journals, JournalEntryFilters.account_code(account_code))
45
- account_total = JournalEntry.total_for_code(entries, account_code)
46
- output = generate_header(account_total)
47
-
48
- if entries.empty?
49
- output << "There were no transactions for this account.\n\n\n\n"
50
- else
51
- output << process_account(entries)
52
- totals = AcctAmount.aggregate_amounts_by_account(JournalEntry.entries_acct_amounts(entries))
53
- output << generate_and_format_totals('Totals', totals)
54
- end
55
-
56
- output
57
- end
58
-
59
- alias_method :to_s, :generate_report
60
- alias_method :call, :generate_report
61
27
  end
62
-
63
28
  end
@@ -2,6 +2,18 @@ module RockBooks
2
2
 
3
3
  # The ChartOfAccount holds the set of all these accounts for the entity.
4
4
  class Account < Struct.new(:code, :type, :name)
5
- end
6
5
 
6
+ PERMITTED_CODE_CHAR_REGEX = /[\w\-\.]$/ # word chars (letters, numbers, underscores), hyphens, periods
7
+
8
+ def validate_code(code)
9
+ unless PERMITTED_CODE_CHAR_REGEX.match(code)
10
+ raise "Code {#{code}} may only contain letters, numbers, underscores, hyphens, and periods."
11
+ end
12
+ end
13
+
14
+ def initialize(code, type, name)
15
+ validate_code(code)
16
+ super
17
+ end
18
+ end
7
19
  end
@@ -12,7 +12,7 @@ module RockBooks
12
12
 
13
13
  ALL_TYPES = [ASSET, LIABILITY, EQUITY, INCOME, EXPENSE]
14
14
 
15
- TYPE_HASH = {
15
+ LETTER_TO_TYPE = {
16
16
  'A' => ASSET,
17
17
  'L' => LIABILITY,
18
18
  'O' => EQUITY,
@@ -20,14 +20,25 @@ module RockBooks
20
20
  'E' => EXPENSE
21
21
  }
22
22
 
23
- # Converts strings
24
- def self.to_type(string)
25
- type = TYPE_HASH[string[0].upcase]
26
- if type.nil?
23
+ SYMBOL_TO_TYPE = {
24
+ :asset => ASSET,
25
+ :liability => LIABILITY,
26
+ :equity => EQUITY,
27
+ :income => INCOME,
28
+ :expense => EXPENSE
29
+ }
30
+
31
+ # Converts type upper case letter representation to a type object (e.g. 'A' => ASSET)
32
+ def self.letter_to_type(string)
33
+ key = string[0].upcase
34
+ LETTER_TO_TYPE.fetch(key) do
27
35
  raise Error.new("Account type of #{string} not valid. " +
28
- "Must be one of #{TYPE_HASH.keys} (#{ALL_TYPES.map(&:singular_name)})")
36
+ "Must be one of #{LETTER_TO_TYPE.keys} (#{ALL_TYPES.map(&:singular_name)})")
29
37
  end
30
- type
38
+ end
39
+
40
+ def self.symbol_to_type(symbol)
41
+ SYMBOL_TO_TYPE[symbol]
31
42
  end
32
43
  end
33
44
  end
@@ -1,3 +1,3 @@
1
1
  module RockBooks
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_dependency 'amazing_print', '> 0'
34
34
  spec.add_dependency 'os', '> 1.0.0'
35
35
  spec.add_dependency 'pry', '> 0.0.0'
36
+ spec.add_dependency 'prawn', '>= 2.1'
36
37
 
37
38
  spec.add_development_dependency "bundler", "~> 2.0"
38
39
  spec.add_development_dependency "rake", ">= 12.3.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rock_books
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Bennett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-16 00:00:00.000000000 Z
11
+ date: 2021-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.0.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: prawn
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '2.1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '2.1'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -111,6 +125,7 @@ files:
111
125
  - README.md
112
126
  - RELEASE_NOTES.md
113
127
  - Rakefile
128
+ - assets/fonts/JetBrainsMono-Medium.ttf
114
129
  - bin/console
115
130
  - bin/setup
116
131
  - exe/rock_books
@@ -134,15 +149,32 @@ files:
134
149
  - lib/rock_books/helpers/parse_helper.rb
135
150
  - lib/rock_books/reports/balance_sheet.rb
136
151
  - lib/rock_books/reports/book_set_reporter.rb
152
+ - lib/rock_books/reports/data/bs_is_data.rb
153
+ - lib/rock_books/reports/data/bs_is_section_data.rb
154
+ - lib/rock_books/reports/data/journal_data.rb
155
+ - lib/rock_books/reports/data/multidoc_txn_by_account_data.rb
156
+ - lib/rock_books/reports/data/multidoc_txn_report_data.rb
157
+ - lib/rock_books/reports/data/receipts_report_data.rb
158
+ - lib/rock_books/reports/data/tx_one_account_data.rb
159
+ - lib/rock_books/reports/helpers/erb_helper.rb
160
+ - lib/rock_books/reports/helpers/reporter.rb
137
161
  - lib/rock_books/reports/income_statement.rb
138
- - lib/rock_books/reports/index.html.erb
139
- - lib/rock_books/reports/multidoc_transaction_report.rb
140
- - lib/rock_books/reports/receipts.html.erb
162
+ - lib/rock_books/reports/journal_report.rb
163
+ - lib/rock_books/reports/multidoc_txn_by_account_report.rb
164
+ - lib/rock_books/reports/multidoc_txn_report.rb
141
165
  - lib/rock_books/reports/receipts_report.rb
142
166
  - lib/rock_books/reports/report_context.rb
143
- - lib/rock_books/reports/reporter.rb
144
- - lib/rock_books/reports/transaction_report.rb
145
- - lib/rock_books/reports/tx_by_account.rb
167
+ - lib/rock_books/reports/templates/html/index.html.erb
168
+ - lib/rock_books/reports/templates/html/report_page.html.erb
169
+ - lib/rock_books/reports/templates/text/_receipt_section.txt.erb
170
+ - lib/rock_books/reports/templates/text/_totals.txt.erb
171
+ - lib/rock_books/reports/templates/text/balance_sheet.txt.erb
172
+ - lib/rock_books/reports/templates/text/income_statement.txt.erb
173
+ - lib/rock_books/reports/templates/text/journal.txt.erb
174
+ - lib/rock_books/reports/templates/text/multidoc_txn_by_account_report.txt.erb
175
+ - lib/rock_books/reports/templates/text/multidoc_txn_report.txt.erb
176
+ - lib/rock_books/reports/templates/text/receipts_report.txt.erb
177
+ - lib/rock_books/reports/templates/text/tx_one_account.txt.erb
146
178
  - lib/rock_books/reports/tx_one_account.rb
147
179
  - lib/rock_books/types/account.rb
148
180
  - lib/rock_books/types/account_type.rb
@@ -431,7 +463,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
431
463
  - !ruby/object:Gem::Version
432
464
  version: '0'
433
465
  requirements: []
434
- rubygems_version: 3.1.4
466
+ rubygems_version: 3.2.3
435
467
  signing_key:
436
468
  specification_version: 4
437
469
  summary: Very basic accounting package.
@@ -1,156 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
-
4
- <html>
5
-
6
- <head>
7
-
8
- <!--Bootstrap:-->
9
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
10
-
11
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
12
- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
13
-
14
- <style>
15
- body {
16
- padding: 18px;
17
- background-color: #e7f7cd;
18
- color: darkgreen;
19
- }
20
-
21
- h2 {
22
- margin-top: 32px;
23
- margin-bottom: 12px;
24
- }
25
-
26
- .this_page_style {
27
- background-color: #e7f7cd;
28
- color: darkgreen;
29
- border: 0px;
30
- }
31
-
32
-
33
-
34
- </style>
35
-
36
- </head>
37
-
38
- <body>
39
-
40
- <h1><%= chart_of_accounts.entity %></h1>
41
- <p class="muted">Reports Generated at <%= DateTime.now.strftime('%Y-%m-%d %H:%M:%S') %> by RockBooks version <%=RockBooks::VERSION %></p>
42
-
43
-
44
- <h2>Financial Statements</h2>
45
- <div id="financial-statements">
46
- <a href='balance_sheet.html' class="btn btn-success">Balance Sheet</a>
47
- <a href='income_statement.html' class="btn btn-success">Income Statement</a>
48
- </div>
49
-
50
-
51
- <h2>Supporting Documents</h2>
52
- <div id="supporting-documents" style="display: inline ">
53
- <%
54
- subdir_link = ->(name, caption) do
55
- dir_name = File.expand_path(File.join(Dir.pwd, name))
56
- if Dir.exist?(dir_name)
57
- %Q{<a href=#{dir_name} class="btn btn-success">#{caption}</a>}
58
- end
59
- end
60
- %>
61
- <%= subdir_link.('invoices', 'Invoices') %>
62
- <%= subdir_link.('receipts', 'Receipts') %>
63
- <%= subdir_link.('statements', 'Statements') %>
64
- <%= subdir_link.('worksheets', 'Worksheets') %>
65
- </div>
66
-
67
-
68
- <h2>All Transactions Reports</h2>
69
- <div id="all-transactions">
70
- <a href="all_txns_by_acct.html" class="btn btn-success">By Account</a>
71
- <a href="all_txns_by_amount.html" class="btn btn-success">By Amount</a>
72
- <a href="all_txns_by_date.html" class="btn btn-success">By Date</a>
73
- </div>
74
-
75
- <% collapsible_heading = ->(caption, href) do
76
- %Q{<br /><br />
77
- <div class="collapsible-heading">
78
- <div class="container-fluid">
79
- <div class="row">
80
-
81
- <div class="col-sm2" style="margin-right: 12px;">
82
- <a class="btn btn-success" data-toggle="collapse" href="#{href}" role="button" aria-expanded="false" aria-controls="collapseExample">
83
- +/-
84
- </a>
85
- </div>
86
-
87
- <div class="col-sm10">
88
- <h2 style="margin: 0px;">#{caption}</h2>
89
- </div>
90
- </div>
91
- </div>
92
- </div>
93
- }
94
- end
95
- %>
96
-
97
- <%= collapsible_heading.('Journal Reports', '#journal-reports') %>
98
-
99
- </div>
100
- <div class="collapse" id="journal-reports">
101
- <div class="card card-body this_page_style">
102
- <ul>
103
- <% journals.each do |journal|
104
- filespec = journal.short_name + '.html'
105
- caption = "#{journal.title} -- #{journal.short_name} -- #{journal.account_code}"%>
106
- <li><a href="<%= filespec %>" class="this_page_style" target="_blank"><%= caption %></a></li>
107
- <% end %>
108
- </ul>
109
- </div>
110
- </div>
111
-
112
-
113
- <%= collapsible_heading.('Individual Accounts', '#individual-accounts') %>
114
-
115
- <div class="collapse" id="individual-accounts">
116
- <div class="card card-body this_page_style">
117
- <ul>
118
-
119
- <%
120
- chart_of_accounts.accounts.each do |account|
121
- filespec = File.join('single-account', "acct_#{account.code}.html")
122
- caption = "#{account.name} (#{account.code})"
123
- %>
124
- <li><a href="<%= filespec %>" class="this_page_style"><%= caption %></a></li>
125
- <% end %>
126
- </ul>
127
- </div>
128
- </div>
129
- </div>
130
-
131
-
132
- <%= collapsible_heading.('Other', '#other') %>
133
-
134
- <div class="collapse" id="other">
135
- <div class="card card-body this_page_style">
136
- <ul>
137
- <% if run_options.do_receipts %>
138
- <li><a href="receipts.html" class="this_page_style">Missing and Existing Receipts</a></li>
139
- <% end %>
140
- </ul>
141
- </div>
142
- </div>
143
-
144
- <%= collapsible_heading.('Reports in PDF and Text Formats', '#other-formats') %>
145
-
146
- <div class="collapse" id="other-formats">
147
- <div class="card card-body this_page_style">
148
- <ul>
149
- <li><a href="../pdf" class="this_page_style" target="_blank">PDF Format</a></li>
150
- <li><a href="../txt" class="this_page_style" target="_blank">Text Format</a></li>
151
- </ul>
152
- </div>
153
- </div>
154
-
155
- </body>
156
- </html>