2.0.1 • Published 3 months ago

@trustbank-inc/furusato-tax-simulation v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

furusato-tax-simulation

ふるさと納税の控除上限額を計算するライブラリです。

概要

簡易的な家族構成・年収を入力することで控除上限額を出力する「簡易シミュレーション」と、寄付者の源泉徴収票の情報をもとに控除上限額を計算する「詳細シミュレーション」の2つで構成されるシミュレーションライブラリです。

インストール

npmを利用する

$ npm i @trustbank-inc/furusato-tax-simulation

利用方法

npmを利用する

import {
    executeEasySimulation,
    executeSpeficSimulation,
    FamilyValues,
    IncomeValues,
    SingleValues,
    SpouseValues
} from '@trustbank-inc/furusato-tax-simulation';

executeEasySimulation(
    FamilyValues.couple,
    IncomeValues.lessThan600
);

executeSpecificSimulation({
    dependentsExcludedChildren: '1',
    dependentsIncludedChildren: '1',
    dependentsSpecialChildren: '1',
    dependentsGeneral: '1',
    dependentsElderlyParentsSeparated: '1',
    dependentsElderlyParentsLivingTogether: '1',
    earthquakeInsurancePremium: '100000',
    disability: '1',
    specialDisabilitySeparated: '1',
    specialDisabilityLivingTogether: '1',
    income: '10000000',
    lifeInsurance: '100000',
    medicalExpense: '100000',
    specialCreditForHousingLoan: '100000',
    mutualAidPremium: '100000',
    capitalGainsUnlistedStock: '100000',
    socialInsurancePremium: '100000',
    single: SingleValues.none,
    spouse: SpouseValues.general,
    spouseIncome: '100000',
    capitalGainsListedStock: '100000',
    widow: false,
    donation: '100000'
});

各関数の値

簡易シミュレーション

プロパティ

KeyValueType
family家族構成FamilyValues
Income年収IncomeValues

家族構成

KeyValue
FamilyValues.coupleAndChild夫婦+子1人(高校生)
FamilyValues.couple夫婦
FamilyValues.singleOrNonSupport独身又は共働き
FamilyValues.pensioner年金収入者

年収

KeyValue
IncomeValues.lessThan150150万円以下
IncomeValues.lessThan200200万円以下
IncomeValues.lessThan300300万円以下
IncomeValues.lessThan400400万円以下
IncomeValues.lessThan500500万円以下
IncomeValues.lessThan600600万円以下
IncomeValues.lessThan700700万円以下
IncomeValues.lessThan800800万円以下
IncomeValues.lessThan900900万円以下
IncomeValues.lessThan10001000万円以下
IncomeValues.lessThan15001500万円以下
IncomeValues.lessThan20002000万円以下
IncomeValues.lessThan30003000万円以下
IncomeValues.lessThan50005000万円以下
IncomeValues.moreThan100001億円以上

詳細シミュレーション

入力項目のプロパティ

KeyValueType
dependentsExcludedChildren15歳以下の扶養家族String\|Number
dependentsIncludedChildren16~18歳の扶養家族String\|Number
dependentsSpecialChildren19~22歳の扶養家族String\|Number
dependentsGeneral23~69歳の扶養家族String\|Number
dependentsElderlyParentsSeparated70歳以上の扶養家族String\|Number
dependentsElderlyParentsLivingTogether70歳以上かつ同居の扶養家族(親・祖父母)String\|Number
earthquakeInsurancePremium地震保険料控除額String\|Number
disability一般の障害者String\|Number
specialDisabilitySeparated特別障害者(別居または本人)String\|Number
specialDisabilityLivingTogether同居特別障害者String\|Number
income本人の給与収入String\|Number
lifeInsurance生命保険料控除額String\|Number
medicalExpense医療費控除の金額String\|Number
specialCreditForHousingLoan住宅借入金等特別控除額String\|Number
mutualAidPremium小規模企業共済等掛金の金額String\|Number
capitalGainsUnlistedStock本人の株式譲渡益(非上場)String\|Number
singleひとり親に該当するかSingleValues
socialInsurancePremium社会保険料等の金額String\|Number
spouse配偶者の有無SpouseValues
spouseIncome配偶者の給与収入String\|Number
capitalGainsListedStock本人の株式譲渡益(上場)String\|Number
widow寡婦に該当するかBoolean

ひとり親

KeyValue
SingleValues.none非該当
SingleValues.singleFatherひとり親(男性)
SingleValues.singleMotherひとり親(女性)

配偶者

KeyValue
SpouseValues.noneなし
SpouseValues.general一般の控除対象配偶者(69歳以下)
SpouseValues.elderly老人控除対象配偶者(70歳以上)

出力項目のプロパティ

KeyValueType
result理論上の金額number
donationAmountUnderSelfPay2000自己負担額が2000円で済む寄附金額number
beforeDonationDeductionDetail寄附金控除前の詳細BeforeDonationDeductionDetail
incomeTaxDifference所得税における税の軽減額number
residentTaxDifference住民税における税の軽減額number
afterDonationDeductionDetail寄附金控除後の詳細AfterDonationDeductionDetail

beforeDonationDeductionDetailのプロパティ

KeyValueType
incomeTaxDetail寄附金控除前の所得税の詳細IncomeTaxBeforeDonationDeductionDetail
residentTaxDetail寄附金控除前の住民税の詳細ResidentTaxBeforeDonationDeductionDetail

afterDonationDeductionDetailのプロパティ

KeyValueType
incomeTaxDetail寄附金控除後の所得税の詳細IncomeTaxAfterDonationDeductionDetail
residentTaxDetail寄附金控除後の住民税の詳細ResidentTaxAfterDonationDeductionDetail

IncomeTaxBeforeDonationDeductionDetailのプロパティ

KeyValueType
employmentIncome給与所得number
capitalGainsListedStock譲渡所得(株式譲渡/上場)number
capitalGainsUnlistedStock譲渡所得(株式譲渡/非上場)number
taxableBaseTotal課税標準の合計額number
spousalDeduction配偶者控除number
specialSpousalDeduction配偶者特別控除number
dependentDeduction扶養控除number
socialInsurancePremiumDeduction社会保険料控除number
mutualAidPremiumDeduction小規模企業共済掛金控除number
lifeInsurancePremiumDeduction生命保険料控除(所得税ベース)number
earthquakeInsurancePremiumDeduction地震保険料控除number
widowDeduction寡婦控除number
singleDeductionひとり親控除number
disabilityDeduction障害者控除number
medicalExpensesDeduction医療費控除number
basicDeduction基礎控除number
incomeDeductionTotal所得控除の合計number
taxableGrossIncome課税総所得金額number
taxableCapitalGainsListedStock課税譲渡所得等の金額(上場株式)number
taxableCapitalGainsUnlistedStock課税譲渡所得等の金額(一般株式)number
taxableGrossIncomeTax課税総所得金額に対する税額number
taxableCapitalGainsListedStockTax課税譲渡所得(上場株式)に対する税額number
taxableCapitalGainsUnlistedStockTax課税譲渡所得(一般株式)に対する税額number
incomeTaxAfterHousingLoanDeduction住宅ローン控除後所得税額number
actualIncomeTax実際の所得税額number

ResidentTaxBeforeDonationDeductionDetailのプロパティ

KeyValueType
employmentIncome給与所得number
capitalGainsListedStock譲渡所得(株式譲渡/上場)number
capitalGainsUnlistedStock譲渡所得(株式譲渡/非上場)number
taxableBaseTotal課税標準の合計額number
spousalDeduction配偶者控除number
specialSpousalDeduction配偶者特別控除number
dependentDeduction扶養控除number
socialInsurancePremiumDeduction社会保険料控除number
mutualAidPremiumDeduction小規模企業共済掛金控除number
lifeInsurancePremiumDeduction生命保険料控除(所得税ベース)number
earthquakeInsurancePremiumDeduction地震保険料控除number
widowDeduction寡婦控除number
singleDeductionひとり親控除number
disabilityDeduction障害者控除number
medicalExpensesDeduction医療費控除number
basicDeduction基礎控除number
incomeDeductionTotal所得控除の合計number
taxableGrossIncome課税総所得金額number
taxableCapitalGainsListedStock課税譲渡所得等の金額(上場株式)number
taxableCapitalGainsUnlistedStock課税譲渡所得等の金額(一般株式)number
isTaxableResidentTax住民税は非課税かboolean
gradedIncomeTax住民税所得割額number

IncomeTaxAfterDonationDeductionDetailのプロパティ

KeyValueType
donationDeduction寄附金控除number
incomeDeductionTotal所得控除の合計number
taxableGrossIncome課税総所得金額number
taxableCapitalGainsListedStock課税譲渡所得等の金額(上場株式)number
taxableCapitalGainsUnlistedStock課税譲渡所得等の金額(一般株式)number
taxableGrossIncomeTax課税総所得金額に対する税額number
taxableCapitalGainsListedStockTax課税譲渡所得(上場株式)に対する税額number
taxableCapitalGainsUnlistedStockTax課税譲渡所得(一般株式)に対する税額number
incomeTaxAfterHousingLoanDeduction住宅ローン控除後所得税額number
actualIncomeTax実際の所得税額number

ResidentTaxAfterDonationDeductionDetailのプロパティ

KeyValueType
incomeDeductionTotal所得控除の合計number
taxableGrossIncome課税総所得金額number
taxableCapitalGainsListedStock課税譲渡所得等の金額(上場株式)number
taxableCapitalGainsUnlistedStock課税譲渡所得等の金額(一般株式)number
donationDeduction寄附金税額控除number
gradedIncomeTax住民税所得割額number

ライセンス

このプロジェクトはMITライセンスの元で提供されています。詳細については、LICENSE.txtファイルをご覧ください。

2.0.1

3 months ago

2.0.0

3 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago