Skip to content

Bug: Fix Quantity Unit handling; disallow cycles in the QU graph #30

@hackathi

Description

@hackathi

Fundamentally, the quantity units are a graph. Valid QUs for a given product are all QUs that have a path to the stock QU or the Purchase QU.

Structure-wise, the QUs and their conversions form a graph with n weakly connected components; with the QUs as Vertices and the conversions as Edges. All valid conversions for a QU are the outgoing edges of the transitive hull of the aforementioned QU graph.

This transtive hull should also be used to prohibit cycles in the graph. However, this isn't enforced by the current code. For the moment, we just accept this, but this is a big TODO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions