AtmoOmen / CurrencyTracker

FFXIV Dalamud Plugin Currency Tracker
4 stars 1 forks source link

Transaction merging incorrectly modifies the total of the resulting record #3

Closed PrincessRTFM closed 12 months ago

PrincessRTFM commented 1 year ago

On my Centurio Seals history, I had a value of 1344, then two records with a change of +20 each from the same area, where I'd killed a pair of A ranks. This gave me a record listing +20=1364 and a record listing +20=1384, which was the total number of seals I had. When I merged my transactions, the resulting record had a listed change of +40 (correct) but a total of 1404 (merged last total of 1384 plus the prior record's change of +20), which immediately produced a new (erroneous) record listing a change of -20 in my current zone for a (correct) total of 1384.

PrincessRTFM commented 1 year ago

Example with White Crafter's Scrip: before and after clicking the merge button.

AtmoOmen commented 1 year ago

Thanks for report. It's been identified that in some cases, the final Amount will be incorrectly adding the final Change, which leads to the issue. I have now added additional conditional logic in that part of the code. After testing this revised logic with 7 types of currencies, combining a total of 189 records, no similar issues have been observed again.

PrincessRTFM commented 12 months ago

Just checked and the fix is verified working in the currently live version!