npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@trustbank-inc/furusato-tax-simulation

v2.0.3

Published

furusato-tax-simulation ====

Downloads

230

Readme

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'
});

各関数の値

簡易シミュレーション

プロパティ

| Key | Value | Type | |:---------|:------|:---------------| | family | 家族構成 | FamilyValues | | Income | 年収 | IncomeValues |

家族構成

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

年収

| Key | Value | |:-----------------------------|:---------| | IncomeValues.lessThan150 | 150万円以下 | | IncomeValues.lessThan200 | 200万円以下 | | IncomeValues.lessThan300 | 300万円以下 | | IncomeValues.lessThan400 | 400万円以下 | | IncomeValues.lessThan500 | 500万円以下 | | IncomeValues.lessThan600 | 600万円以下 | | IncomeValues.lessThan700 | 700万円以下 | | IncomeValues.lessThan800 | 800万円以下 | | IncomeValues.lessThan900 | 900万円以下 | | IncomeValues.lessThan1000 | 1000万円以下 | | IncomeValues.lessThan1500 | 1500万円以下 | | IncomeValues.lessThan2000 | 2000万円以下 | | IncomeValues.lessThan3000 | 3000万円以下 | | IncomeValues.lessThan5000 | 5000万円以下 | | IncomeValues.moreThan10000 | 1億円以上 |

詳細シミュレーション

入力項目のプロパティ

| Key | Value | Type | |:-------------------------------------|:----------------------|:-----------------| | dependentsExcludedChildren | 15歳以下の扶養家族 | String\|Number | | dependentsIncludedChildren | 16~18歳の扶養家族 | String\|Number | | dependentsSpecialChildren | 19~22歳の扶養家族 | String\|Number | | dependentsGeneral | 23~69歳の扶養家族 | String\|Number | | dependentsElderlyParentsSeparated | 70歳以上の扶養家族 | String\|Number | | dependentsElderlyParentsLivingTogether | 70歳以上かつ同居の扶養家族(親・祖父母) | 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 |

ひとり親

| Key | Value | |:----------------------------|:---------| | SingleValues.none | 非該当 | | SingleValues.singleFather | ひとり親(男性) | | SingleValues.singleMother | ひとり親(女性) |

配偶者

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

出力項目のプロパティ

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

beforeDonationDeductionDetailのプロパティ

| Key | Value | Type | |:---------|:------|:---------------| | incomeTaxDetail | 寄附金控除前の所得税の詳細 | IncomeTaxBeforeDonationDeductionDetail | | residentTaxDetail | 寄附金控除前の住民税の詳細 | ResidentTaxBeforeDonationDeductionDetail |

afterDonationDeductionDetailのプロパティ

| Key | Value | Type | |:---------|:------|:---------------| | incomeTaxDetail | 寄附金控除後の所得税の詳細 | IncomeTaxAfterDonationDeductionDetail | | residentTaxDetail | 寄附金控除後の住民税の詳細 | ResidentTaxAfterDonationDeductionDetail |

IncomeTaxBeforeDonationDeductionDetailのプロパティ

| Key | Value | Type | |:---------|:------|:---------------| | 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のプロパティ

| Key | Value | Type | |:---------|:------|:---------------| | 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のプロパティ

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

ResidentTaxAfterDonationDeductionDetailのプロパティ

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

ライセンス

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