<?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-O-14</scope>
	</assert>
	<test>
		<assert>
			<description>Verify that an Invoice that contains a VAT breakdown group with a VAT
				category code = "O" does not contain a Document level allowances group where
				Document level charge VAT category code !="O".</description>
			<success>BR-O-14</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>
				<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
				<cac:TaxCategory>
					<cbc:ID>O</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

			<cac:TaxTotal>
				<cac:TaxSubtotal>
					<cac:TaxCategory>
						<cbc:ID>O</cbc:ID>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>

		</Invoice>
	</test>

	<test>
		<assert>
			<description>Trigger error if an Invoice that contains a VAT breakdown group with a VAT
				category code = "O" does contain a Document level allowances group where Document
				level charge VAT category code !="O".</description>
			<error>BR-O-14</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>
				<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
				<cac:TaxCategory>
					<cbc:ID>S</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

			<cac:TaxTotal>
				<cac:TaxSubtotal>
					<cac:TaxCategory>
						<cbc:ID>O</cbc:ID>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>

		</Invoice>

	</test>

	<test>
		<assert>
			<description>Trigger error if an Invoice that contains a VAT breakdown group with a VAT
				category code = "O" does contain a Document level allowances group where Document
				level charge VAT category code !="O".</description>
			<error>BR-O-14</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>
				<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
				<cac:TaxCategory>
					<cbc:ID>O</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

			<cac:AllowanceCharge>
				<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
				<cac:TaxCategory>
					<cbc:ID>S</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>
			<cac:TaxTotal>
				<cac:TaxSubtotal>
					<cac:TaxCategory>
						<cbc:ID>O</cbc:ID>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>

		</Invoice>

	</test>
</testSet>
