It is currently 25 Apr 2024, 05:44
   
Text Size

Magic Album - Program Bugs

Total price in the Inventory pane is not displayed correctly. (fix completed)

 

The price in the totals row of the Inventory pane is not always accurate after applying a filter to an inventory or loading a new inventory file. Usually the reported total is pretty close, but sometimes it is off by a lot (earlier it was displaying around $-3000; no cards in my price file have negative values, so this shouldn't be possible).

While I notice this most when using filters, here is a method that allows me to reproduce the issue without filtering at all:

1. Open an inventory file, click the Clear Filter button.
2. Select a price source from the Prices menu. As far as I can tell, this always sets the totals column to the same amount. Make a note of the amount.
3. Click the New Inventory button. All cards are cleared from the Inventory panel, but there is still a non-zero price displayed in the totals row.
4. Open the same inventory file again. The total displayed is different than it was the first time.

Repeating this process will result in the displayed total price diverging further from the initial value each time the file is changed.

I exported my inventory as CSV, made a new column by multiplying 'Price (R)' by 'Qty (R)', and then summing the new column. The total is not the same as what is displayed in Magic Album, even after the prices are reset when a new price source is selected.

I thought there might be a problem with my inventory file, so I created a new one in the secondary inventory pane and copied the contents by selecting all and pressing F11. The new inventory file displays the same behavior. A much smaller inventory file I have behaves as expected, and the summed price in Excel matches the total displayed in Magic Album.

I'm attaching the relevant files. If any clarification is needed, please let me know.

Thanks!
Last edited by tenminutegod on 18 Nov 2017, 07:32, edited 1 time in total.

Comments

Posted by Goblin Hero » 21 Nov 2017, 07:27

3. Click the New Inventory button. All cards are cleared from the Inventory panel, but there is still a non-zero price displayed in the totals row.

I can't reproduce this. Please, also attach the content of your "Price" directory.

Posted by tenminutegod » 22 Nov 2017, 02:40

My Prices directory is attached. I only had Scryfall selected in the Prices menu when I wrote up the report, but I've seen this behavior with just about every price script I've used in the past.

Posted by Goblin Hero » 22 Nov 2017, 08:37

I think I found the problem - float is not enough for lots of small arithmetic operations. Try the attached file. This should fix the problem.
Last edited by Goblin Hero on 22 Nov 2017, 08:37, edited 1 time in total.

Posted by tenminutegod » 22 Nov 2017, 08:43

That appears to have fixed the issue, it's currently working as expected. Thank you!

Posted by Goblin Hero » 22 Nov 2017, 09:17

Good. Fixed in r365.

Ticket details

  • Ticket ID: 1403
  • Project: Magic Album
  • Status: Fix completed
  • Component: (unknown)
  • Project version: (unknown)
  • Priority: Normal
  • Severity: Normal
  • Assigned to: Goblin Hero
  • Reported by: tenminutegod
  • Reporter's tickets: List all tickets
  • Reported on: 18 Nov 2017, 07:10
  • Last visited by Goblin Hero » 22 Nov 2017, 09:18.
 

Login Form