Class: Luca::Jp::Syouhizei
- Inherits:
-
LucaBook::State
- Object
- LucaBook::State
- Luca::Jp::Syouhizei
- Defined in:
- lib/luca/jp/syouhizei.rb
Instance Method Summary collapse
- #export_json ⇒ Object
-
#kani(export: false) ⇒ Object
TODO: 軽減税率売上の識別.
- #付表五の三 ⇒ Object
- #付表四の三 ⇒ Object
- #申告書簡易課税 ⇒ Object
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 ItPart
#it_part, #jigyo_nendo_from, #jigyo_nendo_to, #kazei_kikan_from, #kazei_kikan_to, #parse_houjinbango, #parse_kinyukikan, #parse_tel, #parse_zeimusho, #parse_zip, #render_it_tag, #teisyutsu_day
Methods included from Common
一般区分の税額, 中小企業の軽減税率対象を超える所得, 中小企業の軽減税率対象所得, 中小企業の軽減税額, 中間還付税額, 地方法人特別税, 地方法人税額, 地方消費税中間納付額, 地方税資本金等の額, 均等割, 当期所得金額, 当期控除計, 当期繰越損失, 所得400万以下, 所得800万以下, 所得800万超, 所得割400万以下, 所得割800万以下, 所得割800万超, 所得割税率400万以下, 所得割税率800万以下, 所得割税率800万超, 所得金額, 期末資本金, 期首繰越損失, 未納事業税期中増減, 法人税割, 法人税割税率, 消費税中間納付額, 消費税課税売上高, 税額計算, 納付税額, 翌期繰越損失, 資本金等の額, 軽減税率不適用法人, 還付事業税
Instance Method Details
#export_json ⇒ Object
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 |
# File 'lib/luca/jp/syouhizei.rb', line 77 def export_json dat = kani(export: true) [].tap do |res| item = {} item['date'] = @end_date item['debit'] = [] item['credit'] = [] if dat[:kokuzei][:chukan] > 0 item['credit'] << { 'label' => '仮払消費税', 'amount' => dat[:kokuzei][:chukan] } end if dat[:kokuzei][:chukan] > dat[:kokuzei][:zeigaku] item['debit'] << { 'label' => '未収消費税等', 'amount' => dat[:kokuzei][:chukan] - dat[:kokuzei][:zeigaku] } else item['credit'] << { 'label' => '未払消費税等', 'amount' => dat[:kokuzei][:zeigaku] - dat[:kokuzei][:chukan] } end item['debit'] << { 'label' => '消費税', 'amount' => dat[:kokuzei][:zeigaku] } if dat[:chihou][:chukan] > 0 item['credit'] << { 'label' => '仮払地方消費税', 'amount' => dat[:chihou][:chukan] } end if dat[:chihou][:chukan] > dat[:chihou][:zeigaku] item['debit'] << { 'label' => '未収消費税等', 'amount' => dat[:chihou][:chukan] - dat[:chihou][:zeigaku] } else item['credit'] << { 'label' => '未払消費税等', 'amount' => dat[:chihou][:zeigaku] - dat[:chihou][:chukan] } end item['debit'] << { 'label' => '消費税', 'amount' => dat[:chihou][:zeigaku] } item['x-editor'] = 'LucaJp' res << item puts JSON.dump(res) end end |
#kani(export: false) ⇒ Object
TODO: 軽減税率売上の識別
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 |
# File 'lib/luca/jp/syouhizei.rb', line 24 def kani(export: false) set_pl(4) set_bs(4) @issue_date = Date.today @company = CGI.escapeHTML(config.dig('company', 'name')) @software = 'LucaJp' @shinkoku_kbn = '1' # 確定申告 税率 = BigDecimal('7.8') # percent 地方税率 = BigDecimal('2.2') @sales = @pl_data.dig('A0') * 100 / (100 + 税率 + 地方税率).floor @tax_amount = (課税標準額(@sales) * 税率 / 100).floor @みなし仕入税額 = (@tax_amount * みなし仕入率(config.dig('jp', 'syouhizei_kubun')) / 100).floor @税額 = LucaSupport::Code.readable(((@tax_amount - @みなし仕入税額) / 100).floor * 100) @譲渡割額 = (@税額 * 地方税率 / (税率*100)).floor * 100 @中間納付額 = 消費税中間納付額 @地方税中間納付額 = 地方消費税中間納付額 if export { kokuzei: { zeigaku: @税額, chukan: @中間納付額 }, chihou: { zeigaku: @譲渡割額, chukan: @地方税中間納付額 } } else @procedure_code = 'RSH0040' @procedure_name = '消費税及び地方消費税申告(簡易課税・法人)' @form_vers = proc_version @version = @form_vers['proc'] @form_sec = ['SHA020', 'SHB047', 'SHB067'].map{ |c| form_rdf(c) }.join('') @it = it_part @form_data = [申告書簡易課税, 付表四の三, 付表五の三].join("\n") render_erb(search_template('consumption.xtx.erb')) end end |
#付表五の三 ⇒ Object
73 74 75 |
# File 'lib/luca/jp/syouhizei.rb', line 73 def 付表五の三 render_erb(search_template('fuhyo53.xml.erb')) end |
#付表四の三 ⇒ Object
69 70 71 |
# File 'lib/luca/jp/syouhizei.rb', line 69 def 付表四の三 render_erb(search_template('fuhyo43.xml.erb')) end |
#申告書簡易課税 ⇒ Object
65 66 67 |
# File 'lib/luca/jp/syouhizei.rb', line 65 def 申告書簡易課税 render_erb(search_template('syouhizei-shinkoku-kanni.xml.erb')) end |