Then in your map or reduce, you sum up locationqua...
# suitescript
m
Then in your map or reduce, you sum up locationquantityavailable for each item.