-
Notifications
You must be signed in to change notification settings - Fork 55
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
BR-CO-16 triggered on UBL for 1.3.3 #242
Comments
No, the problem is the expression. Should be (exists(cbc:PrepaidAmount) and not(exists(cbc:PayableRoundingAmount)) and (xs:decimal(cbc:PayableAmount) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(xs:decimal(cbc:PrepaidAmount))) and not(exists(xs:decimal(cbc:PayableRoundingAmount))) and xs:decimal(cbc:PayableAmount) = xs:decimal(cbc:TaxInclusiveAmount)) or (exists(xs:decimal(cbc:PrepaidAmount)) and exists(xs:decimal(cbc:PayableRoundingAmount)) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(xs:decimal(cbc:PrepaidAmount))) and exists(xs:decimal(cbc:PayableRoundingAmount)) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = xs:decimal(cbc:TaxInclusiveAmount))) |
Okay thanks. Meaning there will be a 1.3.4 release soon? |
spring 2021 release |
Ah okay. That renders the 1.3.3 release quite useless if such a showstopper bug is in it. Can you eventually consider releasing a 1.3.3.1 bugfix release? |
This is an old bug. The error has not been noticed because it only appears when there is a PayableRoundingAmount with value 0. I would then suggest waiting to the next release to fix the bug. |
The issue poped up when converting CII documents to UBL and that was not changed. |
I guess your proposal can be simplified to: (exists(cbc:PrepaidAmount) and not(exists(cbc:PayableRoundingAmount)) and (xs:decimal(cbc:PayableAmount) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or
(not(exists(cbc:PrepaidAmount)) and not(exists(cbc:PayableRoundingAmount)) and xs:decimal(cbc:PayableAmount) = xs:decimal(cbc:TaxInclusiveAmount)) or
(exists(cbc:PrepaidAmount) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or
(not(exists(cbc:PrepaidAmount)) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = xs:decimal(cbc:TaxInclusiveAmount))) |
Not emitting |
Ok @phax, I have added a test on this and will fix it for the next release. |
Should this introduced bug be communicated somehow? At least mentioned in "News and noteworthy" section ✌️ |
Added a Note in the Release explaining the error. |
@oriol where is this note added? Can't see it commited to README. |
Hi guys,
since the latest 1.3.3 update, the following UBL block is invalid:
I think the calculation model would now require
TaxInclusiveAmount
to be 0???The text was updated successfully, but these errors were encountered: