vandalv,
строку 40 заменить на
base.total = 0;
base.produkt = Array.from({length : 10}, _ => {
var num = randomValueBetween(100, 999)|0,
name = getElem(vegString),
price = randomValueBetween(1, 100).toFixed(2),
count = randomValueBetween(1, 100)|0;
base.total += price * count;
return `${num} ${name} ${price}$ ${count}p.`
}).join('\n') + `\ntotal: ${base.total.toFixed(2)}$` ;