Skip to content

Implement volgteelt detection for bladgewassen in determineSubTypeOmschrijving #281

@coderabbitai

Description

@coderabbitai

Problem

The determineSubTypeOmschrijving function in fdm-calculator/src/norms/nl/2025/stikstofgebruiksnorm.ts currently only handles "1e teelt" detection for bladgewassen (spinach, lettuce, etc.) but leaves the volgteelt logic as a TODO comment.

This means cultivations that should resolve to the "volgteelt" sub-type still fall back to default norms, causing incorrect nitrogen norm selection for subsequent plantings of bladgewassen.

Expected Behavior

The function should properly detect when a bladgewas cultivation is a "volgteelt" (subsequent planting) and return the appropriate sub-type omschrijving to ensure correct norm selection.

Current Code Location

  • File: fdm-calculator/src/norms/nl/2025/stikstofgebruiksnorm.ts
  • Function: determineSubTypeOmschrijving
  • Lines: Around 308 (TODO comment for volgteelt logic)

Background

This issue was identified during the implementation of per-field norms errors and cultivation sub-type support. The missing volgteelt detection was one of the motivating bugs mentioned in issue #276.

References

Metadata

Metadata

Assignees

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