const title = typeTitles[typeKey] || typeKey;
const quantity = typeof typeValue.quantity === 'number'
- ? parseFloat(typeValue.quantity * modificator).toFixed(2)
+ ? (parseFloat(typeValue.quantity) * modificator).toFixed(2)
: '0.00';
if (typeKey === 'forecast') {
const groups = typeValue.groups;
if (groups && typeof groups === 'object') {
for (const [groupKey, val] of Object.entries(groups)) {
- const groupVal = parseFloat(val).toFixed(2);
+ const groupVal = (parseFloat(val) * modificator).toFixed(2) ;
groupLines.push(`${groupKey.replace(/_/g, ' ')} (${title.toLowerCase()}) ${groupVal}`);
}
}