Skip to content

Commit

Permalink
casting xs:decimal BR-CO-16
Browse files Browse the repository at this point in the history
  • Loading branch information
oriol committed Feb 22, 2018
1 parent 0aad426 commit 6fd7ac2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ubl/schematron/UBL/EN16931-UBL-model.sch
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<param name="BR-CO-13" value="((cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and ((cbc:TaxExclusiveAmount) = round(((cbc:LineExtensionAmount) + (cbc:ChargeTotalAmount) - (cbc:AllowanceTotalAmount)) * 10 * 10) div 100 )) or (not(cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and ((cbc:TaxExclusiveAmount) = round(((cbc:LineExtensionAmount) - (cbc:AllowanceTotalAmount)) * 10 * 10 ) div 100)) or ((cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and ((cbc:TaxExclusiveAmount) = round(((cbc:LineExtensionAmount) + (cbc:ChargeTotalAmount)) * 10 * 10 ) div 100)) or (not(cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and ((cbc:TaxExclusiveAmount) = (cbc:LineExtensionAmount)))"/>
<param name="BR-CO-14" value="((child::cbc:TaxAmount)= round((sum(cac:TaxSubtotal/xs:decimal(cbc:TaxAmount)) * 10 * 10)) div 100) or not(cac:TaxSubtotal)"/>
<param name="BR-CO-15" value="every $Currency in cbc:DocumentCurrencyCode satisfies cac:LegalMonetaryTotal/cbc:TaxInclusiveAmount = round( (cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount + cac:TaxTotal/xs:decimal(cbc:TaxAmount[@currencyID=$Currency])) * 10 * 10) div 100"/>
<param name="BR-CO-16" value="((cbc:PrepaidAmount) and not(cbc:PayableRoundingAmount) and ((cbc:PayableAmount) = (round((cbc:TaxInclusiveAmount - cbc:PrepaidAmount) * 10 * 10) div 100))) or (not(cbc:PrepaidAmount) and not(cbc:PayableRoundingAmount) and (cbc:PayableAmount) = (cbc:TaxInclusiveAmount)) or ((cbc:PrepaidAmount) and (cbc:PayableRoundingAmount) and ((round((cbc:PayableAmount - cbc:PayableRoundingAmount) * 10 * 10) div 100) = (round((cbc:TaxInclusiveAmount - cbc:PrepaidAmount) * 10 * 10) div 100))) or (not(cbc:PrepaidAmount) and (cbc:PayableRoundingAmount) and ((round((cbc:PayableAmount - cbc:PayableRoundingAmount) * 10 * 10) div 100) = (cbc:TaxInclusiveAmount))) "/>
<param name="BR-CO-16" value="(xs:decimal(cbc:PrepaidAmount) and not(xs:decimal(cbc:PayableRoundingAmount)) and (xs:decimal(cbc:PayableAmount) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(xs:decimal(cbc:PrepaidAmount)) and not(xs:decimal(cbc:PayableRoundingAmount)) and xs:decimal(cbc:PayableAmount) = xs:decimal(cbc:TaxInclusiveAmount)) or (xs:decimal(cbc:PrepaidAmount) and 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(xs:decimal(cbc:PrepaidAmount)) and xs:decimal(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = xs:decimal(cbc:TaxInclusiveAmount))) "/>
<param name="BR-CO-17" value="(round(cac:TaxCategory/cbc:Percent) = 0 and (round(cbc:TaxAmount) = 0)) or (round(cac:TaxCategory/cbc:Percent) != 0 and (cbc:TaxAmount = round(cbc:TaxableAmount * (cac:TaxCategory/cbc:Percent div 100) * 10 * 10) div 100 ))"/>
<param name="BR-CO-18" value="exists(cac:TaxTotal/cac:TaxSubtotal)"/>
<param name="BR-CO-19" value="exists(cbc:StartDate) or exists(cbc:EndDate)"/>
Expand Down

0 comments on commit 6fd7ac2

Please sign in to comment.