Line-Level Totals
Read about how totals are modeled and calculated at the line level.
Line-level totals generally apply to a specific line item. These are aggregated for some Document-level totals.
Item net price calculation
An item's net price is calculated as follows:
Elements | Description |
---|---|
PriceAmount = AllowanceCharge/BaseAmount - AllowanceCharge/Amount | Item net price = Item gross price - Item price discount |
Here is an example:
<Invoice>
<!-- code omitted for clarity -->
<cac:InvoiceLine>
<!-- code omitted for clarity -->
<cac:Price>
<cbc:PriceAmount currencyID="EUR">410</cbc:PriceAmount>
<cbc:BaseQuantity unitCode="C62">1</cbc:BaseQuantity>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:Amount currencyID="EUR">40</cbc:Amount>
<cbc:BaseAmount currencyID="EUR">450</cbc:BaseAmount>
</cac:AllowanceCharge>
</cac:Price>
<cac:InvoiceLine>
<!-- code omitted for clarity -->
</Invoice>
Invoice-line net amounts
Without allowances or charges
The following calculation is used if no Allowances or Charges are defined:
Elements | Description |
---|---|
Price/PriceAmount / Price/BaseQuantity *InvoicedQuantity | The Item's net price divided by the item's base quantity multiplied by the invoiced quantity plus the Invoice line charge amount minus the Invoice line allowance amount. |
This is an example of an invoice line with no allowances or charges:
<Invoice>
<!-- code omitted for clarity -->
<cac:InvoiceLine>
<cbc:InvoicedQuantity unitCode="C62">10</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">1000.00</cbc:LineExtensionAmount>
<!-- code omitted for clarity-->
<cac:Price>
<cbc:PriceAmount currencyID="EUR">200</cbc:PriceAmount>
<cbc:BaseQuantity unitCode="C62">2</cbc:BaseQuantity>
</cac:Price>
</cac:InvoiceLine>
</Invoice>
With allowances or charges
The following calculation is used if an allowance or charge exists:
Elements | Description |
---|---|
Price/PriceAmount / Price/BaseQuantity *InvoicedQuantity -AllowanceCharge[ChargeIndicator='true']/Amount - AllowanceCharge[ChargeIndicator='false']/Amount | The Item's net price divided by the item's base quantity multiplied by the invoiced quantity plus the Invoice line charge amount minus the Invoice line allowance amount. |
This example shows both an allowance and a charge:
<Invoice>
<!-- code omitted for clarity -->
<cac:InvoiceLine>
<cbc:InvoicedQuantity unitCode="C62">10</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">900.00</cbc:LineExtensionAmount>
<!-- code omitted for clarity-->
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>CG</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Charge</cbc:AllowanceChargeReason>
<cbc:MultiplierFactorNumeric>1</cbc:MultiplierFactorNumeric>
<cbc:Amount currencyID="EUR">1</cbc:Amount>
<cbc:BaseAmount currencyID="EUR">100</cbc:BaseAmount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="EUR">101</cbc:Amount>
</cac:AllowanceCharge>
<!-- code omitted for clarity-->
<cac:Price>
<cbc:PriceAmount currencyID="EUR">100</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>
Line-level allowances and charges
The following calculation is used for line-level Allowances and Charges:
Elements | Description |
---|---|
Amount = BaseAmount \* (MultiplierFactorNumeric / 100) | Allowance/charge amount = Base amount * (Percentage / 100) |
This example uses a base amount and percentage:
<Invoice>
<!-- code omitted for clarity -->
<cac:InvoiceLine>
<!-- code omitted for clarity -->
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>CG</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Cleaning</cbc:AllowanceChargeReason>
<cbc:MultiplierFactorNumeric>20</cbc:MultiplierFactorNumeric>
<cbc:Amount currencyID="EUR">200</cbc:Amount>
<cbc:BaseAmount currencyID="EUR">1000</cbc:BaseAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:AllowanceCharge>
<!-- code omitted for clarity -->
<cac:InvoiceLine>
<Invoice>
This example doe not use the base amount or percentages:
<Invoice>
<!-- code omitted for clarity -->
<cac:InvoiceLine>
<!-- code omitted for clarity -->
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="EUR">200</cbc:Amount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:AllowanceCharge>
<!-- code omitted for clarity -->
<cac:InvoiceLine>
<Invoice>
Updated 3 days ago