---
title: "Invoice V3.1 · monetaryAmountType"
canonical: "https://knowledge-hub.onetrail.com/space/docs/726794344/Invoice%20V3.1%20%C2%B7%20monetaryAmountType"
format: markdown
---
**Complex type** in namespace `http://www.onetrail.net` · part of [Invoice V3.1](https://onetrail.atlassian.net/wiki/spaces/docs/pages/718701262)

## Diagram

![monetaryAmountType diagram](media://faee2cf2-103a-487e-b442-29085f609539)

## Content

Text content of type `xsd:string`, with the attributes below.

## Attributes

| Attribute | Type | Use | Description |
| --- | --- | --- | --- |
| **@amountTypeCode** | [amountTypeCodeType](https://onetrail.atlassian.net/wiki/spaces/docs/pages/718701262/XSD+documentation+invoice#XSDdocumentationinvoice-amountTypeCodeType)  
`Debit` `Credit` | [required] | Specifies if amounts are positive or negative. If Credit, the amounts will not have a negative (-) sign.<br>- 'Debit'
- 'Credit' |
| **@currency** | [currencyType](https://onetrail.atlassian.net/wiki/spaces/docs/pages/718701262/XSD+documentation+invoice#XSDdocumentationinvoice-currencyType)  
length 3 | [required] | Please use ISO 4217, 3-letter codes in capitals. |
| **@type** | [monetaryAmountTypeType](https://onetrail.atlassian.net/wiki/spaces/docs/pages/718701262/XSD+documentation+invoice#XSDdocumentationinvoice-monetaryAmountTypeType)  
15 code values | optional | [V3.1] On header level, the following types are available: MANDATORY<br>- 'EndTotal' = NetTotal + TotalTaxes (amount to be paid). OPTIONAL
- 'NetTotal' = TotalItems + Charges + Levies – Discounts + TotalCharges + TotalLevies – TotalDiscounts.
- 'TotalItems' = Total of the Line amounts.
- 'TotalTaxes' = Total of all value added taxes.
- 'TotalCharges' = Total of all charges
- 'TotalDiscounts' = Total of all discounts
- 'TotalLevies' = Total of all levies On line level, the following types are available: MANDATORY
- 'Unit' = Unit price excluding charges, discounts, levies and taxes. OPTIONAL
- 'Line' = Line amount: Unit amount * InvoicedQuantity.
- 'LineTotal' = Line amount + Charges + Levies – Discounts.
- 'Taxes' = Value added tax applied to the LineTotal amount.
- 'Charges' = Charges applied to the Line amount.
- 'Levies' = Levies applied to the Line amount.
- 'Discounts' = Discounts applied to the Line amount. |

## Used by

- [amountsType](https://onetrail.atlassian.net/wiki/spaces/docs/pages/726827150) / **monetaryAmount**
- [levyType](https://onetrail.atlassian.net/wiki/spaces/docs/pages/726859914) / **monetaryAmount**
- [levyTotalType](https://onetrail.atlassian.net/wiki/spaces/docs/pages/725647413) / **monetaryAmount**
- [chargeType](https://onetrail.atlassian.net/wiki/spaces/docs/pages/726368562) / **monetaryAmount**
- [taxType](https://onetrail.atlassian.net/wiki/spaces/docs/pages/726138937) / **monetaryAmount**
- [amountSummaryType](https://onetrail.atlassian.net/wiki/spaces/docs/pages/726892731) / **monetaryAmount**
- [discountType](https://onetrail.atlassian.net/wiki/spaces/docs/pages/726827210) / **monetaryAmount**

<details>
<summary>XSD source</summary>

```xml
<xsd:complexType name="monetaryAmountType">
        <xsd:simpleContent>
            <xsd:extension base="xsd:string">
                <xsd:attribute name="amountTypeCode" type="amountTypeCodeType" use="required">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="EN">Specifies if amounts are positive or negative.
If Credit, the amounts will not have a negative (-) sign.
- 'Debit'
- 'Credit'</xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="currency" type="currencyType" use="required">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="EN">Please use ISO 4217, 3-letter codes in capitals.</xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="type" type="monetaryAmountTypeType" use="optional">
                    <xsd:annotation>
                        <xsd:documentation xml:lang="EN" source="V3.1">On header level, the following types are available:
MANDATORY

- 'EndTotal'        = NetTotal + TotalTaxes (amount to be paid).
OPTIONAL

- 'NetTotal'        = TotalItems + Charges + Levies – Discounts + TotalCharges + TotalLevies – TotalDiscounts.
- 'TotalItems'      = Total of the Line amounts.
- 'TotalTaxes'      = Total of all value added taxes.
- 'TotalCharges'    = Total of all charges
- 'TotalDiscounts'  = Total of all discounts
- 'TotalLevies'     = Total of all levies

On line level, the following types are available:
MANDATORY

- 'Unit'            = Unit price excluding charges, discounts, levies and taxes.

OPTIONAL

- 'Line'            = Line amount:  Unit amount * InvoicedQuantity.
- 'LineTotal'       = Line amount + Charges + Levies – Discounts.
- 'Taxes'           = Value added tax applied to the LineTotal amount.
- 'Charges'         = Charges applied to the Line amount.
- 'Levies'          = Levies applied to the Line amount.
- 'Discounts'       = Discounts applied to the Line amount.</xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>

```
</details>