Skip to content

incorrect rates rebate total when person is not allocated to property #165

Description

@Br3nda

When a person is not allocated to a property (they have no role on the Entity named Titled_Property) the calculation returns the maximum possible rebate - even though they are not eligible for that.

e.g. This gives the correct answer

  input:
    persons:
      Fred:
        rates_rebates__combined_income: 32103
        rates_rebates__dependants: 0
    titled_properties:
      whare:
        rates_rebates__rates_total: 2000
        owners: [Fred]

But this gives the maximum ($620)

  input:
    persons:
      Fred:
        rates_rebates__combined_income: 32103
        rates_rebates__dependants: 0
    titled_properties:
      whare:
        rates_rebates__rates_total: 2000

on investigation with @jvdanker , we found this is because Open Fisca adds up the income of all occupants/owners (and there are none) to decide the combined income in that whare is $0 then gives the maximum

Instead, let's require a property has an owner present. If there's none, then either refuse to calculate, or return null, or something else to give an indication that you haven't supplied valid input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions