<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed under European Union Public Licence (EUPL) version 1.2.

-->
<testSet xmlns="http://difi.no/xsd/vefa/validator/1.0" configuration="tc434-ubl">
	<assert>
		<scope>BR-CL-17</scope>
	</assert>
	<test>
		<assert>
			<description>Verify that invoice tax categories MUST be coded using UNCL 5305 code list</description>
			<success>BR-CL-17</success>
		</assert>
		<Invoice
			xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
			xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
			xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">

			<cac:AllowanceCharge>
				<cac:TaxCategory>
					<cbc:ID>S</cbc:ID>
				</cac:TaxCategory>
			</cac:AllowanceCharge>
			<cac:TaxTotal>
			
				<cac:TaxSubtotal>
					<cac:TaxCategory>
						<cbc:ID>L</cbc:ID>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
		</Invoice>
	</test>
	<test>
		<assert>
			<description>Trigger error if invoice tax categories is not coded using UNCL 5305 code list</description>
			<error number="2">BR-CL-17</error>
		</assert>
		<Invoice
			xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
			xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
			xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
			
			<cac:AllowanceCharge>
				<cac:TaxCategory>
					<cbc:ID>X</cbc:ID>
				</cac:TaxCategory>
			</cac:AllowanceCharge>
			<cac:TaxTotal>
				
				<cac:TaxSubtotal>
					<cac:TaxCategory>
						<cbc:ID>Y</cbc:ID>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
		</Invoice>
	</test>
	
</testSet>
