Skip to content

Available quantities submodule should calculate weighted average price. #32

@therampagerado

Description

@therampagerado

Current code:

avg = (Σ unit_cost_i) / (# of products)

Fix:

avg = (Σ qty_i * unit_cost_i) / (Σ qty_i)

Which more accurately represents the actual case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions