Consider all items from the same batch

The last commit made items be duplicated instead of updated, so when getting
the batch items, we need to sum all quantities from the same batch to them can
be used to validate the stock quantity right.

Change-Id: Ifc7fab7661cf2584f9cb7df50314110286228418