Remove minimum, rename other field to guaranteed minimum

master
Mike Bryant 4 years ago
parent f4ab1be863
commit f30e1e751e

@ -187,9 +187,8 @@
<th colspan="2">Thursday</th>
<th colspan="2">Friday</th>
<th colspan="2">Saturday</th>
<th rowspan="2">Week Min</th>
<th rowspan="2">Least Max</th>
<th rowspan="2">Week Max</th>
<th rowspan="2">Guaranteed Minimum</th>
<th rowspan="2">Potential Maximum</th>
</tr>
<tr>
<th>AM</th>

@ -660,8 +660,7 @@ function analyze_possibilities(sell_prices, first_buy, previous_pattern) {
weekMins.push(day.min);
weekMaxes.push(day.max);
}
poss.weekMin = Math.min(...weekMins);
poss.weekLeastMax = Math.max(...weekMins);
poss.weekGuaranteedMinimum = Math.max(...weekMins);
poss.weekMax = Math.max(...weekMaxes);
}

@ -139,7 +139,7 @@ const calculateOutput = function (data, first_buy, previous_pattern) {
out_line += `<td class="one">${day.min}</td>`;
}
}
out_line += `<td class="one">${poss.weekMin}</td><td class="one">${poss.weekLeastMax}</td><td class="one">${poss.weekMax}</td></tr>`;
out_line += `<td class="one">${poss.weekGuaranteedMinimum}</td><td class="one">${poss.weekMax}</td></tr>`;
output_possibilities += out_line
}

Loading…
Cancel
Save