<?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-CO-14</scope>
	</assert>
	<test>
		<assert>
			<description>Verify that Invoice total VAT amount = Σ VAT category tax amount</description>
			<success>BR-CO-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:TaxTotal>
				<cbc:TaxAmount>250</cbc:TaxAmount>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>250</cbc:TaxAmount>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
		</Invoice>
	</test>
	
	<test>
		<assert>
			<description>Verify that Invoice total VAT amount = Σ VAT category tax amount</description>
			<success>BR-CO-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:TaxTotal>
				<cbc:TaxAmount>400</cbc:TaxAmount>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>250</cbc:TaxAmount>
				</cac:TaxSubtotal>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>150</cbc:TaxAmount>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
		</Invoice>
	</test>
	
	<test>
		<assert>
			<description>Verify that Invoice total VAT amount = Σ VAT category tax amount</description>
			<success>BR-CO-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:TaxTotal>
				<cbc:TaxAmount>250.0</cbc:TaxAmount>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>250</cbc:TaxAmount>
				</cac:TaxSubtotal>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>0.00</cbc:TaxAmount>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
		</Invoice>
	</test>
	
	<test>
		<assert>
			<description>Verify that Invoice total VAT amount = Σ VAT category tax amount</description>
			<success>BR-CO-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:TaxTotal>
				<cbc:TaxAmount>00</cbc:TaxAmount>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>0</cbc:TaxAmount>
				</cac:TaxSubtotal>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>0.00</cbc:TaxAmount>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
		</Invoice>
	</test>
	<test>
		<assert>
			<description>Trigger error if Invoice total VAT amount != Σ VAT category tax amount.</description>
			<error>BR-CO-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:TaxTotal>
				<cbc:TaxAmount>300</cbc:TaxAmount>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>250</cbc:TaxAmount>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
		</Invoice>
	</test>

	<test>
		<assert>
			<description>Trigger error if Invoice total VAT amount != Σ VAT category tax amount.</description>
			<error>BR-CO-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:TaxTotal>
				<cbc:TaxAmount>300</cbc:TaxAmount>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>250</cbc:TaxAmount>
				</cac:TaxSubtotal>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>150.00</cbc:TaxAmount>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
		</Invoice>
	</test>
	
	<test>
		<assert>
			<description>Trigger error if Invoice total VAT amount != Σ VAT category tax amount.</description>
			<error>BR-CO-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:TaxTotal>
				<cbc:TaxAmount>1</cbc:TaxAmount>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>0</cbc:TaxAmount>
				</cac:TaxSubtotal>
				<cac:TaxSubtotal>
					<cbc:TaxAmount>0.00</cbc:TaxAmount>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
		</Invoice>
	</test>
	
</testSet>
