Class: Luca::Jp::Chihouzei
- Inherits:
-
LucaBook::State
- Object
- LucaBook::State
- Luca::Jp::Chihouzei
show all
- Includes:
- Common, Util, LucaSupport::View
- Defined in:
- lib/luca/jp/chihouzei.rb
Instance Method Summary
collapse
Methods included from Util
beppyo2_config, config, eltax_config, etax_date, form_rdf, gaikyo_config, gengou, it_part_config, prepaid_tax, refund_tax, render_attr, tokyo23?, uchiwake_account_config, wareki, 中間還付税額, 期首期末残高, 納付税額, 純資産期中増減
Methods included from Common
レポート種別, 一般区分の税額, 一般寄付金の損金算入限度額, 中小企業の軽減税率対象を超える所得, 中小企業の軽減税率対象所得, 中小企業の軽減税額, 中間還付税額, 事業所数による分割課税標準, 事業税の分割課税標準, 別表四所得調整, 地方法人税額, 地方消費税中間納付額, 地方税資本金等の額, 均等割, 寄付金の損金不算入額, 当期控除計, 当期繰越損失, 従業員数による分割課税標準, 所得400万以下, 所得800万以下, 所得800万超, 所得割400万以下, 所得割800万以下, 所得割800万超, 所得割税率400万以下, 所得割税率800万以下, 所得割税率800万超, 所得金額, 期末資本金, 期首繰越損失, 未納事業税期中増減, 法人税割, 法人税割税率, 消費税中間納付額, 消費税課税売上高, 特別法人事業税, 税額計算, 納付税額, 翌期繰越損失, 資本金等の額, 軽減税率不適用法人
Instance Method Details
#export_json(report_cfg, ext_config: nil) ⇒ Object
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
# File 'lib/luca/jp/chihouzei.rb', line 113
def export_json(report_cfg, ext_config: nil)
records = kani(report_cfg, export: true, ext_config: ext_config)
label = @report_category == 'city' ? '市町村住民税' : '都道府県住民税'
{}.tap do |item|
item['date'] = @end_date
item['debit'] = []
item['credit'] = []
unless @report_category == 'city'
records[:jigyouzei].each do |k, dat|
if dat[:chukan] > 0
item['credit'] << { 'label' => karibarai_label(k, @report_category), 'amount' => dat[:chukan] }
end
if dat[:chukan] > dat[:zeigaku]
item['debit'] << { 'label' => '未収地方事業税', 'amount' => dat[:chukan] - dat[:zeigaku] }
else
item['credit'] << { 'label' => '未払地方事業税', 'amount' => dat[:zeigaku] - dat[:chukan] }
end
item['debit'] << { 'label' => '地方事業税', 'amount' => dat[:zeigaku] } if dat[:zeigaku] > 0
end
end
records[:juminzei].each do |k, dat|
if dat[:chukan] > 0
item['credit'] << { 'label' => karibarai_label(k, @report_category), 'amount' => dat[:chukan] }
end
if dat[:chukan] > dat[:zeigaku]
item['debit'] << { 'label' => "未収#{label}", 'amount' => dat[:chukan] - dat[:zeigaku] }
else
item['credit'] << { 'label' => "未払#{label}", 'amount' => dat[:zeigaku] - dat[:chukan] }
end
item['debit'] << { 'label' => label, 'amount' => dat[:zeigaku] } if dat[:zeigaku] > 0
end
item['x-customer'] = records[:customer] unless records[:customer].nil?
item['x-editor'] = 'LucaJp'
end
end
|
#kani(report_cfg, export: false, ext_config: nil, kessanbi: nil) ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# File 'lib/luca/jp/chihouzei.rb', line 20
def kani(report_cfg, export: false, ext_config: nil, kessanbi: nil)
set_pl(4)
set_bs(4)
@issue_date = Date.today
@kessanbi = kessanbi
@software = 'LucaJp'
@jimusho_name = report_cfg['jimusho_name']
@report_category = report_cfg['type']
@employee = report_cfg['employee'] || 1
@office_count = report_cfg['office_count'] || 1
@houjinzeiwari_rate = report_cfg['houjinzeiwari']
@shotoku399 = report_cfg['shotoku399']
@shotoku401 = report_cfg['shotoku401']
@shotoku801 = report_cfg['shotoku801']
|
#別表九 ⇒ Object
171
172
173
174
175
|
# File 'lib/luca/jp/chihouzei.rb', line 171
def
|
#別表九フォーム ⇒ Object
165
166
167
168
169
|
# File 'lib/luca/jp/chihouzei.rb', line 165
def
|
#別表四三 ⇒ Object
155
156
157
158
|
# File 'lib/luca/jp/chihouzei.rb', line 155
def
|
#第二十号 ⇒ Object
160
161
162
163
|
# File 'lib/luca/jp/chihouzei.rb', line 160
def
|
#第六号 ⇒ Object
149
150
151
152
153
|
# File 'lib/luca/jp/chihouzei.rb', line 149
def
|