Suggestion: Splits and 'Ratio'

Discussions about iCompta on macOS
Post Reply
drfrogsplat
Posts: 11
Joined: 03 October 2014, 04:40

Suggestion: Splits and 'Ratio'

Post by drfrogsplat »

I've really appreciated the change to splits that let you turn off making the transaction the sum of splits (because in 99% of cases I've imported the transaction so the total is correct, and then subsequently split it, so never want anything I do to change the total). So thanks for that :)

I've found a bug or feature request (I'm not sure what the intent was) with this, so hoping you can fix or add the functionality:

Problem/Situation:

Right now when I turn off "Make the sum of splits" option for a transaction, in the splits pane in the right-hand panel: the "Amount" gets greyed out (can't change it directly) and the "Ratio" field shows up. This lets me enter 'Ratio' values, but these seem to be actually interpreted as percentages. That's OK (or desirable) in many cases perhaps, but also requires me to do some specific arithmetic, e.g. convert itemised invoice into percentages first, and also make sure they actually add to 100%. Neither are particularly hard, but seems silly not to be automatically calculated. The effect (percentages) also doesn't seem to match the intent of the field (Ratio), which is why I suspect this might be a bug?

I'm hoping the intent was that we could put any value in the "Ratio" field and iCompta would calculate the percentages from Xi / SUM( all Xi ), where Xi is the ith split's Ratio value.

Expected vs Actual:

So if I have a transaction for $10.00, then create three splits for categories A, B, C, and set their ratios to 3, 5, 7 respectively, I'd expect the result to be splits as follows: A = 20% = $2.00, B = 33.33% = $3.33, C = 46.67% = $4.67, which add to $10.00

Instead, I get A = 3% = $0.30, B = 5% = %0.50, C = 7% = $0.70 which add to $1.50, with an unallocated $8.50.

If this worked, it would make it easy to put in percentages as per the current behaviour, OR to simply split using precise item values (without resorting to enabling "Make the sum of splits"), OR to split by some other arbitrary ratio (e.g. splitting a bill where the 'Ratio' represents how many people you're paying for).

Minor Extra Suggestion

I also think the Ratio field should allow maths like you can do in the "Amount" field (e.g. "33.57+15*9.90" being converted to 182.07 to add up items, rather than me using a calculator to precompute the ratios). This could be useful on its own, if there is some technical reason why the Ratio has to be a fixed percentage (e.g. I could at least type in "3/(3+5+7)" in the Ratio field to get the correct percentage for that split in the case above).

Impossible? Alternative

If it turns out that the Ratio field has to be a static percentage for some technical reason, then I think (a) it should be renamed to Percentage (not Ratio) and (b) the Amount field should remain editable, so at least the itemisation approach above is possible (without resorting to enabling "Make the sum of splits" when you already know the total); and (c) the splits section of the right-hand panel should show an extra row for the remaining amount/percentage that's yet to be allocated, or some other simple indicator that your amounts or percentages don't add to the total amount or 100%.
User avatar
Angeman
Administrateur
Posts: 2302
Joined: 28 December 2008, 21:28
Location: Toulouse, France
Contact:

Re: Suggestion: Splits and 'Ratio'

Post by Angeman »

Thanks for your detailed bug report. In next version, the ratio field will allow maths like other numeric fields. Unfortunately I probably won't rename it because it could have unintended side effects with localizations and I don't want to take the risk but you're right it should be the "Percentage" field.
Post Reply