Skip to content
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

Bad convertion CalculationPercent to SpecifiedTradeAllowanceCharge #17

Closed
L3Mars opened this issue Nov 15, 2022 · 3 comments
Closed

Bad convertion CalculationPercent to SpecifiedTradeAllowanceCharge #17

L3Mars opened this issue Nov 15, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@L3Mars
Copy link

L3Mars commented Nov 15, 2022

Hello Philip,

I'm using your CIIToUBL converter and it looks like there is a problem converting the CalculationPercent to MultiplierFactorNumeric.

    if (aAllowanceCharge.getCalculationPercent () != null)
    {
      // TODO calc is correct?
      aUBLAllowanceCharge.setMultiplierFactorNumeric (aAllowanceCharge.getCalculationPercentValue ().divide (CGlobal.BIGDEC_100));
    }

I think CalculationPercent should not be divided by 100

You can see the documentation of MultiplierFactorNumeric here

MultiplierFactorNumeric
Line level allowance or charge percentage
The percentage that may be used, in conjunction with the line level allowance base amount, to calculate the line level allowance or charge amount.
Example value: 20

PS: Thank you very much for all your work :)

@phax phax self-assigned this Nov 15, 2022
@phax phax added the bug Something isn't working label Nov 15, 2022
@phax
Copy link
Owner

phax commented Nov 15, 2022

Hi @L3Mars thanks for pointing that out.
I can confirm that the value range for MultiplierFactorNumeric is between 0 and 100.

phax added a commit that referenced this issue Nov 15, 2022
@phax
Copy link
Owner

phax commented Nov 15, 2022

Will be part of the 1.4.9 release

@phax phax closed this as completed Nov 15, 2022
@L3Mars
Copy link
Author

L3Mars commented Nov 16, 2022

@phax thank you for your promt response, it works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants