In AcquisitionResultTable.vue, rows with a bought price of 0 (e.g. manufactured or looted
items with no purchase cost) show broken profit values instead of a real profit.
Steps to reproduce
Have an acquisition row with price === 0 and a non-zero sell price.
Look at the Profit (%) and Profit (ISK) columns for that row.
Expected
A 0 bought price should be treated as full profit relative to the sell price (or otherwise a
sane, finite number), and the row should sort/color (profit threshold) correctly.
Actual
useMarketTaxStore.calculateProfit(buy, sell) = (applyTaxes(sell, true) / applyTaxes(buy)) - 1.
When buy is 0, applyTaxes(buy) is 0, so this divides by zero → Infinity.
iskProfit is computed as r.price * precentProfit * r.remaining (AcquisitionResultTable.vue),
i.e. 0 * Infinity * remaining → NaN.
Percent Profit column shows Infinity%, ISK Profit column shows NaN, and the profit-threshold
color/sort logic (result.precentProfit >= threshold, < 0) behaves unpredictably against Infinity/NaN.
Notes
calculateProfit lives in src/market/tax/tax.ts; iskProfit is computed independently in AcquisitionResultTable.vue in three places (market/acquisition/AcquisitionResultTable.vue:98,132
and the totals row at :169) — a fix needs to be consistent across all three, or centralized.
## Summary
In `AcquisitionResultTable.vue`, rows with a bought price of 0 (e.g. manufactured or looted
items with no purchase cost) show broken profit values instead of a real profit.
## Steps to reproduce
1. Have an acquisition row with `price === 0` and a non-zero sell price.
2. Look at the Profit (%) and Profit (ISK) columns for that row.
## Expected
A 0 bought price should be treated as full profit relative to the sell price (or otherwise a
sane, finite number), and the row should sort/color (profit threshold) correctly.
## Actual
- `useMarketTaxStore.calculateProfit(buy, sell)` = `(applyTaxes(sell, true) / applyTaxes(buy)) - 1`.
When `buy` is 0, `applyTaxes(buy)` is 0, so this divides by zero → `Infinity`.
- `iskProfit` is computed as `r.price * precentProfit * r.remaining` (`AcquisitionResultTable.vue`),
i.e. `0 * Infinity * remaining` → `NaN`.
- Percent Profit column shows `Infinity%`, ISK Profit column shows `NaN`, and the profit-threshold
color/sort logic (`result.precentProfit >= threshold`, `< 0`) behaves unpredictably against
`Infinity`/`NaN`.
## Notes
- `calculateProfit` lives in `src/market/tax/tax.ts`; `iskProfit` is computed independently in
`AcquisitionResultTable.vue` in three places (`market/acquisition/AcquisitionResultTable.vue:98,132`
and the totals row at `:169`) — a fix needs to be consistent across all three, or centralized.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
In
AcquisitionResultTable.vue, rows with a bought price of 0 (e.g. manufactured or looteditems with no purchase cost) show broken profit values instead of a real profit.
Steps to reproduce
price === 0and a non-zero sell price.Expected
A 0 bought price should be treated as full profit relative to the sell price (or otherwise a
sane, finite number), and the row should sort/color (profit threshold) correctly.
Actual
useMarketTaxStore.calculateProfit(buy, sell)=(applyTaxes(sell, true) / applyTaxes(buy)) - 1.When
buyis 0,applyTaxes(buy)is 0, so this divides by zero →Infinity.iskProfitis computed asr.price * precentProfit * r.remaining(AcquisitionResultTable.vue),i.e.
0 * Infinity * remaining→NaN.Infinity%, ISK Profit column showsNaN, and the profit-thresholdcolor/sort logic (
result.precentProfit >= threshold,< 0) behaves unpredictably againstInfinity/NaN.Notes
calculateProfitlives insrc/market/tax/tax.ts;iskProfitis computed independently inAcquisitionResultTable.vuein three places (market/acquisition/AcquisitionResultTable.vue:98,132and the totals row at
:169) — a fix needs to be consistent across all three, or centralized.