+% proforma.tex für LX-Office ab V2.6.3
+% Proforma Rechnung Verkauf
+% Überarbeitet von Norbert Simon, n.simon@linet-services.de
+% Version 2.5 vom 15. November 2011
+% Basiert auf der Arbeit von kmk@lilalaser.de / 2007
+% Diese Vorlage steht unter der GPL-Lizenz, Version 3
+% siehe http://www.gnu.de/licenses/gpl-3.0.html
+% ----------
+% config: tag-style=$( )$
+% ----------
+
+\documentclass[twoside]{scrartcl}
+\usepackage{fancyhdr} % Für den Seitenkopf und -Fuß
+\usepackage{ifpdf} % Erlaubt eine Code-Weiche für PDF, oder DVI Ausgabe
+\usepackage{xifthen} % Allgemeine Code-Weiche
+\usepackage{graphicx} % Fuer die Einbindung der Logo-Graphik
+\usepackage{german} % Deutsche Trenn-Tabelle
+\usepackage[utf8]{inputenc} % Umlaute direkt eingeben
+\usepackage{textcomp} % Sonderzeichen
+\usepackage{lastpage} % Fuer die Angabe "Seite 2 von 5"
+\usepackage{filecontents} % Um von latex aus eine Datei schreiben zu koennen
+\usepackage{etex} % Damit Marken verwendet werden koennen
+\usepackage{ltxtable} % Mehrseiten-Tabellen mit variabler Spaltenbreite
+\usepackage{booktabs} % Striche in Tabellen
+\usepackage{numprint} % Zahlen formatiert ausgeben
+\usepackage[$(if myconfig_output_numberformat =~ "1.000,00")$german$(else)$$(if myconfig_output_numberformat =~ "1000,00")$germannosep$(else)$$(if myconfig_output_numberformat =~ "1,000.00")$english$(else)$englishnosep$(end)$$(end)$$(end)$]{zwischensumme} % Lokales Makro zur Berechnung der Zwischensummen
+\usepackage{microtype,relsize} %Feinpositionierung, Sperren von Text
+\newcommand*{\sperren}[1]{\normalsize\textls*[200]{#1}} %Sperrung Überrschriften
+
+% ---------- Report-Variablen für kivitendobriefkopf.tex ----------
+% ---------- Die eigenen Daten ----------
+\newcommand{\employeename}{$(employee_name)$}
+\newcommand{\employeecompany}{$(employee_company)$}
+\newcommand{\employeeaddress}{$(employee_address)$}
+\newcommand{\employeetel}{$(employee_tel)$}
+\newcommand{\employeefax}{$(employee_fax)$}
+\newcommand{\employeeemail}{$(employee_email)$}
+\newcommand{\employeecoustid}{$(employee_co_ustid)$}
+\newcommand{\employeetaxnumber}{$(employee_taxnumber)$}
+\newcommand{\employeetable}{tabelle$(employee_login)$.tex}
+
+% ---------- eigene Bankverbindung falls nicht im Briefkopf ----------
+% \newcommand{\companybank}{$(company_bank)$}
+% \newcommand{\companybankcode}{$(company_bank_code)$}
+% \newcommand{\companyaccountnumber}{$(company_account_number)$}
+
+% ---------- Adressat ----------
+\newcommand{\name}{$(name)$}
+\newcommand{\departmentone}{$(department_1)$}
+\newcommand{\departmenttwo}{$(department_2)$}
+\newcommand{\cpgreeting}{$(cp_greeting)$}
+\newcommand{\cptitle}{$(cp_title)$}
+\newcommand{\cpgivenname}{$(cp_givenname)$}
+\newcommand{\cpname}{$(cp_name)$}
+\newcommand{\street}{$(street)$}
+\newcommand{\country}{$(country)$}
+\newcommand{\zipcode}{$(zipcode)$}
+\newcommand{\city}{$(city)$}
+\newcommand{\phone}{$(customerphone)$}
+\newcommand{\fax}{$(customerfax)$}
+\newcommand{\lettergreeting}{
+ \ifthenelse{\equal{$(cp_gender)$}{f}}
+ {Sehr geehrte Frau $(cp_name)$,}
+ {\ifthenelse{\equal{$(cp_gender)$}{m}}
+ {Sehr geehrter Herr $(cp_name)$,}
+ {Sehr geehrte Damen und Herren,}
+ }\\[1\baselineskip]
+}
+
+% ---------- Bestellvariablen ----------
+\newcommand{\quonumber}{$(quonumber)$} % Angebotsnummer
+\newcommand{\ordnumber}{$(ordnumber)$} % Auftragsnummer bei uns
+\newcommand{\cusordnumber}{$(cusordnumber)$} % Auftragsnummer beim Kunden
+\newcommand{\invnumber}{$(invnumber)$} % Rechnungsnummer
+\newcommand{\docnumber}{Proforma ReNr. {\ordnumber}} % \quonumber
+\newcommand{\quodate}{$(quodate)$}
+\newcommand{\kundennummer}{$(customernumber)$}
+\newcommand{\reqdate}{$(reqdate)$}
+\newcommand{\transdate}{$(transdate)$}
+
+% ---------- Lieferadresse ----------
+\newcommand{\shiptoname}{$(shiptoname)$}
+\newcommand{\shiptocontact}{$(shiptocontact)$}
+\newcommand{\shiptodepartmentone}{$(shiptodepartment_1)$}
+\newcommand{\shiptodepartmenttwo}{$(shiptodepartment_2)$}
+\newcommand{\shiptostreet}{$(shiptostreet)$}
+\newcommand{\shiptocity}{$(shiptocity)$}
+\newcommand{\shiptocountry}{$(shiptocountry)$}
+\newcommand{\shiptophone}{$(shiptophone)$}
+\newcommand{\shiptozipcode}{$(shiptozipcode)$}
+\newcommand{\shiptofax}{$(shiptofax)$}
+
+% ---------- Währung setzen ----------
+\newcommand{\currency}{$(currency)$}
+\ifthenelse{\equal{\currency}{EUR}}{\let\currency\euro}{}
+\ifthenelse{\equal{\currency}{YEN}}{\let\currency\textyen}{}
+\ifthenelse{\equal{\currency}{GBP}}{\let\currency\pounds}{}
+\ifthenelse{\equal{\currency}{USD}}{\let\currency\$}{}
+
+% ---------- Ende Reportvariablen-Umsetzung ----------
+
+% ---------- Briefkopf dazuladen ----------
+\input{kivitendobriefkopf}
+
+\begin{document}
+% ---------- Schrift Hauptdokuments (Computermodern-sanserif) ----------
+% \fontfamily{cmss}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
+% ---------- Schrift Helvetica ------------------------
+\fontfamily{phv}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
+% ---------- Firmenlogo nur auf Seite 1 ----------
+ \thispagestyle{briefkopf}
+
+% ---------- Datum und Nummern unterhalb des Briefkopfs ----------
+% Position unterhalb des Briefkopfs
+\vspace*{\vlogospacing}
+\renewcommand{\arraystretch}{0.9}
+\begin{minipage}[b]{177mm}
+\ifthenelse{\isempty{\invnumber}}
+{\sperren{\textbf{Proforma-Rechnung Nr. \quonumber}}}
+{\sperren{\textbf{Proforma-Rechnung Nr. \invnumber}}}
+{\tiny Bitte stets angeben}
+\hfill
+ \small
+ \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}}
+ \textbf{Seite} & {\thepage} von \pageref{LastPage}\\
+ \textbf{Datum} & \transdate \\
+ \textbf{Kunden Nr.} & \kundennummer\\
+ \ifthenelse{\isempty{\invnumber}}
+ {\textbf{Proforma-Rechnung Nr.} & \quonumber\\}
+ {\textbf{Proforma-Rechnung Nr.} & \invnumber\\}
+ \nonemptyline{\textbf{Vorraussichliches Lieferdatum:} &}{\reqdate}
+ \textbf{Ansprechpartner} & \employeename\\
+ \nonemptyline{\textbf{Durchwahl} &}{\employeetel}
+ \nonemptyline{\textbf{E-Mail} &}{\employeeemail}
+ \end{tabular}\\[10mm plus 20mm minus 10mm]
+\end{minipage}
+\renewcommand{\arraystretch}{1}
+\normalsize
+% ---------- Begrüßung und Bemerkungen ----------
+\vspace{ 5mm}
+\lettergreeting
+bitte überweisen Sie den ausgewiesenen Rechnungsbetrag für Ihre
+nachfolgend aufgeführte Bestellung auf das unten angegebene Konto.
+\ifthenelse{\isempty{$(notes)$}}{}{
+ \newline
+ $(notes)$
+ }
+\vspace{5mm}
+
+% ---------- Die eigentliche-Tabelle ----------
+% ---------- Tabelle puffern ----------
+\begin{filecontents}{\employeetable}
+% ---------- globale Variable laufsumme deklarieren ----------
+\resetlaufsumme
+% ---------- Spaltendefinition ----------
+%\begin{longtable}{@{}rlX@{ }rlrr@{\makebox[\widthof{\textbf{~\currency}}]}}
+\begin{longtable}{@{}rlX@{ }rlrr@{\makebox[\widthof{\textbf{}}]}}
+% ---------- Kopfzeile der Tabelle ----------
+ \textbf{Pos} &
+ \textbf{Art.Nr.} &
+ \textbf{Bezeichnung} &
+ \textbf{Menge} &
+ \textbf{ME} &
+ \textbf{EP/€} &
+ \textbf{GP/€} \\
+ \midrule
+ \endfirsthead
+% ---------- Tabellenkopf nach dem Umbruch ----------
+ \textbf{Pos} &
+ \textbf{Art.Nr.} &
+ \textbf{Bezeichnung} &
+ \textbf{Menge} &
+ \textbf{ME} &
+ \textbf{EP/€} &
+ \textbf{GP/€} \\
+ \midrule
+ & & \multicolumn{4}{r}{} & \MarkUebertrPos\\[1.5em]
+ \endhead
+% ---------- Fuss der Teiltabellen ----------
+ \midrule
+ & & \multicolumn{4}{r}{} & \MarkZwsumPos \\
+ \endfoot
+% ---------- Das Ende der Tabelle ----------
+ \midrule
+% & & \multicolumn{4}{r}{ Nettobetrag:} & \MarkZwsumPos \\
+ \endlastfoot
+% ---------- Positionen ----------
+ $(foreach number)$
+ $(runningnumber)$ &
+ $(number)$ &
+ $(description)$
+ \ifthenelse{\equal{$(longdescription)$}{}}{}{\newline
+ \renewcommand{\baselinestretch}{1}\footnotesize
+ {\footnotesize $(longdescription)$
+ \renewcommand{\baselinestretch}{1}\normalsize
+ }} &
+ $(qty)$ &
+ $(unit)$ &
+ \ifthenelse{\isempty{$(sellprice)$}}{&}{
+ \numprint{$(sellprice)$}
+ \ifthenelse{\equal{$(p_discount)$}{0}}{}{ -$(p_discount)$\%} &
+ \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$}
+ }\\ %
+ $(end number)$
+
+\end{longtable}
+% ---------- Ende der Hilfsdatei ----------
+\end{filecontents}
+% ---------- Puffertabelle öffnen ----------
+\LTXtable{\textwidth}{\employeetable}
+%---------- Bereich für die Summen ----------
+\parbox{\textwidth}{
+%---------- Summenbereich nach recht schieben ----------
+\hfill
+\setlength{\tabcolsep}{0mm}
+\begin{tabular}{@{}r@{ }r@{ }l}
+% \toprule
+ {Nettobetrag:}& \numprint{$(subtotal)$}& \currency\\
+% ---------- Alle Steuern ausweisen ----------
+ $(foreach tax)$
+% {$(taxdescription)$ auf }\numprint{$(taxbase)$}~\currency: & \numprint{$(tax)$}& \\
+ {$(taxdescription)$}: & \numprint{$(tax)$}& \currency\\
+ $(end tax)$
+ \midrule
+ \ifthenelse{\isempty{$(ordtotal)$}}
+ {{\textbf{Gesamtbetrag:}} & \bfseries\numprint{$(invtotal)$} & \textbf{\currency}\\}
+ {{\textbf{Gesamtbetrag:}} & \bfseries\numprint{$(ordtotal)$} & \textbf{\currency}\\}
+ \bottomrule
+\end{tabular}
+}
+% ---------- Transportmittel ----------
+$(if shipvia)$
+Lieferung per $(shipvia)$.\\[1em]
+$(end)$
+% ---------- Lieferadresse ----------
+\ifthenelse{%
+ \equal{\shiptoname}{\name} \AND
+ \equal{\shiptodepartmentone}{\leer} \AND
+ \equal{\shiptodepartmenttwo}{\leer} \AND
+ \equal{\shiptostreet}{\street} \AND
+ \equal{\shiptozipcode}{\zipcode} \AND
+ \equal{\shiptocity}{\city}
+ }{}{
+% ---------- Umbruch dazwischen verhindern ----------
+\parbox{\textwidth}{
+% ---------- Bereich für Lieferadresse ----------
+\textbf{Lieferanschrift:}\hfill\parbox[t]{0.7\textwidth}{
+ \shiptoname \\
+ \nonemptyline{}{\shiptodepartmentone}
+ \nonemptyline{}{\shiptodepartmenttwo}
+ \shiptostreet \\
+ \shiptocountry{ }\shiptozipcode{ }\shiptocity\\[1mm]
+ \nonemptyline{Tel: }{\shiptophone}
+ \nonemptyline{Fax: }{\shiptofax}
+ }%ende parbox
+}% ende parbox
+}% ende ifthenelse
+% ---------- Nachbemerkung mit variablem Abstand ----------
+$(if reqdate)$
+\vspace*{0.5em}
+\textbf{Das Angebot ist gültig bis zum \reqdate.}\\
+$(end)$
+$(if payment_terms)$
+\vspace*{0.5em}
+\textbf{Zahlungsbedingungen:}\hfill\parbox[t]{0.7\textwidth}{$(payment_terms)$}\\
+$(end)$
+\vspace*{0.5em}
+Die Ware bleibt bis zur vollständigen Bezahlung unser Eigentum.
+$(if reqdate)$
+\vspace*{0.5em}
+Sollte bis zum \reqdate{ }kein Zahlungseingang erfolgen, ist der Vertrag hinfällig.
+$(end)$
+\vspace*{0.5em}
+Nutzen Sie bitte für Fragen oder Änderungswünsche die oben angegebenen Kontaktmöglichkeiten.\\ \vfil
+\parbox{\textwidth}{
+\vspace*{1em}
+Mit freundlichen Grüßen\\ \vfil
+\employeename
+} % parbox
+\vfill
+\footnotesize
+Es gelten unsere AGB, die wir Ihnen -- falls nicht zur Hand oder unbekannt -- gern zusenden.
+
+\end{document}