Published Date : 2021年5月6日14:23

【Androidアプリ:パート15】個人事業主と給与所得者の所得税と住民税を計算するAndroidアプリ
【Android app:Part 15】Android App Calculates Income and Resident Taxes for sole proprietors and salaried workers


This blog has an English translation


ニコニコ動画にアップした動画のまとめ記事です。

This is a summary blog post about a video I uploaded to NicoNico.

細かい部分は動画を参考にしてください。

Please refer to the video for details.


目次

Table of Contents




① 動画の説明
① Video Description



警告:

今回説明する給与所得者と個人事業主等の所得税及び住民税を計算するアプリは、あくまで簡易的なお遊び用のアプリです。

正確な数値、計算方法は各自で調べて下さい。

このアプリは大雑把に大体の見積りを計算して楽しむ為のアプリです。

決して従業員の年末調整や個人の確定申告等に使用しないでください。

さらに、税金の計算方法は変更される場合があり、控除についても同様です。

また、控除や税金の計算方法が間違っている可能性もありますので、

あまり信用せずに、各自で調べてから実験してみてください。

このアプリを使って何かしらの損害が発生したとしても、私は一切の責任を負いません。

Warning:

​The app I'm going to show you for calculating income and residence taxes for salaried workers and Individual employers, etc. is just a simple application for playing.

​Please check the exact number and calculation method by yourself.

​This app is used to calculate rough estimates and enjoy them.

​Do not use for year-end adjustment of employees or for individual tax return.

In addition, the method of calculating taxes and deductions may change.

Also, there is a possibility that the deduction and tax calculation methods are incorrect.

Don't trust it too much, and test it yourself.

​I will not be liable for any damage caused by using this app.

個人事業主と給与所得者の所得税と住民税を計算するAndroidアプリパート15。

Android App Calculates Income and Resident Taxes for sole proprietors and salaried workers, Part 15.

前回の続きです。

Continued from last time.

今回もゆっくりと動画を再生させます。時間が無い方は6倍速くらいで見たほうが丁度いいかもしれません。

I will play the video slowly again this time. If you don't have time, it might be just right to watch at 6 times speed.

メインアクティビティから受け取った社会保険料の総額の値を取り出します。

Retrieves the total value of social insurance premiums received from the main activity.


Responsive image


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Intent intent = getIntent();
Bundle extras = intent.getExtras();


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

社会保険料の総額の値を使用するボタンが押されたかどうかはブーリアン変数を用いて判定します。

A boolean variable is used to determine if the button that uses the total value of the social insurance premium has been pressed.


Responsive image


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public void toSpTaxCalculatorWithReturn(View view) {
    if (whiteTaxReturnCheckBox.isChecked()) {
        spSelectedReturn = 1;
    }
    else if (blueTaxReturnCheckBox.isChecked()) {
        spSelectedReturn = 2;
    }
    else {
        spSelectedReturn = 0;
    }
    if (spSelectedReturn != 0) {
        Intent intent = new Intent(this, SpCalcTaxesActivity.class);
        if (spSelectedReturn == 1) {
            intent.putExtra("spTotalSocialInsurancePremium", spTotalSocialInsurancePremium);
        }
        else {
            intent.putExtra("spTotalSocialInsurancePremium", spTotalSocialInsurancePremiumBlueReturn);
        }
        intent.putExtra("spUseIs", true);
        startActivity(intent);
    } else {
        String text = "どちらかの申告のボックスにチェックを入れてね!";
        spCreateToast(text, Toast.LENGTH_SHORT);
    }
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

社会保険料控除の表示を行うメソッドへその値を渡して実行させます。

Pass the value to the method that displays the social insurance deduction and have it executed.


Responsive image


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

boolean spUseIs = extras.getBoolean("spUseIs");
spTotalSocialInsurancePremium = "";
if (spUseIs) {
    spDisplayTotalSocialInsurancePremium(extras);
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

このあたりのコードの内容も前回のアプリの動画を参考にしてください。

Please refer to the video of the previous application for the contents of the code around here.

前回の動画で作成したパッケージ内に様々な税金を計算するためのクラスファイル群を作成していきましょう。

Let's create a set of class files within the package we created in the previous video to calculate various taxes.

しかし、コードの内容自体は前回の動画シリーズで作成したものとほぼ一緒なので、おさらい程度に見ていてください。

However, the code itself is pretty much the same as the one you created in the previous video series, so please watch the video with the intention of reviewing.


Responsive image


Responsive image


Responsive image

パート16へ続く。

Continue to Part 16.



以上です。お疲れ様です。

That's all. Thank you for your hard work.