Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Br3nda opened this issue Apr 11, 2019 · 0 comments
Open

Comments

@Br3nda
Copy link
Member

Br3nda commented Apr 11, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant