Poland KSF: Document-Level Totals (FA(3))

You must model document-level totals.

Elements

Use the LegalMonetaryTotal (Extn) Extension to model this information:

Element (Path)CardinalityDescription
Extended Legal; Monetary Totals Group (Invoice/UBLExtensions/UBLExtension/ExtensionContent/InvoiceExtension/ ReducedTotals/LegalMonetaryTotal/)1..1Groups extended legal monetary totals.
Charge Total Amount After Tax (Invoice/UBLExtensions/UBLExtension/ExtensionContent/InvoiceExtension/ ReducedTotals/LegalMonetaryTotal/ChargeTotalAmountAfterTax)0..1Sum of all the charges in the invoice. In India, charges are applied after taxes.
Allowance Total Amount After Tax (Invoice/UBLExtensions/UBLExtension/ExtensionContent/InvoiceExtension/ ReducedTotals/LegalMonetaryTotal/AllowanceTotalAmountAfterTax)0..1Sum of all allowances in the invoice that have to be applied after tax. In India, the allowances in the header are always applied after taxes.
Total Invoice Amount (Invoice/UBLExtensions/UBLExtension/ExtensionContent/InvoiceExtension/ ReducedTotals/LegalMonetaryTotal/TotalInvoiceAmount)0..1Total amount of the invoice. Line extension amount with all taxes applied and charges and allowances after taxes. It is recommended to always provide this value. It must be provided in case the after-tax allowance and charge is provided and a prepaid amount exists.
Line Extension Amount (Invoice/UBLExtensions/UBLExtension/ExtensionContent/InvoiceExtension/ ReducedTotals/LegalMonetaryTotal/LineExtensionAmount)1..1The total amount of the invoice lines.
Tax Exclusive Amount (Invoice/UBLExtensions/UBLExtension/ExtensionContent/InvoiceExtension/ ReducedTotals/LegalMonetaryTotal/TaxExclusiveAmount)1..1Specify the difference between the total amounts of the current and of the preceding, corresponding advance payment invoice, in the final invoice.
Tax Inclusive Amount (Invoice/UBLExtensions/UBLExtension/ExtensionContent/InvoiceExtension/ ReducedTotals/LegalMonetaryTotal/TaxInclusiveAmount)1..1Specify the difference between the total amounts of the current and of the preceding, corresponding advance payment invoice, in the final invoice.
Amount Due for Payment (Invoice/UBLExtensions/UBLExtension/ExtensionContent/InvoiceExtension/ ReducedTotals/LegalMonetaryTotal/PayableAmount)1..1Specify the difference between the total amounts of the current and of the preceding, corresponding advance payment invoice, in the final invoice.

Use the following sub-element of the PrepaidPayments element to model the prepaid amount:

Name (Path)CardinalityDescription
Prepaid Amounts (Invoice/PrepaidPayment)0..nGroups information about a prepaid payment.
Paid Amount (Invoice/PrepaidPayment/PaidAmount)0..1The amount of the prepayment.
Paid Amount Debited Date Currency (Invoice/PrepaidPayment/PaidAmount [@currencyID])0..1The currency code. It must match the value in the DocumentCurrencyCode element.

Restrictions

All amount elements must provide the currencyID attribute containing the cbc:DocumentCurrencyCode.

Examples

Example containing allowance after tax on document level

Element NameCalculation
Total Invoice Amount vrbl:TotalInvoiceAmountInvoice Total Amount With Tax - Allowance Total Amount After Tax + Charge Total Amount After Tax
cbc:TaxInclusiveAmount - vrbl:AllowanceTotalAmountAfterTax + vrbl:ChargeTotalAmountAfterTax
<ubl:Invoice>
    <!-- code omitted for clarity -->
    <cac:AllowanceCharge>
		<cec:UBLExtensions>
			<cec:UBLExtension>
				<cec:ExtensionContent>
					<vrbl:AllowanceChargeExtension>
						<vrbl:AfterTaxIndicator>true</vrbl:AfterTaxIndicator>
					</vrbl:AllowanceChargeExtension>
				</cec:ExtensionContent>
			</cec:UBLExtension>
		</cec:UBLExtensions>
		<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
        <!-- Mandatory Allowance Charge Reason. -->
        <cbc:AllowanceChargeReason>Settlement of a balance (buyer paid too much)</cbc:AllowanceChargeReason>
		<cbc:Amount currencyID="PLN">1000.00</cbc:Amount>
	</cac:AllowanceCharge>
    <!-- code omitted for clarity -->
    <cac:TaxTotal>
        <cbc:TaxAmount currencyID="PLN">12019.82</cbc:TaxAmount>
        <!-- code omitted for clarity -->
    </cac:TaxTotal>
    <!-- code omitted for clarity -->
    <cac:LegalMonetaryTotal>
        <ext:UBLExtensions>
            <ext:UBLExtension>
                <ext:ExtensionContent>
                    <vrbl:LegalMonetaryTotalExtension>
                        <vrbl:AllowanceTotalAmountAfterTax currencyID="PLN">1000</vrbl:AllowanceTotalAmountAfterTax>
                        <vrbl:ChargeTotalAmountAfterTax currencyID="PLN">0</vrbl:ChargeTotalAmountAfterTax>
                        <vrbl:TotalInvoiceAmount currencyID="PLN">63279.92</vrbl:TotalInvoiceAmount> â’¶
                    </vrbl:LegalMonetaryTotalExtension>
                </ext:ExtensionContent>
            </ext:UBLExtension>
        </ext:UBLExtensions>
        <cbc:LineExtensionAmount currencyID="PLN">52260.10</cbc:LineExtensionAmount>
        <cbc:TaxExclusiveAmount currencyID="PLN">52260.10</cbc:TaxExclusiveAmount> 
        <cbc:TaxInclusiveAmount currencyID="PLN">64279.92</cbc:TaxInclusiveAmount> 
        <cbc:PayableAmount currencyID="PLN">63279.92</cbc:PayableAmount>
    </cac:LegalMonetaryTotal>
    <!-- code omitted for clarity -->
<ubl:Invoice>

Example containing prepaid amounts and indicating that the invoice is not fully paid yet:

Element NameCalculation
Amount Due for Payment
cbc:PayableAmount
When the Fully Paid Indicator is false: Total Invoice Amount - Sum of all Prepaid Amounts
if vrbl:FullyPaidIndicator = false then vrbl:TotalInvoiceAmount - ∑(/ubl:InvoiceLine/cac:PrepaidPayment/cbc:PaidAmount)
<ubl:Invoice>
    <ext:UBLExtensions>
        <ext:UBLExtension>
            <ext:ExtensionContent>
                <!-- code omitted for clarity -->
                <vrbl:InvoiceExtension>
                    <!-- indicates that the invoice is not fully paid. -->
                    <vrbl:FullyPaidIndicator>false</vrbl:FullyPaidIndicator>
                </vrbl:InvoiceExtension>
                <!-- code omitted for clarity -->
            </ext:ExtensionContent>
        </ext:UBLExtension>
    </ext:UBLExtensions>
    <!-- code omitted for clarity -->
    <cac:PrepaidPayment>
        <!-- code omitted for clarity -->
        <!-- Prepaid Amount 1 -->
        <cbc:PaidAmount currencyID="PLN">10000.00</cbc:PaidAmount>
        <cbc:PaidDate>2026-01-27</cbc:PaidDate>
    </cac:PrepaidPayment>
    <cac:PrepaidPayment>
        <!-- code omitted for clarity -->
        <!-- Prepaid Amount 1 -->
        <cbc:PaidAmount currencyID="PLN">20000.00</cbc:PaidAmount>
        <cbc:PaidDate>2026-01-28</cbc:PaidDate>
    </cac:PrepaidPayment>
    <!-- code omitted for clarity -->
    <cac:LegalMonetaryTotal>
        <ext:UBLExtensions>
            <ext:UBLExtension>
                <ext:ExtensionContent>
                    <vrbl:LegalMonetaryTotalExtension>
                        <vrbl:TotalInvoiceAmount currencyID="PLN">64279.92</vrbl:TotalInvoiceAmount>
                    </vrbl:LegalMonetaryTotalExtension>
                </ext:ExtensionContent>
            </ext:UBLExtension>
        </ext:UBLExtensions>
        <cbc:LineExtensionAmount currencyID="PLN">52260.10</cbc:LineExtensionAmount>
        <cbc:TaxExclusiveAmount currencyID="PLN">52260.10</cbc:TaxExclusiveAmount>
        <cbc:TaxInclusiveAmount currencyID="PLN">64279.92</cbc:TaxInclusiveAmount>
        <cbc:PrepaidAmount currencyID="PLN">30000.00</cbc:PrepaidAmount> â’·
        <cbc:PayableAmount currencyID="PLN">34279.92</cbc:PayableAmount> â’¶
    </cac:LegalMonetaryTotal>
    <!-- code omitted for clarity -->
<ubl:Invoice>

Example indicating that the invoice was fully paid:

Element NameCalculation
Amount Due for Payment
cbc:PayableAmount
When the Fully Paid Indicator is true then the Payable Amount is zero.
if vrbl:FullyPaidIndicator = true then cbc:PayableAmount = 0.00
Paid Amount
cbc:PrepaidAmount
When the Fully Paid Indicator is true then the Paid Amount is equal to the Total Invoice Amount.
if vrbl:FullyPaidIndicator = true then cbc:PrepaidAmount = vrbl:TotalInvoiceAmount
<ubl:Invoice>
    <ext:UBLExtensions>
        <ext:UBLExtension>
            <ext:ExtensionContent>
                <!-- code omitted for clarity -->
                <vrbl:InvoiceExtension>
                    <vrbl:FullyPaidIndicator>true</vrbl:FullyPaidIndicator>
                </vrbl:InvoiceExtension>
                <!-- code omitted for clarity -->
            </ext:ExtensionContent>
        </ext:UBLExtension>
    </ext:UBLExtensions>
    <!-- code omitted for clarity -->
    <cac:PrepaidPayment>
        <cbc:PaidDate>2026-01-27</cbc:PaidDate>
    </cac:PrepaidPayment>
    <!-- code omitted for clarity -->
    <cac:LegalMonetaryTotal>
        <ext:UBLExtensions>
            <ext:UBLExtension>
                <ext:ExtensionContent>
                    <vrbl:LegalMonetaryTotalExtension>
                        <vrbl:TotalInvoiceAmount currencyID="PLN">64279.92</vrbl:TotalInvoiceAmount>
                    </vrbl:LegalMonetaryTotalExtension>
                </ext:ExtensionContent>
            </ext:UBLExtension>
        </ext:UBLExtensions>
        <cbc:LineExtensionAmount currencyID="PLN">52260.10</cbc:LineExtensionAmount>
        <cbc:TaxExclusiveAmount currencyID="PLN">52260.10</cbc:TaxExclusiveAmount>
        <cbc:TaxInclusiveAmount currencyID="PLN">64279.92</cbc:TaxInclusiveAmount>
        <cbc:PrepaidAmount currencyID="PLN">64279.92</cbc:PrepaidAmount> 
        <cbc:PayableAmount currencyID="PLN">0.00</cbc:PayableAmount>
    </cac:LegalMonetaryTotal>
    <!-- code omitted for clarity -->
<ubl:Invoice>