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

mapping of AppliedTradeAllowanceCharge from NetPriceProductTradePrice instead of GrossPriceProductTradePrice #15

Closed
cambid opened this issue Sep 27, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@cambid
Copy link
Contributor

cambid commented Sep 27, 2022

Thanks for the very great toolset to convert CII to UBL.

I think I've found a bug in the conversation.

According to the [mapping-cii-ubl.xlsx] in the docs-folder the AppliedTradeAllowanceCharge should be fetched from the GrossPriceProductTradePrice and not from the NetPriceProductTradePrice.

I've tested with the actual HEAD and a minimal example. In the attached files.zip there are three versions of the same invoice:

  1. 12119719.xml Invoice in CII-format
  2. 12119719-ubl-orig.xml in UBL-format converted with the actual HEAD.
  3. 12119719-ubl.xml in UBL-format after doing a minimal change in the CIIToUBL21Converter.java in Line 1337
aLineAgreement.getNetPriceProductTradePrice
aLineAgreement.getGrossPriceProductTradePrice

In the second version the allowance of 4.69 is missing completely.

files.zip

@phax phax self-assigned this Sep 28, 2022
@phax phax added the bug Something isn't working label Sep 28, 2022
phax added a commit that referenced this issue Sep 28, 2022
@phax
Copy link
Owner

phax commented Sep 28, 2022

@cambid Thanks for pointing that out - good catch :)
Did you find some other discrepancies as well or can build a new release?

@cambid
Copy link
Contributor Author

cambid commented Sep 28, 2022

@phax Thanks for the response and the quick fix in 503c373.
Should the allowance in the price in convertToCreditNote (f.e.

final TradePriceType aTradePrice = aLineAgreement.getNetPriceProductTradePrice ();
) be changed accordingly?

phax added a commit that referenced this issue Sep 28, 2022
@phax
Copy link
Owner

phax commented Sep 28, 2022

You are so right - that happens when I work with too little focus :(
And the fieldname was also still the old one....

@cambid
Copy link
Contributor Author

cambid commented Sep 28, 2022

@phax Please don't worry about the missing focus. 🧉☕ for more focus. Can you please build a new release 1.4.8 or 1.4.7-1?

@phax
Copy link
Owner

phax commented Sep 28, 2022

Release 1.4.8 is out - enjoy and thanks

@phax phax closed this as completed Sep 28, 2022
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