<?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>Verify that an Invoice that contains a document level allowance with a document
			level allowance VAT category code that is "K" contains both the Seller's VAT identifier
			or the Sellers Tax Representative VAT identifier (BT-30) and Buyer's VAT identifier
			(BT-46).</description>
		<scope>BR-IC-03</scope>
	</assert>

	<test>
		<assert>
			<success>BR-IC-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: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: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>K</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>
		</Invoice>
	</test>
	<test>
		<assert>
			<success>BR-IC-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:TaxRepresentativeParty>
				<cac:PartyTaxScheme>
					<cbc:CompanyID>1234567</cbc:CompanyID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:PartyTaxScheme>
			</cac:TaxRepresentativeParty>

			<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>K</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>
		</Invoice>
	</test>

	<test>
		<assert>
			<error>BR-IC-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: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>K</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

		</Invoice>
	</test>


	<test>
		<assert>
			<error>BR-IC-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: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>K</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

		</Invoice>
	</test>
	<test>
		<assert>
			<error>BR-IC-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: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>K</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

		</Invoice>
	</test>
	<test>
		<assert>
			<error>BR-IC-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: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>K</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

		</Invoice>
	</test>
	<test>
		<assert>
			<error>BR-IC-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:AccountingCustomerParty>
				<cac:Party>
					<cac:PartyTaxScheme>
						<cbc:CompanyID>987654321MVA</cbc:CompanyID>
					</cac:PartyTaxScheme>
				</cac:Party>
			</cac:AccountingCustomerParty>
			<cac:AllowanceCharge>
				<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
				<cac:TaxCategory>
					<cbc:ID>K</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

		</Invoice>
	</test>
	<test>
		<assert>
			<error>BR-IC-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: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>K</cbc:ID>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>

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