Geuthur / aa-ledger

Character & Corporation Ledger Statistics for Alliance Auth
MIT License
1 stars 0 forks source link

Amounts are now taxes and not actual values (before tax) #32

Closed Husteln closed 1 month ago

Husteln commented 1 month ago

Hi,

I've noticed that in recent Ledger versions (using 0.5.6, but seen it in 0.5.4 first maybe?). The money values for characters went down significantly.

I just checked wallet logs for a character and it seems that the values displayed right now, at least for Ratting, are taxes themselves. Since my corporation has a tax rate of 10, the value of money gained by character should be 9 or 10 times more (depending if you include tax payout to the corp or not).

I attached couple screenshots with wallet logs for this character - its part of a single day, and even from there its already obvious that values in Overview are corp taxes only

Is this intended, or a bug?

Thanks

Ledger_2

Ledger_1
Geuthur commented 1 month ago

If you change the TAX it is not possible to display ESS Payout. Also you need if you change the TAX to set the LEDGER_CORP_TAX:

Example Actual System:

June - ESS: 100.000 ISK Tax 10% TAX August - ESS: 100.000 ISK - 10%


You change the Tax to 5%

June - ESS: 50.000 TAX August - ESS: 50.000 TAX

This should be only for the ESS Payout

I've noticed that in recent Ledger versions (using 0.5.6, but seen it in 0.5.4 first maybe?). The money values for characters went down significantly.

This is cause i added more filters that you can see in the Changelogs #31

But i will look at this, I don't change the calculation of the Corp Ledger so it is the same as 0.5.4 etc. Maybe there is something that i oversee. But on my Corporation Ledger with 5% Tax it caclulate correct.

Geuthur commented 1 month ago

Screenshot 2024-08-11 093946 Screenshot 2024-08-11 093953

So i Tested it on a Character that not rat much and it works correctly I think i know why you think it is wrong it is cause if you use the Corporation Ledger it calc all Chars that you registred and combine it so

This Means:

Main: 1000 Alt 1: 500 Alt 2: 1000

Corporation Ledger Shows

Main - Amount: 2500 - ESS -

I will Add a Hint fort that in future Versions that it is clear

Husteln commented 1 month ago

I didn't change tax values since ledger was initially installed, so its okay there.

But I checked the code and indeed, ledger tax is only applied to ESS. In general, it should not be so. Bounty prizes coming to corporation wallet are affected by the same tax values - it only receives 10% (tax value) of original bounty

Maybe this is the reason? Bounty prizes coming from CHARACTER wallet are "value - tax", and prizes in CORPORATION wallet are "tax" only. There should be a distinction

Geuthur commented 1 month ago

Thats Correct the Tax is only applied to ESS cause the amount that you get from Character Ledger & Corporation is already calculated in the ESI so i not need to do so in the code. the field 'amount' and 'tax' is same amount in any cases on Corporation side. on Character Side the amount has already substracted the tax so i dont need to do so in code.

There is nothing wrong.

On the Corporation Ledger it Calculate from Corporation Journal and at Character Ledger it calcualte from Character Journal what is also correct.

Just reminder if your TAX is 10% you need to set

LEDGER_CORP_TAX: 10

in the local.py otherwise the ESS payout is not correct on the ledger's the standard amount is 15% if you dont set a TAX for the ESS

Explanation Ledger Calculation:

Character Journal ESI:

You only recieve the amounts from the taxed Ratting means if you character has 17.542.198 ISK - Ingame Screenshot 2024-08-11 133418

On ESI Side it already exluded the tax you get is (TAX Amount is: 877109.92) 16.665.088.47 ISK - ESI Side fetch Screenshot 2024-08-11 133431 You can see on Screen it is already substracted so i dont need to do in code. I only need to sumarize the amounts and have the amount that is ratted.

Now we go to the Corporation Journal what is more easy cause i only need to sum the amount from bounty_prizes cause it only show the taxes already

Screenshot 2024-08-11 134011

It only show the amount taxes. So I only need to sumarize amounts from each char and have then the amount that each char has payed to the corporation.

Hope that helps you to understand it ;)

Husteln commented 1 month ago

Values from my first sceenshot are from corporation wallet, which means that it is only 10 percent (tax value) of what the character has ratted. If you calculate all the values, you will get ~ 4 038 980 ISK.

For full ratting value you multiply it by 9 or 10. You will get ~ 36 or 40 million isk. And this is not even all days of month.

Values for "total amount" are NOT correct

Ledger_1
Husteln commented 1 month ago

And I did all of this stuff back in 2014, so there is no need to explain it to me.

Geuthur commented 1 month ago

Then i don't understand what do you try to show me cause the calculation is in both ways correct.

I see a screenshot from 1 char from 10 to 7th august.

The Corporation Ledger what is on the second Screen Calculate the Complete Month but from all chars that you are registred. i am right that you have more then 1 char registred and rat with them?

Husteln commented 1 month ago

If your calculation is correct, then the naming is not.

This should be named "tax paid", not "ratting amount" изображение

Geuthur commented 1 month ago

If your calculation is correct, then the naming is not.

This should be named "tax paid", not "ratting amount" изображение

Thats's is a point that i fully agree ^^ it can be confuse This will be changed then also with new versions to understand it correctly

Geuthur commented 1 month ago

First thanks you to giving me time by time input and issues cause this helps me a lot to improve the Ledger!

So then I notice following Issues:

Corporation Ledger TAX naming is wrong need to change from Ratting to TAX or TAX Paid Corporation Ledger needs a Hint to understand that the Calculation is from all Chars from each Account included

Husteln commented 1 month ago

Yep, looks good. Thanks