HyperConomy

HyperConomy

78.3k Downloads

Taxation not actually applied

fpottbaecker opened this issue ยท 11 comments

commented

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.

commented

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.

commented

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
commented

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.

commented

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?

commented

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.

commented

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.

commented

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.

commented

That's a good idea. I'll add the account to /taxsettings.

commented

Currently player shops don't charge tax. Neither do chest shops. I can double check that server shops are working properly though.

commented

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

Sell code, branch hc-dev

  • The price for the tradeObject is calculated based on the amount and the hp(player)
  • The salestax is calculated based on the hp and price
  • 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

Buy code, branch hc-dev

  • The price for the tradeObject is calculated based on the amount
  • The taxpaid is calculated based on the tradeObject and price
  • The value of price is replaced by price + 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.

commented

Thanks for the detailed information. I'll work on this. It looks like improvements to the whole tax system will be needed to fix this.