% !TeX Program=lualatex
%
% Demo file for the LaTeX-ZUGFeRD project
% This file corresponds to version 0.9d (2025-01-02)
%
% Copyright (C) 2024 Marei Peischl <marei@peitex.de>
% ---------------------------------------------------------
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in:
%
%    http://www.latex-project.org/lppl.txt
%
% and version 1.3c or later is part of all distributions of LaTeX
% version 2008-05-04 or later.
%
\DocumentMetadata{
	pdfstandard=a-3b,
	lang=de,	
}
\documentclass[parskip=half-,german]{scrartcl}

\usepackage[
	format=xrechnung3.0% 3.0 is the default anyway, but you can select the format to avoid automatic changes.
]{zugferd-invoice}

\setkomavar{invoice}{2024:1337}
\setkomavar{date}{2024-01-04}
\setkomavar{title}{Rechnung}

\newkomafont{invoicetotal}{\bfseries}

\SetZUGFeRDData{
%	document-type =  commercial-invoice, % commented as this setting matches the initial value
	id=komavar,
%	date=auto, % commented as this setting matches the initial value
%	delivery-date = auto, % commented as this setting matches the initial value
	subject=komavar,
	fromaddress=komavar,
%	tax/category=S,  % commented as this setting matches the initial value
%	tax/rate=19,  % commented as this setting matches the initial value
	unit=hour,
	seller/name = {peiTeX (Marei Peischl)},
	seller/postcode = {20253},
	seller/city ={Hamburg},
	seller/country = DE,
	seller/address = {Address 1},
	seller/vatid = {DE123456789},
	seller/contact= {Marei\\+4900000000\\marei@peitex.de},
	seller/email = {kontakt@peitex.de},
	buyer/reference = {buyer-reference}, %oder Leitweg-ID
	buyer/name = {Käufer Name},
	buyer/postcode = {20253},
	buyer/city ={Hamburg},
	buyer/country = DE,
	buyer/address = {Address 1\\Address 2},
	buyer/vatid = {DE123456789},
	buyer/email = {invoice@example.org},
	currency=€,
	payment-terms={Zahlbar innerhalb von 14 Tagen},% either this one or the due-date below is required
	due-date={20240118},
	payment-means / type = 58, % SEPA Ãœbereisung,
	payment-means / iban = DE68430609671013251700,
	payment-means / account-holder = Marei Peischl,
	payment-means / bic =GENODEM1GLS
}



\begin{document}


\begin{letter}{Firma\\Vorname Nachname\\Rechnungsadresse\\PLZ Ort}
	
\opening{Guten Tag,}

hiermit stelle ich Ihnen meine Arbeit im Rahmen des Projektes XX in Rechnung. Die Leistung wurde im Januar 2024 erbracht. 

\AddInvoiceItem{3}{Weiterentwicklung/funktionale Erweiterung}{90}
\AddInvoiceItem<unit=piece>[7]{3}{Support}{90}
\AddInvoiceItem{2}{Support an Feiertagen/Wochenende}{180}
\AddInvoiceItem{3.25}{Rundungstest}{95.38}

\PrintInvoiceTabular

Ich bitte Sie oben genannte Betrag binnen 30 Tagen auf unten genanntes Konto zu überweisen.

%Falls gewünscht
\closing{Happy \TeX{}ing}


\end{letter}

\end{document}