inventory_units creation fix

check stock using count_on_hand instead of on_hand, cause the last has
our keepings already removed