language = 'EN' -- EN | DE | FR | IT | RU; set before tr()/localize() calls vat_legal_links = true -- clickable statutory references; tax explanations remain mandatory --type_of_document = 1 --Quote type_of_document = 2 -- Invoice output_format = 'zugferd' -- pdf | xml (EN 16931 CII + PDF) | xrechnung | zugferd buyer_reference = 'PO112233' --type_of_document = 3 -- Delivery Note --type_of_document = 4 -- Order Confirmation --type_of_document = 5 -- Proforma Invoice --type_of_document = 6 -- Purchase Order --type_of_document = 7 -- Credit Note (reducing or canceling part or all of a previously issued invoice) --type_of_document = 8 -- Cancellation Invoice (fully cancelling an invoice) --type_of_document = 9 -- Quotation Request --type_of_document = 10 -- Letter type_of_sale = 1 --Domestic sale (Germany → German company) --type_of_sale = 2 --Intra-EU delivery of goods (Germany → EU business) --type_of_sale = 3 --Export of goods to a non-EU country (Germany → China, USA, etc.) --type_of_sale = 4 --Service to an EU business (e.g., software license) --type_of_sale = 5 --Service to a non-EU business (e.g., USA, China) type_of_invoice = 1 --Full payment --type_of_invoice = 2 --Advance payment --type_of_invoice = 3 --Partial payment --type_of_invoice = 4 --Final payment watermark = "DRAFT" --watermark = "EXAMPLE" --Project Name project_name = "Hydraulikstation für Linie 7, 2025.1" document_number = "26052025.019" invoice_number = "01072022.001" quote_number = "01072022.001" --Date and Time of the current Document document_date = os.time{ year = 2025, month = 6, day = 14 } vat_check_interval = 90 --Interval in days for re-checking the customer's VAT number using the VIES system date_of_delivery = os.time{ -- Date and Time of Delivery year = 2025, month = 6, day = 14 } --currency = "€" currency = "EUR" -- ISO 4217: EUR, USD, GBP, CHF, JPY, KWD, ... --currency = "£" vat_percent = 19 valid_days = 61 payment_in_days = 30 commercial_shipping = true --Commercial shipment --commercial_shipping = false --Goods supplied free of charge – sample for testing delivery_note = true --Delivery Note will be supplied --delivery_note = false --No Delivery Note will be supplied -- Customer Information customer = { company = "Beispielkunde GmbH", address = "Beispielstrasse 1 \\\\10115 Berlin\\\\ Deutschland", country_code = "DE", -- ISO 3166-1 alpha-2; independent of invoice currency postal_address = {street='Beispielstrasse 1', postcode='10115', city='Berlin'}, endpoint_id = 'billing@example.com', endpoint_scheme = 'EM', vat = "DE111888999", vat_valid = false, -- set true only after an actual successful VIES check vat_verified = os.time{ --Verification date of VAT number via VIES year = 2025, month = 6, day = 13 }, po = "PO112233", contact = "John Doe \\\\ & Project Manager\\\\ \\faEnvelopeO & name.family@example.com \\\\ \\faPhone & +1 (555) 123-4567 \\\\ \\faMobile & +1 (777) 123-4567" } -- My Information my = { company = "Musterfirma GmbH", address = "Hauptstra\\ss e 12", city = "10115 Berlin", country = "Deutschland", country_code = "DE", postal_address = {street='Hauptstraße 12', postcode='10115', city='Berlin'}, endpoint_id = 'info@musterfirma.de', endpoint_scheme = 'EM', registration_id = 'HRB123456', tax_id = '12/345/67890', -- fictional Steuernummer; VAT ID OR tax ID is required legal_form = 'GmbH', registered_office = 'Berlin', register_court = 'Amtsgericht Berlin-Charlottenburg', managing_directors = {'Max Mustermann'}, bank = "Deutsche Musterbank", bic = "COBADEFFXXX", iban = "DE89 3704 0044 0532 0130 00", -- (EUR) --iban = "DE69 5907 0070 0702 2023 01", -- (USD) purpose_code = "supplier", name = "Max Mustermann", email = "info@musterfirma.de", www = "https://www.musterfirma.de", phone = "+49 (0)30 1234 5678", vat = "DE123456789", signature = "Max_Mustermann.png", signature_height = "12mm", stamp = "Musterfirma_GmbH.png", stamp_height = "35mm", register = "Amtsgericht Berlin-Charlottenburg, HRB 123456" } invoice_notes = { {label='project', text=project_name or 'N/A'}, {label='project_manager', text=my.name or 'N/A'}, {label='serial_number', text='xx123123987'}, {label='warranty', text_key='warranty_example'}, {label='delivery', text_key='delivery_example'}, {text_key='training_example'} } quote_specific_comments = { tr('valid_until')..': '..print_valid_date() } general_comments = {} -- payment_terms may override the automatically localized due-date text. invoice_specific_comments = {} quote_and_invoice_comments = {tr('currency')..': '..currency_symbol_txt()} delivery_specific_comments = { "Dimensions: 401~cm (L)\\,\\times\\,129~cm (W)\\,\\times\\,274~cm (H)", "Weight: 2300~kg", "Shipping Method: Sea Freight", "HS Code: 9031.20.0000 -- Test bench" } confirmation_specific_comments = { } proforma_specific_comments = { } purchase_specific_comments = { } credit_note_specific_comments = { } letter_specific_comments = { } cancellation_invoice_specific_comments = { "As the payment has not been received for an extended period, the order " .. customer.po .. " has been cancelled. See our invoice " .. invoice_number .. "." } quotation_request_specific_comments = { } -- List of Items items = { { description_plain = 'Bosch Rexroth A10VSO 71DFR1/31R-PPA12N00 Pumpe\nArtikelnummer: R902603299', description = "Bosch Rexroth A10VSO 71DFR1/31R-PPA12N00 Pumpe".. "\\vspace{0.2\\baselineskip}".. "\\newline Artikelnummer: R902603299".. "\\vspace{0.2\\baselineskip}", quantity = 1, unitprice = 2450.00 }, { description_plain = 'Hydac Filterelement 2600 R 010 BN4HC\nArtikelnummer: 1263775', description = "Hydac Filterelement 2600 R 010 BN4HC".. "\\vspace{0.2\\baselineskip}".. "\\newline Artikelnummer: 1263775".. "\\vspace{0.2\\baselineskip}", quantity = 4, unitprice = 75.00 }, { description_plain = 'Moog Servoventil ±10 mA\nArtikelnummer: D634-319C', description = "Moog Servoventil \\pm 10 mA".. "\\vspace{0.2\\baselineskip}".. "\\newline Artikelnummer: D634-319C".. "\\vspace{0.2\\baselineskip}", quantity = 1, discount_percent = 10, unitprice = 1990.00 }, { description_plain = 'Parker PID-Controller, analog, DIN-Schiene\nArtikelnummer: PWD00A-4001', description = "Parker PID-Controller, analog, DIN-Schiene".. "\\vspace{0.2\\baselineskip}".. "\\newline Artikelnummer: PWD00A-4001".. "\\vspace{0.2\\baselineskip}", quantity = 1, discount_percent = 35, unitprice = 890.00 } } letter_text_plain = tr('intro') -- Final invoice with two received advances at different VAT rates. -- Amounts are in the invoice currency. Each row represents one payment/tax group. type_of_invoice = 4 document_number = 'FINAL-2025-019' items[2].vat_percent = 7 advance_payments = { {invoice_number='ADV-2025-001', invoice_date=os.time{year=2025,month=5,day=1}, payment_date=os.time{year=2025,month=5,day=10}, net_amount='1000.00', vat_amount='190.00', vat_percent=19, tax_category='S'}, {invoice_number='ADV-2025-002', invoice_date=os.time{year=2025,month=5,day=15}, payment_date=os.time{year=2025,month=5,day=20}, net_amount='50.00', vat_amount='3.50', vat_percent=7, tax_category='S'} }