Run my Accounts differs between two types of invoice and credit notes: Customer invoices or customer transactions.
- Customer invoices describes invoices using positions with parts. Income account and taxes will be defined in the part used in a position.
- Customer transactions describe invoices using income accounts and by directly defining tax amounts on vat accounts.
Both types share some elements:
| Element | Description | Default | Type | Mandatory |
|---|---|---|---|---|
| invnumber | Reference number | TEXT | Yes | |
| ordnumber | Order number | TEXT | ||
| status | OPEN, PAID, OVERDUE | OPEN | ||
| currency | Three character currency code | CHF | TEXT(3) | |
| ar_accno | Accounts receivable account number | 1100 | TEXT | |
| payment_accno | Defines the payment account on which the payment is expected. | TEXT | ||
| transdate | Invoice date | DATE | Yes | |
| duedate | DATE | Yes | ||
| description | Invoice title | TEXT | ||
| notes | TEXT | |||
| intnotes | Internal notes usually not printed on the invoice | TEXT | ||
| taxincluded | Prices included taxes or not | BOOLEAN | ||
| dcn | QR number:
|
TEXT | ||
| department | If departments exist, they can be posted as follows: “department”: “name–id” (whereas id is the id of the department. | TEXT | No | |
| language_code | Template | TEXT | No |
Customer invoices
Additional elements required in customer invoices:
| Element | Description | Default | Type | Mandatory |
|---|---|---|---|---|
| parts | List of part elements describing the invoice description. For more details check out the type. | part | YES |
Examples
XML:
<?xml version="1.0" encoding="UTF-8"?>
<invoice>
<invnumber>R-002</invnumber>
<ordnumber />
<status>OVERDUE</status>
<currency>CHF</currency>
<ar_accno>1100</ar_accno>
<transdate>2012-08-06T00:00:00+02:00</transdate>
<duedate>2012-08-06T00:00:00+02:00</duedate>
<description />
<notes />
<intnotes />
<taxincluded>false</taxincluded>
<dcn />
<customernumber>K-001</customernumber>
<language_code />
<parts>
<part>
<partnumber>ART-1</partnumber>
<description>Beispiel Artikel 1</description>
<unit />
<quantity>5.0</quantity>
<sellprice>99.0</sellprice>
<discount>0.0</discount>
<itemnote />
<price_update>2012-08-06T09:29:05.857+02:00</price_update>
</part>
</parts>
</invoice>
JSON:
{
"invnumber": "R-002",
"ordnumber": "",
"status": "OVERDUE",
"currency": "CHF",
"ar_accno": "1100",
"transdate": "2012-08-06T00:00:00+02:00",
"duedate": "2012-08-06T00:00:00+02:00",
"description": "",
"notes": "",
"intnotes": "",
"taxincluded": "false",
"dcn": "",
"customernumber": "K-001",
"language_code": "",
"parts":
{
"part":
{
"partnumber": "ART-1",
"description": "Beispiel Artikel 1",
"unit": "",
"quantity": "5.0",
"sellprice": "99.0",
"discount": "0.0",
"itemnote": "",
"price_update": "2012-08-06T09:30:54.679+02:00"
}
}
}
Customer transactions
Customer transactions require two addtional elements. incomeentries list all income accounts and their amounts. taxentries list all vat accounts and the tax amounts:
incomeentry element
| Element | Description | Default | Type | Mandatory |
|---|---|---|---|---|
| amount | DOUBLE | YES | ||
| income_accno | Income account number | TEXT | YES | |
| description | TEXT |
taxentries element
| Element | Description | Default | Type | Mandatory |
|---|---|---|---|---|
| amount | DOUBLE | YES | ||
| tax_accno | VAT account number | TEXT | YES |
Examples
XML:
<?xml version="1.0" encoding="UTF-8"?>
<invoice>
<invnumber>R-001</invnumber>
<ordnumber />
<status>OVERDUE</status>
<currency>CHF</currency>
<ar_accno>1100</ar_accno>
<transdate>2012-08-06T00:00:00+02:00</transdate>
<duedate>2012-08-06T00:00:00+02:00</duedate>
<description />
<notes />
<intnotes />
<taxincluded>false</taxincluded>
<customernumber>K-001</customernumber>
<language_code />
<incomeentries>
<incomeentry>
<amount>99.0</amount>
<income_accno>3400</income_accno>
<description />
</incomeentry>
</incomeentries>
<taxentries>
<taxentry>
<amount>7.92</amount>
<tax_accno>2201</tax_accno>
</taxentry>
</taxentries>
</invoice>
JSON:
{
"invnumber": "R-001",
"ordnumber": "",
"status": "OVERDUE",
"currency": "CHF",
"ar_accno": "1100",
"transdate": "2012-08-06T00:00:00+02:00",
"duedate": "2012-08-06T00:00:00+02:00",
"description": "",
"notes": "",
"intnotes": "",
"taxincluded": "false",
"customernumber": "K-001",
"language_code": "",
"incomeentries":
{
"incomeentry":
{
"amount": "99.0",
"income_accno": "3400",
"description": ""
}
},
"taxentries":
{
"taxentry":
{
"amount": "7.92",
"tax_accno": "2201"
}
}
}
