Skip to content

[C1] Generate egg lots from daily entry (missing bridge) #8

Closed

Description

@mforce

Sprint C · Lots & stock · priority:critical area:domain

THE MISSING BRIDGE. EggLot.Create is defined but never called anywhere. Daily-entry production generates no lots, so sales (#D2/confirm) allocate against an empty shelf. This wires the middle of the vertical slice.

Scope

  • On daily-entry submit/record, generate one EggLot per sellable grade from the captured production (depends on #B1).
  • Lot fields: flock, production date (= entry date), grade, quantity.
  • Idempotent: re-recording the same entry must not double-create lots (natural-key/upsert or reconcile).
  • Decide trigger point: on RecordProduction vs on Submit (recommend Submit — draft edits shouldn't churn lots).

Done when: submitting a daily entry with grade quantities produces matching egg lots, and re-submitting does not duplicate them. Integration test covering the full daily-entry -> lot -> available-stock path.


Migrated from Gitea issue #8 (https://gitea.mforcelabs.com/mforce/cluckwork/issues/8).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions