lucabook 0.2.22 → 0.2.27

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.
@@ -0,0 +1,67 @@
1
+ <html>
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
5
+ <style>
6
+ td { text-align: right; line-height: 2em; min-width: 6em }
7
+ thead th, thead td { text-align: center }
8
+ thead { border-bottom: solid 1px #aaa }
9
+ tr#total { border-top: solid 1px #aaa }
10
+ tr.sub { font-size: .8em; color: #aaa }
11
+ .past { color: #777 }
12
+ </style>
13
+ </head>
14
+ <body>
15
+ <div style="margin: 1em 0"><%= @company %></div>
16
+
17
+ <h2>Income Statement</h2>
18
+ <div style="overflow-x: scroll">
19
+ <table>
20
+ <thead>
21
+ <tr>
22
+ <th></th>
23
+ <% @months.each do |d| %>
24
+ <th><%= d %></th>
25
+ <% end %>
26
+ </tr>
27
+ </thead>
28
+ <tbody>
29
+ <% @pl.each.with_index(1) do |(key, val), i| %>
30
+ <tr>
31
+ <td><%= key %></td>
32
+ <% val.each do |v| %>
33
+ <td><%= delimit_num(v) %></td>
34
+ <% end %>
35
+ </tr>
36
+ <% end %>
37
+ </tbody>
38
+ </table>
39
+ </div>
40
+
41
+ <h2>Balance Sheet</h2>
42
+ <div style="overflow-x: scroll">
43
+ <table>
44
+ <thead>
45
+ <tr>
46
+ <th>Account</th><th>Balance</th><th>Change</th>
47
+ <th>Account</th><th>Balance</th><th>Change</th>
48
+ </tr>
49
+ </thead>
50
+ <tbody>
51
+ <% @bs.each.with_index(1) do |row, i| %>
52
+ <tr>
53
+ <td><%= row['debit_label'] %></td>
54
+ <td><%= delimit_num(row['debit_balance']) %></td>
55
+ <td><%= delimit_num(row['debit_diff']) %></td>
56
+
57
+ <td><%= row['credit_label'] %></td>
58
+ <td><%= delimit_num(row['credit_balance']) %></td>
59
+ <td><%= delimit_num(row['credit_diff']) %></td>
60
+ </tr>
61
+ <% end %>
62
+ </tbody>
63
+ </table>
64
+ </div>
65
+
66
+ </body>
67
+ </html>
@@ -24,7 +24,7 @@ module LucaBook
24
24
 
25
25
  def amount_by_code(items, code)
26
26
  items
27
- .select { |item| item.dig(:code) == code }
27
+ .select { |item| /^#{code}/.match(item[:code]) }
28
28
  .inject(BigDecimal('0')) { |sum, item| sum + item[:amount] }
29
29
  end
30
30
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucaBook
4
- VERSION = '0.2.22'
4
+ VERSION = '0.2.27'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucabook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.22
4
+ version: 0.2.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuma Takahiro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-25 00:00:00.000000000 Z
11
+ date: 2021-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lucarecord
@@ -79,17 +79,23 @@ files:
79
79
  - LICENSE
80
80
  - exe/luca-book
81
81
  - lib/luca_book.rb
82
+ - lib/luca_book/accumulator.rb
82
83
  - lib/luca_book/console.rb
83
84
  - lib/luca_book/dict.rb
84
85
  - lib/luca_book/import.rb
85
86
  - lib/luca_book/import_jp.rb
86
87
  - lib/luca_book/journal.rb
87
88
  - lib/luca_book/list.rb
89
+ - lib/luca_book/list_by_header.rb
88
90
  - lib/luca_book/setup.rb
89
91
  - lib/luca_book/state.rb
90
92
  - lib/luca_book/templates/base-jp.xbrl.erb
93
+ - lib/luca_book/templates/base-jp.xsd.erb
94
+ - lib/luca_book/templates/config.yml
91
95
  - lib/luca_book/templates/dict-en.tsv
96
+ - lib/luca_book/templates/dict-jp-edinet.tsv
92
97
  - lib/luca_book/templates/dict-jp.tsv
98
+ - lib/luca_book/templates/monthly-report.html.erb
93
99
  - lib/luca_book/util.rb
94
100
  - lib/luca_book/version.rb
95
101
  homepage: https://github.com/chumaltd/luca/tree/master/lucabook
@@ -113,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
119
  - !ruby/object:Gem::Version
114
120
  version: '0'
115
121
  requirements: []
116
- rubygems_version: 3.1.2
122
+ rubygems_version: 3.2.3
117
123
  signing_key:
118
124
  specification_version: 4
119
125
  summary: Book keep