<?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>
		<description>Invoice that contains a Document level allowance (BG-20) where the Document
			level allowance VAT category code (BT-95) is “Not subject to VAT” shall not contain the
			Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or
			the Buyer VAT identifier (BT-48)</description>
		<scope>BR-O-03</scope>
	</assert>

	<test>
		<assert>
			<description>Invoice that contains a Document level allowance (BG-20) where the Document
				level allowance VAT category code (BT-95) is “Not subject to VAT” shall not contain
				the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier
				(BT-63) or the Buyer VAT identifier (BT-48)</description>
			<success>BR-O-03</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>false</cbc:ChargeIndicator>
				<cac:TaxCategory>
					<cbc:ID>O</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>
		</Invoice>
	</test>


	<test>
		<assert>
			<error>BR-O-03</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:AccountingSupplierParty>
				<cac:Party>
					<cac:PartyTaxScheme>
						<cbc:CompanyID>NO123456789</cbc:CompanyID>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:PartyTaxScheme>
				</cac:Party>
			</cac:AccountingSupplierParty>

			<cac:AllowanceCharge>
				<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
				<cac:TaxCategory>
					<cbc:ID>O</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

		</Invoice>
	</test>

	<test>
		<assert>
			<error>BR-O-03</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:AccountingCustomerParty>
				<cac:Party>
					<cac:PartyTaxScheme>
						<cbc:CompanyID>987654321MVA</cbc:CompanyID>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:PartyTaxScheme>
				</cac:Party>
			</cac:AccountingCustomerParty>

			<cac:AllowanceCharge>
				<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
				<cac:TaxCategory>
					<cbc:ID>O</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

		</Invoice>
	</test>
	<test>
		<assert>
			<error>BR-O-03</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:TaxRepresentativeParty>
				<cac:PartyTaxScheme>
					<cbc:CompanyID>1234567</cbc:CompanyID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:PartyTaxScheme>
			</cac:TaxRepresentativeParty>

			<cac:AllowanceCharge>
				<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
				<cac:TaxCategory>
					<cbc:ID>O</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

		</Invoice>
	</test>
</testSet>
