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

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

-->
<!-- TestSet no 1 for rule BR-IP-08, testing calculation without any allowance or charge-->
<testSet xmlns="http://difi.no/xsd/vefa/validator/1.0" configuration="tc434-ubl">
	<assert>
		<scope>BR-IP-08</scope>
	</assert>
	<test>
		<assert>
			<description>Verify that for each different value of VAT category rate where the VAT
				category code is "M", the VAT category taxable amount in a VAT breakdown shall equal
				the sum of Invoice line net amounts plus the sum of document level charge amounts
				minus the sum of document level allowance amounts where the VAT category code is “M”
				and the VAT rate equals the VAT category rate .</description>
			<success>BR-IP-08</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:TaxTotal>
				<cac:TaxSubtotal>
					<cbc:TaxableAmount currencyID="EUR">100</cbc:TaxableAmount>
					<cac:TaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
			<cac:InvoiceLine>
				<cbc:LineExtensionAmount currencyID="EUR">100</cbc:LineExtensionAmount>
				<cac:Item>
					<cac:ClassifiedTaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
			</cac:InvoiceLine>
		</Invoice>
	</test>
	<test>
		<assert>
			<description>Verify that for each different value of VAT category rate where the VAT
				category code is "M", the VAT category taxable amount in a VAT breakdown shall equal
				the sum of Invoice line net amounts plus the sum of document level charge amounts
				minus the sum of document level allowance amounts where the VAT category code is “M”
				and the VAT rate equals the VAT category rate .</description>
			<success>BR-IP-08</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:TaxTotal>
				<cac:TaxSubtotal>
					<cbc:TaxableAmount currencyID="EUR">200</cbc:TaxableAmount>
					<cac:TaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
			<cac:InvoiceLine>
				<cbc:LineExtensionAmount currencyID="EUR">100</cbc:LineExtensionAmount>
				<cac:Item>
					<cac:ClassifiedTaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25.0</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
			</cac:InvoiceLine>
			<cac:InvoiceLine>
				<cbc:LineExtensionAmount currencyID="EUR">100</cbc:LineExtensionAmount>
				<cac:Item>
					<cac:ClassifiedTaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25.00</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
			</cac:InvoiceLine>
		</Invoice>
	</test>
	<test>
		<assert>
			<description>Verify that for each different value of VAT category rate where the VAT
				category code is "M", the VAT category taxable amount in a VAT breakdown shall equal
				the sum of Invoice line net amounts plus the sum of document level charge amounts
				minus the sum of document level allowance amounts where the VAT category code is “M”
				and the VAT rate equals the VAT category rate .</description>
			<success>BR-IP-08</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:TaxTotal>
				<cac:TaxSubtotal>
					<cbc:TaxableAmount currencyID="EUR">100</cbc:TaxableAmount>
					<cac:TaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
			<cac:InvoiceLine>
				<cbc:LineExtensionAmount currencyID="EUR">100</cbc:LineExtensionAmount>
				<cac:Item>
					<cac:ClassifiedTaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25.0</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
			</cac:InvoiceLine>
			<cac:InvoiceLine>
				<cbc:LineExtensionAmount currencyID="EUR">100</cbc:LineExtensionAmount>
				<cac:Item>
					<cac:ClassifiedTaxCategory>
						<cbc:ID>IC</cbc:ID>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
			</cac:InvoiceLine>
		</Invoice>
	</test>
	<test>
		<assert>
			<description>Verify that for each different value of VAT category rate where the VAT
				category code is "M", the VAT category taxable amount in a VAT breakdown shall equal
				the sum of Invoice line net amounts plus the sum of document level charge amounts
				minus the sum of document level allowance amounts where the VAT category code is “M”
				and the VAT rate equals the VAT category rate .</description>
			<success>BR-IP-08</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:TaxTotal>
				<cac:TaxSubtotal>
					<cbc:TaxableAmount currencyID="EUR">500</cbc:TaxableAmount>
					<cac:TaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
				<cac:TaxSubtotal>
					<cbc:TaxableAmount currencyID="EUR">100</cbc:TaxableAmount>
					<cac:TaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>10.00</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
			<cac:InvoiceLine>
				<cbc:LineExtensionAmount currencyID="EUR">100</cbc:LineExtensionAmount>
				<cac:Item>
					<cac:ClassifiedTaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>10</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
			</cac:InvoiceLine>
			<cac:InvoiceLine>
				<cbc:LineExtensionAmount currencyID="EUR">500</cbc:LineExtensionAmount>
				<cac:Item>
					<cac:ClassifiedTaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
			</cac:InvoiceLine>
		</Invoice>
	</test>
	<test>
		<assert>
			<description>Trigger error if for each different value of VAT category rate where the
				VAT category code is "M", the VAT category taxable amount in a VAT breakdown shall
				equal the sum of Invoice line net amounts plus the sum of document level charge
				amounts minus the sum of document level allowance amounts where the VAT category
				code is “M” and the VAT rate does not equal the VAT category rate .</description>
			<error>BR-IP-08</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:TaxTotal>
				<cac:TaxSubtotal>
					<cbc:TaxableAmount currencyID="EUR">200</cbc:TaxableAmount>
					<cac:TaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
			<cac:InvoiceLine>
				<cbc:LineExtensionAmount currencyID="EUR">100</cbc:LineExtensionAmount>
				<cac:Item>
					<cac:ClassifiedTaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
			</cac:InvoiceLine>
		</Invoice>
	</test>
	<test>
		<assert>
			<description>Trigger error if for each different value of VAT category rate where the
				VAT category code is "M", the VAT category taxable amount in a VAT breakdown shall
				equal the sum of Invoice line net amounts plus the sum of document level charge
				amounts minus the sum of document level allowance amounts where the VAT category
				code is “M” and the VAT rate does not equal the VAT category rate .</description>
			<error>BR-IP-08</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:TaxTotal>
				<cac:TaxSubtotal>
					<cbc:TaxableAmount currencyID="EUR">200</cbc:TaxableAmount>
					<cac:TaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
			<cac:InvoiceLine>
				<cbc:LineExtensionAmount currencyID="EUR">100</cbc:LineExtensionAmount>
				<cac:Item>
					<cac:ClassifiedTaxCategory>
						<cbc:ID>M</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
			</cac:InvoiceLine>
			<cac:InvoiceLine>
				<cbc:LineExtensionAmount currencyID="EUR">100</cbc:LineExtensionAmount>
				<cac:Item>
					<cac:ClassifiedTaxCategory>
						<cbc:ID>IC</cbc:ID>
						<cbc:Percent>25</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
			</cac:InvoiceLine>
		</Invoice>
	</test>
</testSet>
