How are "Spent" and "Allocated" amounts for a qube calculated?