rgriebl / brickstore

An offline BrickLink inventory management tool.
https://www.brickstore.dev/
GNU General Public License v3.0
121 stars 26 forks source link

Little quantity parsing bug #895

Closed TeupFleup closed 1 month ago

TeupFleup commented 5 months ago

Hi! When I import a Bricklink order into BrickStore, the parts with a quantity of 1000 and up are not parsed. They show up as "-". For some reason, Bricklink sees fit to add (American) punctuation to these numbers, e.g. "1,234". I assume that's what causes parsing them to break down.

I'm importing an order as a parts list by downloading the order, changing the ORDERS and ORDER tags into INVENTORY and removing the order data tags. Works perfectly except for the parsing of these quantities.

The decimals having American notation (".") on my European machine appears to be no problem at all, though - prices and weights are imported correctly. I guess all it has to do is simply disregard any commas in the file.

rgriebl commented 1 month ago

BrickStore has a workaround in place for that glitch, but it only uses that workaround on actual orders (it would be waste of CPU time otherwise). All the current quirks are documented here: https://github.com/rgriebl/brickstore/blob/main/src/bricklink/global.h#L12 I decided to keep these workarounds as minimal as possible. This is for my own sanity and also to be able to quickly adapt to fixes on BrickLink's side. If you manually change the file type, you'll have to fix these quirks as well I'm afraid. Or you could pester BrickLink to finally start fixing these rather simple bugs.