fix: items cost calculation fixes

lodash's reduce usage fixed