|
|
@@ -34,7 +34,12 @@ function render({ recipes, prices }) {
|
|
|
return sum + price.PriceAverage * input.Amount;
|
|
|
}, 0);
|
|
|
const dailyProfit = (revenuePerRun - costPerRun) * runsPerDay;
|
|
|
- profits.push({ recipeName: recipe.RecipeName, dailyProfit, traded: outputPrice.Traded });
|
|
|
+ profits.push({
|
|
|
+ recipeName: recipe.RecipeName,
|
|
|
+ dailyProfit,
|
|
|
+ traded: outputPrice.Traded,
|
|
|
+ priceAverage: outputPrice.PriceAverage
|
|
|
+ });
|
|
|
}
|
|
|
profits.sort((a, b) => b.dailyProfit - a.dailyProfit);
|
|
|
const fmt = new Intl.NumberFormat(undefined, { maximumFractionDigits: 2 });
|
|
|
@@ -45,6 +50,7 @@ function render({ recipes, prices }) {
|
|
|
row.innerHTML = `
|
|
|
<td>${profit.recipeName}</td>
|
|
|
<td>${fmt.format(profit.dailyProfit)}</td>
|
|
|
+ <td>${fmt.format(profit.traded * profit.priceAverage)}</td>
|
|
|
<td>${fmt.format(profit.traded)}</td>
|
|
|
`;
|
|
|
tbody.appendChild(row);
|
|
|
@@ -52,4 +58,4 @@ function render({ recipes, prices }) {
|
|
|
}
|
|
|
fetchData().then(render);
|
|
|
|
|
|
-//# debugId=70C1D9063E5E875D64756E2164756E21
|
|
|
+//# debugId=2EBCAC0FA236EC3864756E2164756E21
|