sparkmicro / Ki-nTree

Fast part creation for KiCad and InvenTree
GNU General Public License v3.0
171 stars 31 forks source link

Add EUR pricing instead of USD (InvenTree) #176

Closed HannesMorre closed 5 months ago

HannesMorre commented 9 months ago

Our default currency in InvenTree is set to EUR, but when we upload parts with Ki-nTree with supplier pricing the price in USD is uploaded as the price in EUR. I would like the option to upload pricing data in EUR instead of USD if possible. Otherwise the currency of that supplier part should be set to USD in InvenTree so the price conversion can be done there.

HannesMorre commented 9 months ago

Even though the pricing data upload option is set to false, it still uploads the pricing data to inventree, this causes issues for us since this information is incorrect.

eeintech commented 8 months ago

Thanks for reporting this @HannesMorre.

@T0jan As the dev behind pricing, is that something you can look into?

T0jan commented 8 months ago

@HannesMorre sorry for your troubles. I remember clearly that I have checked the switch, but somehow the code must have been lost before I pushed it into master.

For the currency conversion I think InvenTrees API did that automatically for the version I developed this feature with so I have to check if there are changes with the API which broke that. Unfortunately I am in vacation rn and have no access to my system to do any testing with it so this wont be fixed until I am back at the end of the month. but I hope the fix for the switch at least makes the rest of Ki-nTree usable for you again.

@eeintech I created a merge request for the switch fix (#179). it fails on the untested method check, ID 11. my changes should not affect this test alone so not sure what is going on there and due to my vacation I can't investigate myself.

eeintech commented 8 months ago

@T0jan I am not sure how it went through previously but the logic for the result of this test was inverted... so I corrected it.

T0jan commented 8 months ago

small update: I have a pretty good idea how to implement this but due to a currency exchange rate bug in the latest InvenTree version (see https://github.com/inventree/InvenTree/issues/5831) I can't test it for now. Once it is fixed I will come back to this here.

T0jan commented 8 months ago

added the feature (see pull request). make sure to update InvenTree to 0.12.9 for it to work properly as the currency exchange rates are not updated anymore on older versions and are outright broken on 0.12.8.

eeintech commented 5 months ago

Handled by InvenTree!