aboutsummaryrefslogtreecommitdiff
path: root/static/js
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-04-06 07:41:05 +0000
committerBobby <[email protected]>2023-04-06 07:41:05 +0000
commitf9b7b45504ecc5556b572e88885ea0498078c4c7 (patch)
tree3b0bb069a3ecddfa1c63786062c61d3337b809a7 /static/js
parentc4e3cfc22ec8d3476b58b3211815571f7e61b67f (diff)
downloadffxivmfp-main.tar.xz
ffxivmfp-main.zip
Fix timesProfitHEADmain
Diffstat (limited to 'static/js')
-rw-r--r--static/js/script.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/static/js/script.js b/static/js/script.js
index caf78d1..443b4f4 100644
--- a/static/js/script.js
+++ b/static/js/script.js
@@ -29,7 +29,6 @@ calculateForm.addEventListener("submit", (e) => {
const buyTax = Math.ceil(buyPriceValue * buyTaxRate);
const sellTax = Math.ceil(sellPriceValue * sellTaxRate);
const profit = sellPriceValue - buyPriceValue - buyTax - sellTax;
- const timesProfit = profit / (buyPriceValue + buyTax);
const resultDisplay = `
<table class="result-display">
@@ -51,8 +50,7 @@ calculateForm.addEventListener("submit", (e) => {
</tr>
<tr>
<td>${profit > 0 ? "Profit" : "Loss"}:</td>
- <td><span class="${profit > 0 ? "profit" : "loss"}">${commaSeparateNumber(Math.abs(profit))}</span> Gil
- ${profit > 0 ? `(${timesProfit.toFixed(2)}x returns)` : `(${timesProfit.toFixed(2)}x loss)`}</td>
+ <td><span class="${profit > 0 ? "profit" : "loss"}">${commaSeparateNumber(Math.abs(profit))}</span> Gil</td>
</td>
</tr>
</table>