alphagov / trade-tariff-backend

Enabling the population and distribution via API of UK Customs tariffs and duties
MIT License
7 stars 6 forks source link

Extend Heading#declarable conditions. #32

Closed saulius closed 11 years ago

saulius commented 11 years ago

Extend Heading#declarable query to support grouping headings. Example: https://www.gov.uk/trade-tariff/headings/6309 should be declarable and show measure list.

Grouping Headings cannot be declarable they just wrap other headings.

To clarify: Grouping heading example: "III. WORN CLOTHING AND WORN TEXTILE ARTICLES; RAGS" (in https://www.gov.uk/trade-tariff/chapters/63). Technically it just has producline_suffix equal to 10. 6309 (same link) is a declarable heading - it has no commodities under it and therefore should show measure list, just like for a commodity. 6310 is a non declarable and non grouping heading, so it shows commodity list.

jabley commented 11 years ago

Looks good. I was trying to get this working last night and was making all sorts of modifications to the factory in the specs to get it to work. I wasn't confident that what I had was valid.

I'll add something to smokey as well.