-
Notifications
You must be signed in to change notification settings - Fork 0
What should happen when an activity has both 2 countries AND 2 regions with %'s defined? #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See test |
Both the country and region percentages should sum together to make 100%.
|
Ah, I had heard that but didn't understand the significance. So, when an activity has both 2 countries AND 2 regions with %'s defined you should get:
And the sum value of those 4 transactions should be the same as the value on the original transaction? |
That's right. But it gets more complicated when there's regions from multiple vocabularies. |
Ok, how should it work in that case? Activity has 2 countries (A and B) and 2 regions in one vocab (C and D) and 2 regions in another (E and F), the split on each is 25%. Should you get?
So now adding up all the values of all these transactions gets you more than the original value! But if you add up per vocab (and including anything not marked for a region vocab) you get:
[ Except the adding up gets more complicated as sectors can also have multiple vocabs ] |
Yes, that's right. |
Uh oh!
There was an error while loading. Please reload this page.
A basic algorithm would then result in 4 split transactions:
But should we be taking into account anything about those regions? Maybe region A and B only exist in country A for instance? Is this bad input data?
I'm sure I remember reading something about this in one of the other writeups but now I can't find it.
The text was updated successfully, but these errors were encountered: