Skip to content

Shares, a pound amount and true/false variables declare the wrong unit #2362

Open

Description

@MaxGhenis

A variable's unit is served in the model metadata and decides how the app formats a value (/1 as a percentage, currency-GBP in pounds). In policyengine-core it also sets the default quantity_type: a float with unit = "/1" is a stock and any other float is a flow, and a yearly flow read for a month is divided by 12.

These variables declare a unit that does not match what they return:

  • shareholding and consumption_shareholding return a household's share of a national total but declare unit = GBP.
  • free_tv_licence_value returns pounds (the licence fee times the discount) but declares unit = "/1".
  • Seven true/false variables declare a unit: sdlt_liable, lbtt_liable, benunit_is_rent_liable, is_pension_credit_eligible, is_guarantee_credit_eligible and is_savings_credit_eligible (GBP), and car_is_ved_exempt (/1).

Found by the independent specification of the tax-head partition written for #2235 (its defect 8). #2147 also corrects the free_tv_licence_value unit, for #2148.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions