Available quantities submodule should calculate weighted average price. #32

Open
opened 2025-08-30 12:49:49 -05:00 by therampagerado · 0 comments
therampagerado commented 2025-08-30 12:49:49 -05:00 (Migrated from github.com)

Current code:

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

Fix:

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

Which more accurately represents the actual case.

Current code: avg = (Σ unit_cost_i) / (# of products) Fix: avg = (Σ qty_i * unit_cost_i) / (Σ qty_i) Which more accurately represents the actual case.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-thirtybees/statsmodule#32
No description provided.