In diesem Artikel
Data structure used by the Invoice Layout Extension to print an invoice.
{
"billing_info": {
"discount": {
"amount_vat_exclusive": "2.20"
},
"due_date": "2020-06-17",
"total_advance_payment": "",
"total_amount_vat_exclusive": "122.15",
"total_amount_vat_exclusive_before_discount": "124.35",
"total_amount_vat_inclusive": "131.56",
"total_amount_vat_inclusive_before_discount": "133.93",
"total_categories": [],
"total_discount_percent": "1.8",
"total_discount_vat_exclusive": "2.20",
"total_discount_vat_inclusive": "2.37",
"total_rounding_difference": "",
"total_to_pay": "131.56",
"total_vat_amount": "9.41",
"total_vat_amount_before_discount": "9.58",
"total_vat_codes": [
{
"total_amount_vat_exclusive": "122.15",
"total_amount_vat_inclusive": "131.56",
"total_vat_amount": "9.41",
"vat_code": "V77"
}
],
"total_vat_rates": [
{
"total_amount_vat_exclusive": "122.15",
"total_amount_vat_inclusive": "131.56",
"total_vat_amount": "9.41",
"vat_rate": "7.70"
}
]
},
"creator_info": {
"name": "ch.banana.application.invoice.default",
"pubdate": "2021-09-24",
"publisher": "Banana.ch SA",
"version": ""
},
"customer_info": {
"address1": "Via ai Salici 12",
"address2": "",
"address3": "",
"business_name": "La stanza del Te SA",
"city": "Lugano",
"country": "",
"country_code": "CH",
"courtesy": "",
"email": "",
"first_name": "pinco",
"iban": "",
"last_name": "",
"mobile": "",
"number": "1",
"phone": "",
"postal_code": "6900",
"web": ""
},
"document_info": {
"currency": "CHF",
"customer_reference": "asdf",
"date": "2020-06-17",
"decimals_amounts": 2,
"description": "Fornitura merce (esempio iva esclusa)",
"doc_type": "10",
"locale": "it",
"number": "3",
"rounding_totals": "0.05",
"text_begin": "",
"title": "Fornitura merce (esempio iva esclusa)",
"vat_mode": "vat_excl"
"custom_info": [
{
"id": "custom_field_1",
"title": "Weight",
"value": "45 kg"
},
{
"id": "custom_field_2",
"title": "Packages",
"value": "3"
}
]
},
"items": [
{
"description": "Te\n1\n2\n3",
"item_type": "item",
"mesure_unit": "pz",
"number": "1000",
"price": "",
"quantity": "4.00",
"total": "",
"total_amount_vat_exclusive": "19.68",
"total_amount_vat_inclusive": "21.20",
"total_vat_amount": "1.52",
"unit_price": {
"amount_vat_exclusive": null,
"amount_vat_inclusive": "5.30",
"calculated_amount_vat_exclusive": "4.92",
"calculated_amount_vat_inclusive": "5.30",
"calculated_vat_amount": "0.38",
"vat_code": "V77",
"vat_rate": "7.70"
},
"vat_code": "",
"vat_rate": ""
},
{
"description": "Te",
"discount": {
"percent": "30."
},
"item_type": "item",
"mesure_unit": "pz",
"number": "1000",
"quantity": "4.00",
"total": "",
"total_amount_vat_exclusive": "13.78",
"total_amount_vat_inclusive": "14.84",
"total_vat_amount": "1.06",
"unit_price": {
"amount_vat_exclusive": null,
"amount_vat_inclusive": "5.30",
"calculated_amount_vat_exclusive": "4.92",
"calculated_amount_vat_inclusive": "5.30",
"calculated_vat_amount": "0.38",
"discounted_amount_vat_exclusive": "3.44",
"discounted_amount_vat_inclusive": "3.71",
"discounted_vat_amount": "0.27",
"vat_code": "V77",
"vat_rate": "7.70"
}
},
{
"description": "Te",
"discount": {
"amount": "1.60"
},
"item_type": "item",
"mesure_unit": "pz",
"number": "1000",
"quantity": "4.00",
"total": "",
"total_amount_vat_exclusive": "13.74",
"total_amount_vat_inclusive": "14.80",
"total_vat_amount": "1.06",
"unit_price": {
"amount_vat_exclusive": null,
"amount_vat_inclusive": "5.30",
"calculated_amount_vat_exclusive": "4.92",
"calculated_amount_vat_inclusive": "5.30",
"calculated_vat_amount": "0.38",
"discounted_amount_vat_exclusive": "3.44",
"discounted_amount_vat_inclusive": "3.70",
"discounted_vat_amount": "0.26",
"vat_code": "V77",
"vat_rate": "7.70"
}
},
{
"description": "Te",
"item_type": "item",
"mesure_unit": "pz",
"number": "",
"quantity": "10000",
"total_amount_vat_exclusive": "17.18",
"total_amount_vat_inclusive": "18.50",
"total_vat_amount": "1.32",
"unit_price": {
"amount_vat_exclusive": null,
"amount_vat_inclusive": "0.00185",
"calculated_amount_vat_exclusive": "0.00172",
"calculated_amount_vat_inclusive": "0.00185",
"calculated_vat_amount": "0.00013",
"vat_code": "V77",
"vat_rate": "7.70"
}
},
{
"description": "Te",
"discount": {
"amount": "0.00035"
},
"item_type": "item",
"mesure_unit": "pz",
"number": "1000",
"quantity": "10000",
"total": "",
"total_amount_vat_exclusive": "13.93",
"total_amount_vat_inclusive": "15.00",
"total_vat_amount": "1.07",
"unit_price": {
"amount_vat_exclusive": null,
"amount_vat_inclusive": "0.00185",
"calculated_amount_vat_exclusive": "0.00172",
"calculated_amount_vat_inclusive": "0.00185",
"calculated_vat_amount": "0.00013",
"discounted_amount_vat_exclusive": "0.00139",
"discounted_amount_vat_inclusive": "0.00150",
"discounted_vat_amount": "0.00011",
"vat_code": "V77",
"vat_rate": "7.70"
}
},
{
"description": "Te",
"discount": {
"percent": "3."
},
"item_type": "item",
"mesure_unit": "pz",
"number": "1000",
"quantity": "10000",
"total": "",
"total_amount_vat_exclusive": "16.67",
"total_amount_vat_inclusive": "17.95",
"total_vat_amount": "1.28",
"unit_price": {
"amount_vat_exclusive": null,
"amount_vat_inclusive": "0.00185",
"calculated_amount_vat_exclusive": "0.00172",
"calculated_amount_vat_inclusive": "0.00185",
"calculated_vat_amount": "0.00013",
"discounted_amount_vat_exclusive": "0.00167",
"discounted_amount_vat_inclusive": "0.00179",
"discounted_vat_amount": "0.00013",
"vat_code": "V77",
"vat_rate": "7.70"
}
},
{
"description": "Te",
"item_type": "item",
"mesure_unit": "pz",
"number": "",
"quantity": "0.00025",
"total_amount_vat_exclusive": "9.33",
"total_amount_vat_inclusive": "10.05",
"total_vat_amount": "0.72",
"unit_price": {
"amount_vat_exclusive": null,
"amount_vat_inclusive": "40200.00",
"calculated_amount_vat_exclusive": "37325.91",
"calculated_amount_vat_inclusive": "40200.00",
"calculated_vat_amount": "2874.09",
"vat_code": "V77",
"vat_rate": "7.70"
}
},
{
"description": "Te",
"discount": {
"amount": "8000"
},
"item_type": "item",
"mesure_unit": "pz",
"number": "1000",
"quantity": "0.00025",
"total": "",
"total_amount_vat_exclusive": "7.47",
"total_amount_vat_inclusive": "8.05",
"total_vat_amount": "0.58",
"unit_price": {
"amount_vat_exclusive": null,
"amount_vat_inclusive": "40200.00",
"calculated_amount_vat_exclusive": "37325.91",
"calculated_amount_vat_inclusive": "40200.00",
"calculated_vat_amount": "2874.09",
"discounted_amount_vat_exclusive": "29897.86",
"discounted_amount_vat_inclusive": "32200.00",
"discounted_vat_amount": "2302.14",
"vat_code": "V77",
"vat_rate": "7.70"
}
},
{
"description": "Te",
"discount": {
"percent": "25."
},
"item_type": "item",
"mesure_unit": "pz",
"number": "1000",
"quantity": "0.00025",
"total": "",
"total_amount_vat_exclusive": "7.00",
"total_amount_vat_inclusive": "7.54",
"total_vat_amount": "0.54",
"unit_price": {
"amount_vat_exclusive": null,
"amount_vat_inclusive": "40200.00",
"calculated_amount_vat_exclusive": "37325.91",
"calculated_amount_vat_inclusive": "40200.00",
"calculated_vat_amount": "2874.09",
"discounted_amount_vat_exclusive": "27994.43",
"discounted_amount_vat_inclusive": "30150.00",
"discounted_vat_amount": "2155.57",
"vat_code": "V77",
"vat_rate": "7.70"
}
},
{
"description": "Spese di spedizione",
"item_type": "item",
"mesure_unit": "",
"number": "4000",
"price": "",
"quantity": "1.00",
"total": "",
"total_amount_vat_exclusive": "5.57",
"total_amount_vat_inclusive": "6.00",
"total_vat_amount": "0.43",
"unit_price": {
"amount_vat_exclusive": null,
"amount_vat_inclusive": "6.00",
"calculated_amount_vat_exclusive": "5.57",
"calculated_amount_vat_inclusive": "6.00",
"calculated_vat_amount": "0.43",
"vat_code": "V77",
"vat_rate": "7.70"
},
"vat_code": "",
"vat_rate": ""
}
],
"note": [
{
"date": null,
"description": "aFASD\nF AS\nDF\n AS\nDF ASDF"
}
],
"payment_info": {
"due_date": "2020-07-17"
},
"supplier_info": {
"address1": "VIa alle colline 12",
"address2": "",
"address3": "",
"business_name": "My Company",
"city": "Lugano",
"country": "Svizzera",
"country_code": "CH",
"courtesy": "",
"email": "info@mycompany.zz",
"first_name": "",
"fiscal_number": "",
"iban_number": "CH93 0076 2011 6238 5295 7",
"last_name": "",
"mobile": "",
"phone": "+41 56 777 999",
"postal_code": "600",
"vat_number": "CHE-111.333.999 IVA",
"web": "https://www.mycompany.zz"
},
"type": "invoice",
"version": "1.0"
}
Invoice Json Properties Explanation
The Json has the following main elements:
- type
"invoice" - version
"1.0" - document_info
- Information relative to the invoice or estimate (currency, doctype,...)
- Initial texts, before Items
- payment_info
Invoice due date. - supplier_info
Address of the company that issue/send the invoice.customer_info - Address of one receiving the invoice.
- shipping_info
Shipping Address - items
The list of items - billing_info
Total of the invoices.note - note
Array that contains the notes, to be printed at the end. - parameters
Not used - template_parameters
- Texts that are defined in the Invoice Dialogs
- transactions
Payment information (not used in transactions)
Source of data
This list explains where the actual information on your invoice json object is coming from
Invoice Object Property | Source |
---|---|
customer_info.address1 | Table: Accounts, View: Address, Column: Street |
customer_info.address2 | Table: Accounts, View: Address, Column: AddressExtra |
customer_info.address3 | Table: Accounts, View: Address, Column: POBox |
customer_info.balance | Table: Accounts, View: Address, Column: Balance |
customer_info.balance_base_currency | Table: Accounts, View: Address, Column: BalanceCurrency |
customer_info.bank_account | Table: Accounts, View: Address, Column: BankAccount |
customer_info.bank_clearing | Table: Accounts, View: Address, Column: BankClearing |
customer_info.bank_name | Table: Accounts, View: Address, Column: BankName |
customer_info.business_name | Table: Accounts, View: Address, Column: OrganisationName |
customer_info.city | Table: Accounts, View: Address, Column: Locality |
customer_info.country | Table: Accounts, View: Address, Column: Country |
customer_info.country_code | Table: Accounts, View: Address, Column: CountryCode |
customer_info.courtesy | Table: Accounts, View: Address, Column: NamePrefix |
customer_info.credit_limit | Table: Accounts, View: Address, Column: CreditLimit |
customer_info.currency | Table: Accounts, View: Address, Column: Currency |
customer_info.date_birth | Table: Accounts, View: Address, Column: DateOfBirth |
customer_info.email | Table: Accounts, View: Address, Column: EmailWork |
customer_info.fax | Table: Accounts, View: Address, Column: Fax |
customer_info.first_name | Table: Accounts, View: Address, Column: FirstName |
customer_info.fiscal_number | Table: Accounts, View: Address, Column: FiscalNumber |
customer_info.iban_number | Table: Accounts, View: Address, Column: BankIban |
customer_info.lang | Table: Accounts, View: Address, Column: Language |
customer_info.last_name | Table: Accounts, View: Address, Column: FamilyName |
customer_info.member_fee | Table: Accounts, View: Address, Column: MemberFee |
customer_info.mobile | Table: Accounts, View: Address, Column: PhoneMobile |
customer_info.number | Table: Accounts, View: Address, Column: Account |
customer_info.payment_term_days | Table: Accounts, View: Address, Column: PaymentTermInDays |
customer_info.phone | Table: Accounts, View: Address, Column: PhoneMain |
customer_info.postal_code | Table: Accounts, View: Address, Column: PostalCode |
customer_info.state | Table: Accounts, View: Address, Column: Region |
customer_info.vat_number | Table: Accounts, View: Address, Column: VatNumber |
customer_info.web | Table: Accounts, View: Address, Column: Website |
document_info.currency | Invoice currency which usually corresponds to the customer account currency |
document_info.date | Table: Transactions, Column: DateDocument or Date |
document_info.decimals_amounts | Decimals are the same as the decimals used in the accounting file |
document_info.description | Not used |
document_info.doc_type | Table: Transactions, Column: DocType |
document_info.greetings | Table: Transactions, Column: DocType Transactions with DocType=10:gre If there are many rows with 10:gre the texts are joined with ','. More info... |
document_info.locale | Menu: File-File and accounting properties, Other, current Language |
document_info.number | Table: Transactions, Column: DocInvoice |
document_info.order_date | Table: Transactions, Column: DocType Transactions with DocType=10:ordd More info... |
document_info.order_number | Table: Transactions, Column: DocType Transactions with DocType=10:ordn More info... |
document_info.origin_row | Row index of source transaction |
document_info.origin_table | Table name of source transaction |
document_info.rounding_total | Default value for CHF: 0.05 You can overwrite this value with the menu command: Account2 - Customers - Settings - Advanced - Invoice rounding For multicurrency accounting: you can setup the rounding value for each currency in the table ExchangeRates, column DecimalPoints |
document_info.text_begin | Table: Transactions, Column: DocType Transactions with DocType=10:beg More info... |
document_info.type | invoice |
items | Table: Transactions All rows with the same invoice number and transaction date are invoice's items (lines) |
note | Table: Transactions, Column: DocType Transactions with DocType=10:not. More info... |
parameters | Table: Transactions, Column: DocType Transactions with DocType=10:par:key Key: any key text you wish Value: is taken from column Description More info... |
payment_info | Calculated from journal |
shipping_info | Delivery address if different from the invoice address (customer_info) Table: Transactions, Column: DocType Transactions with DocType=10:sadr More info... |
supplier_info.address1 | Menu: File-File and accounting properties, Address, Address 1 |
supplier_info.address2 | Menu: File-File and accounting properties, Address, Address 2 |
supplier_info.business_name | Menu: File-File and accounting properties, Address, Company |
supplier_info.city | Menu: File-File and accounting properties, Address, City |
supplier_info.country | Menu: File-File and accounting properties, Address, Country |
supplier_info.courtesy | Menu: File-File and accounting properties, Address, Courtesy |
supplier_info.email | Menu: File-File and accounting properties, Address, Email |
supplier_info.fax | Menu: File-File and accounting properties, Address, Fax |
supplier_info.first_name | Menu: File-File and accounting properties, Address, Name |
supplier_info.fiscal_number | Menu: File-File and accounting properties, Address, Fiscal Number |
supplier_info.last_name | Menu: FilevFile and accounting properties, Address, Family Name |
supplier_info.mobile | Menu: File-File and accounting properties, Address, Mobile |
supplier_info.phone | Menu: File-File and accounting properties, Address, Phone |
supplier_info.postal_code | Menu: File-File and accounting properties, Address, Zip |
supplier_info.state | Menu: File-File and accounting properties, Address, Region |
supplier_info.vat_number | Menu: File-File and accounting properties, Address, Vat Number |
supplier_info.web | Menu: File-File and accounting properties, Address, Web |
transactions | Table: Transactions All rows with the same invoice number and different transaction date, which are not considered invoice items, like payments transactions |