Please make average prices from Accounting/Purchase Data available as a price source.
New to TSM and setting everything up. I was trying to set up my material price as true as possible so I tested this - I bought a frozen orb from the vendor and bought some more from AH. I couldn't figure out how to use the average purchase price from Accounting -> Items -> Purchase Data as a price source. I asked in Discord and was told it cannot be done.
(screenshot here https://postimg.org/image/4k35xbn4d/ )
If I set my price to be "avgbuy", it only gives the average buy price of what I bought from AH.
If I set my price to be "AVG(avgbuy, vendorbuy)" the cost is inaccurate because it calculated as if I had bought equal amount from each source.
Accounting addon is great. I love that it keeps track of all pricing from all venues for me because I can't if I craft a lot. But please make that data available as a price source so it better reflects material cost for crafting.
>Until a fix is implemented a work around Is estimate roughly the ‰ from each source and create avg(x% avgBuy, y‰ vendorBuy) just make sure x+y=100
That's not how avg() works.
Imagine the VendorBuy is 10g and AvgBuy is 100g and he bought half off the AH, half off the vendor.
Your formula wouldn't equate to 55g as it should, instead it would equate to avg(50% 100g, 50% VendorBuy) -> avg(50g, 5g) -> 27.5g
The right way to calculate this would be simply:
"x% AvgBuy + y%VendorBuy"
>Be sure to verify it exists in check(avgBuy, avgBuy, dbMarket)
Things like these are what the first() function should be used for. It uses the first valid listed price.
-> "first(Avgbuy, DBMarket)"
Until a fix is implemented a work around Is estimate roughly the ‰ from each source and create avg(x% avgBuy, y‰ vendorBuy) just make sure x+y=100
Can you not just use avgBuy?
Be sure to verify it exists in check(avgBuy, avgBuy, dbMarket)