Closed
Description
Summary
The children served number is not including children served with kits appropriately
Why fix?
Consistency. Corrextness.
Details
Regarding the Annual Survey
This method:
def children_served_with_kits_containing_disposables
organization
.distributions
.for_year(year)
.joins(line_items: {item: :kit})
.merge(Item.disposable)
.where.not(items: {kit_id: nil})
.distinct
.count("kits.id")
end
counts kits that are disposables (which will be 0), not kits that have disposables
Fix it.
(You probably shouldn't take this one unless you are familiar with both the annual survey and kits. And you might need to do SQL for this. So it's a little advanced)
Criteria for completion
- behaviour as decribed
- tests to confirm the behaviour