Esempio n. 1
0
def Joint_calc():
    hus_inc = int(input("Input husband's personal input per year: $"))
    wife_inc = int(input("Input wife's personal input per year: $"))

    hus_nci = Main.Single_deduc(hus_inc)
    wife_nci = Main.Single_deduc(wife_inc)
    joint_nci = Main.Joint_deduc(hus_inc, wife_inc)

    print("\nHusband's MPF = $" + str(Main.MPF_calc(hus_inc)))
    print("Wife's MPF = $" + str(Main.MPF_calc(wife_inc)))

    print("\nHusband's net chargeable income = $" + str(hus_nci))
    print("Husbandls tax = $" + str(Main.Tax_calc(hus_nci)))

    print("\nWife's net chargeable income = $" + str(wife_nci))
    print("Wife's tax = $" + str(Main.Tax_calc(wife_nci)))

    sinTax = Main.Tax_calc(hus_nci) + Main.Tax_calc(wife_nci)

    print("\nPay Tax in Separate way = $" + str(sinTax))

    joiTax = Main.Tax_calc(joint_nci)
    print("Joint net chargeable income = $" + str(joint_nci))
    print("Pay Tax in Joint way = $" + str(joiTax))

    if sinTax <= joiTax:
        print("\nRecommended method = Seperated taxation $" + str(sinTax))
    else:
        print("\nRecommended method = Joint taxation $" + str(joiTax))
    input("\nPress Enter to continue...")
Esempio n. 2
0
def Single_calc():
    sin_inc = int(input("Input your income: $"))

    sin_nci = Main.Single_deduc(sin_inc)

    print("\nYour MPF = $" + str(Main.MPF_calc(sin_inc)))
    print("\nYour net chargeable income = $" + str(sin_nci))

    print("\nYour should pay tax of  = $" + str(Main.Tax_calc(sin_nci)))

    input("\nPress Enter to continue...")
Esempio n. 3
0
 def test_joint_39708990_34535530(self):
     expected = 11131278
     joi_nci = Main.Joint_deduc(39708990, 34535530)
     result = Main.Tax_calc(joi_nci)
     self.assertEqual(expected, result)
Esempio n. 4
0
 def test_joint_64329827942434234_23783249728327(self):
     expected = 9653041678818984
     joi_nci = Main.Joint_deduc(64329827942434234, 23783249728327)
     result = Main.Tax_calc(joi_nci)
     self.assertEqual(expected, result)
Esempio n. 5
0
 def test_joint_5401000_3470000(self):
     expected = 1325250
     joi_nci = Main.Joint_deduc(5401000, 3470000)
     result = Main.Tax_calc(joi_nci)
     self.assertEqual(expected, result)
Esempio n. 6
0
 def test_joint_5000000000_120000(self):
     expected = 750014400
     joi_nci = Main.Joint_deduc(5000000000, 120000)
     result = Main.Tax_calc(joi_nci)
     self.assertEqual(expected, result)
Esempio n. 7
0
 def test_joint_603422_538743(self):
     expected = 125168.05
     joi_nci = Main.Joint_deduc(603422, 538743)
     result = Main.Tax_calc(joi_nci)
     self.assertEqual(expected, result)
Esempio n. 8
0
 def test_single_10000000(self):
     expected = 1497300
     sin_nci = Main.Single_deduc(10000000)
     result = Main.Tax_calc(sin_nci)
     self.assertEqual(expected, result)
Esempio n. 9
0
 def test_joint_120_508(self):
     expected = 0
     joi_nci = Main.Joint_deduc(120, 508)
     result = Main.Tax_calc(joi_nci)
     self.assertEqual(expected, result)
Esempio n. 10
0
 def test_single_50(self):
     expected = 0
     sin_nci = Main.Single_deduc(50)
     result = Main.Tax_calc(sin_nci)
     self.assertEqual(expected, result)
Esempio n. 11
0
 def test_joint_256000_275000(self):
     expected = 22876.5
     joi_nci = Main.Joint_deduc(256000, 275000)
     result = Main.Tax_calc(joi_nci)
     self.assertEqual(expected, result)
Esempio n. 12
0
 def test_joint_800000_500000(self):
     expected = 150000
     joi_nci = Main.Joint_deduc(800000, 500000)
     result = Main.Tax_calc(joi_nci)
     self.assertEqual(expected, result)
Esempio n. 13
0
 def test_joint_100000_8000000(self):
     expected = 1211550
     joi_nci = Main.Joint_deduc(100000, 8000000)
     result = Main.Tax_calc(joi_nci)
     self.assertEqual(expected, result)