Exemplo n.º 1
0
    def __init__(self, tax_variables: TaxVariables, year, additions_no_rsz=0):
        self.payroll = Globals.get_correct_tax_scales(year)
        self.additions_no_rsz = additions_no_rsz
        self.calc_params = Globals.get_correct_calculation_parameters(year)
        self.rsz_calculator = RSZCalculations(self.calc_params, tax_variables)
        self.standard_year = Globals.year
        self.tax_variables = tax_variables
        self.total_children = self.tax_variables.children + self.tax_variables.children_handicapped * 2
        self.total_family_members_old = tax_variables.family_members_old + \
            tax_variables.family_members_old_handicapped * 2
        self.total_family_members_young = tax_variables.family_members + \
            tax_variables.family_members_handicapped * 2
        self.rent_income = \
            tax_variables.partner_income - tax_variables.partner_income * self.calc_params.rsz * \
            self.calc_params.pension_rent_multiplier if tax_variables.partner_income_pension_or_interest else 0

        self.scale = 2

        if self.tax_variables.marital_status == 'single' or self.tax_variables.marital_status == 'married' and \
           self.tax_variables.partner_income > 0 and not self.tax_variables.partner_income_pension_or_interest:
            self.scale = 1
Exemplo n.º 2
0
    def calculate_budgets(budget, total_budget, year):
        tax_variables = TaxVariables()
        tax_variables.bruto = budget
        tax_variables.type_worker = 'bediende'

        rsz_calculations = RSZCalculations(
            Globals.get_correct_calculation_parameters(year), tax_variables)
        rsz, workbonus = rsz_calculations.calculate_rsz()
        rsz += workbonus
        taxable_budget = budget - rsz
        tax_budget = taxable_budget * 0.1615
        netto_budget = taxable_budget - tax_budget

        tax_variables.bruto = total_budget
        rsz_calculations = RSZCalculations(
            Globals.get_correct_calculation_parameters(year), tax_variables)
        rsz, workbonus = rsz_calculations.calculate_rsz()
        rsz += workbonus
        taxable_budget = total_budget - rsz
        tax_budget = taxable_budget * 0.1615
        netto_budget_total = taxable_budget - tax_budget

        return round(netto_budget, 2), round(netto_budget_total, 2)
    def test_werkbonus_arbeider_schaal2_left_border_value(self):
        tax_variables = TaxVariables()
        tax_variables.bruto = 2461.27
        tax_variables.type_worker = 'arbeider'
        tax_variables.partner_income = 0
        tax_variables.family_members_old = 0
        tax_variables.family_members = 0
        tax_variables.family_members_old_handicapped = 0
        tax_variables.family_members_handicapped = 0
        tax_variables.children = 0
        tax_variables.children_handicapped = 0

        calc_params = Globals.get_correct_calculation_parameters(Globals.year)

        rsz_calulator = RSZCalculations(calc_params, tax_variables)
        rsz, work_bonus = rsz_calulator.calculate_rsz_and_work_bonus()

        self.assertEqual(round(work_bonus, 2), 0.02)
    def test_werkbonus_bediende_schaal1_right_border_value(self):
        tax_variables = TaxVariables()
        tax_variables.bruto = 1577.90
        tax_variables.type_worker = 'bediende'
        tax_variables.partner_income = 0
        tax_variables.family_members_old = 0
        tax_variables.family_members = 0
        tax_variables.family_members_old_handicapped = 0
        tax_variables.family_members_handicapped = 0
        tax_variables.children = 0
        tax_variables.children_handicapped = 0

        calc_params = Globals.get_correct_calculation_parameters(Globals.year)

        rsz_calulator = RSZCalculations(calc_params, tax_variables)
        rsz, work_bonus = rsz_calulator.calculate_rsz_and_work_bonus()

        self.assertEqual(round(work_bonus, 2), 193.79)
Exemplo n.º 5
0
    def test_calculate_rsz_bediende(self):
        tax_variables = TaxVariables()
        tax_variables.bruto = 2000
        tax_variables.type_worker = 'bediende'
        tax_variables.children = 0
        tax_variables.children_handicapped = 0
        tax_variables.family_members = 0
        tax_variables.family_members_old = 0
        tax_variables.family_members_handicapped = 0
        tax_variables.family_members_old_handicapped = 0
        tax_variables.partner_income = 0

        calc_params = Globals.get_correct_calculation_parameters(Globals.year)

        rsz_calulator = RSZCalculations(calc_params, tax_variables)
        rsz, werk_bonus = rsz_calulator.calculate_rsz_and_work_bonus()

        self.assertEqual(round(rsz + werk_bonus, 2), 261.40)
Exemplo n.º 6
0
 def __init__(self, year):
     self.calculation_parameters = Globals.get_correct_calculation_parameters(
         year)
Exemplo n.º 7
0
 def __init__(self, bruto, lease_budget, year):
     self.bruto = bruto
     self.thirteenth_month = bruto * 1.08
     self.lease = lease_budget * 12
     self.calc_param = Globals.get_correct_calculation_parameters(year)
Exemplo n.º 8
0
    def __init__(self, price, year):
        self.price_bike = price

        self.calc_params = Globals.get_correct_calculation_parameters(year)
Exemplo n.º 9
0
 def __init__(self, partner, children, year):
     self.partner = partner
     self.children = children
     self.calculation_parameters = Globals.get_correct_calculation_parameters(
         year)
Exemplo n.º 10
0
 def __init__(self, year, tech_devices=None, catalog_value=0):
     self.calc_parameters = Globals.get_correct_calculation_parameters(year)
     self.tech_devices = tech_devices
     self.catalog_value = catalog_value