Sum inventory quantities
Add an API endpoint /i/aggregate-quantity that for selected InventoryFilter
returns the aggregate of inventory quantities:
- grouped by
accession
,formTypeCode
,availabilityStatusCode
,quantityOnHandUnitCode
- count of `distinct inventoryMaintPolicy,
- count of
distinct parentInventory
- count of
inventory
- sum of
quantityOnHand
The endpoint returns FilteredPage<InventoryQuantity>
where:
static class InventoryQuantity {
public Accession accession;
public String formTypeCode;
public String availabilityStatusCode;
public String quantityOnHandUnitCode;
public int inventoryMaintenancePolicyCount;
public int parentInventoryCount;
public int inventoryCount;
public double quantityOnHand;
}
This is a JPA only query -- full text is not supported, if _text
is provided throw InvalidApiUsageException
.