Taxation not actually applied
fpottbaecker opened this issue ยท 11 comments
On any transaction that should be subject to taxes, none are applied.
Example: User A buys items worth of 10, taxed with 10%, from User B.
A should pay 11, while B gets 10. But in the current version, B gets 11.
price
in buy transactions is calculated as itemprice + tax
, and is taken from A and added to B, although B should only get itemprice
.
The same, albeit like price = itemprice - tax
, applies to sales as well.
Ok, please try the latest dev build when you have the chance: latest build The tax account can be configured in config.yml. Let me know if this works for you.
Tested it, Taxation works now, but:
- If you buy something, it won't tell you how much tax you paid, but the purchase price shown to the player includes the tax(don't know if this is intended)
- In the testing environment, i tried to reconfigure the account and taxes(edit file, save, hc disable, hc enable) but the settings appeared to be locked and reverted to "hyperconomy" again
I'll check out the tax message. It should tell you how much tax was paid.
You have to disable HC before editing the file. So the order is /hc disable, edit file, save, /hc enable.
After testing it seems to work as expected for me. I get "You bought X for X and paid X in tax. The last X shows the tax properly for me. In what situation are you not getting this message?
Well actually there is a message, but it only says "You have purchased X ITEM for TOTALPRICE", where TOTALPRICE is the price plus taxes, but said price is also shown in the shop menu. I checked the language file and it has the standard text set for PURCHASE_MESSAGE, which displays taxes.
Also the message is yellow and the item name and total price are red.
It sounds like you're using HyperMerchant? You'll have to contact shmancelot on his Bukkit page if the message is coming from there. My testing involves using the /buy, /hb, /sell, or /hs commands. I could maybe take a look at the HyperMerchant code if he's not around, but I don't have control over it.
In fact it is HyperMerchant not telling the player.
When the player sells something, the TransactionResponse(HyperConomy) is used to send the player the messages.
When the player buys something, HyperMerchant defaults to its own messages.
But the original bug is fixed, and the feature requested added.
Changing the taxaccount via /taxsettings would be nice though.
Currently player shops don't charge tax. Neither do chest shops. I can double check that server shops are working properly though.
I do know that player and chest shops do not charge tax. But server shops tell the player they do, but they do not.
Selling
- The
price
for thetradeObject
is calculated based on theamount
and thehp
(player) - The
salestax
is calculated based on thehp
andprice
- The customer receives
price - salestax
- The shop pays
price - salestax
The customer should only receive the price - salestax, but the the shop should pay the full price.
This is tested and confirmed.
I sold items worth of 100 Currency Units taxed at 7%.
I was told i sold items worth of 100 CU - 7 CU taxes.
I received 93 CU, but the shop only payed 93 CU.
Buying
- The
price
for thetradeObject
is calculated based on theamount
- The
taxpaid
is calculated based on thetradeObject
andprice
- The value of
price
is replaced byprice
+taxpaid
- The customer pays the current value of
price
(actual price + taxes) - The shop receives the current value of
price
(actual price + taxes)
The customer should pay the price + taxes, but the shop should only receive the actual price.
I could not test this. I might have something misconfigured, so sales are not taxed at all for me.
While you are at it, could you add some way to let all taxes flow to one configurable account?
Or maybe add a taxes
value to a PlayerTransaction so a plugin watching the transactions could do so.