X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fprint%2FStandard%2Finvoice.tex;h=be93079e5bc760a5c9589d43ce53e2d17dda827f;hb=c7c7d2d52ba0092604eac610b18fd285c2ef5b4e;hp=27487a31b723604f7d300e3a12df917665aa3f43;hpb=8efbc44487e0f99236ec55539a61f1d0d04635a9;p=kivitendo-erp.git diff --git a/templates/print/Standard/invoice.tex b/templates/print/Standard/invoice.tex index 27487a31b..be93079e5 100644 --- a/templates/print/Standard/invoice.tex +++ b/templates/print/Standard/invoice.tex @@ -1,83 +1,291 @@ +% invoice.tex +% Rechnung Verkauf +% Überarbeitet von Norbert Simon, n.simon@linet-services.de +% Version 2.5 vom 16. 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{eurosym} -\usepackage{tabularx} -\usepackage{ifthen} -\usepackage[utf8]{inputenc} -\begin{document} +\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 -\setlength{\parindent}{0cm} +% ---------- Report-Variablen zur Verwendung in 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}{$(template_meta.tmpfile NOESCAPE)$.table.tex} -\pagestyle{empty} +% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ---------- +% \newcommand{\companybank}{$(company_bank)$} +% \newcommand{\companybankcode}{$(company_bank_code)$} +% \newcommand{\companyaccountnumber}{$(company_account_number)$} -\newlength{\descrwidth}\setlength{\descrwidth}{10cm} +% ---------- 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] +} -\fontfamily{cmss}\fontshape{n}\selectfont +% ---------- Rechnungsvariablen ---------- +\newcommand{\kundennummer}{$(customernumber)$} +\newcommand{\quonumber}{$(quonumber)$} % Angebotsnummer +\newcommand{\ordnumber}{$(ordnumber)$} % Auftragsnummer bei uns +\newcommand{\cusordnumber}{$(cusordnumber)$} % Auftragsnummer beim Kunden +\newcommand{\invnumber}{$(invnumber)$} % Rechnungsnummer +\newcommand{\docnumber}{Rechnung Nr. \invnumber} +\newcommand{\quodate}{$(quodate)$} % Angebotsdatum +\newcommand{\orddate}{$(orddate)$} % Auftragsdatum +\newcommand{\reqdate}{$(reqdate)$} % gewuenschtes Lieferdatum +\newcommand{\deliverydate}{$(deliverydate)$} % Lieferdatum +\newcommand{\invdate}{$(invdate)$} % Rechnungsdatum +\newcommand{\terms}{$(terms)$} % Zahlungsfrist +\newcommand{\duedate}{$(duedate)$} % Fälligkeitsdatum +\newcommand{\invtotal}{$(invtotal)$} % Gesamtbetrag +\newcommand{\paid}{$(paid)$} % Schon bezahlt +\newcommand{\total}{$(total)$} % Restbetrag -\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +% ---------- 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)$} -\vspace*{1.5cm} +% ---------- Währungszeichen ---------- +\newcommand{\currency}{\euro} +\ifthenelse{\equal{$(currency)$}{YEN}}{\let\currency\textyen}{} +\ifthenelse{\equal{$(currency)$}{GBP}}{\let\currency\pounds}{} +\ifthenelse{\equal{$(currency)$}{USD}}{\let\currency\$}{} -\begin{minipage}{8cm} - <%name%> +% ---------- Ende Reportvariablen-Umsetzung ---------- - <%street%> +% ---------- Briefkopf dazuladen ---------- +\input{kivitendobriefkopf} - <%zipcode%> <%city%> +\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 erste Seite ---------- +\thispagestyle{briefkopf} - <%country%> -\end{minipage} +% ---------- Datum und Nummern ---------- +% Position unterhalb des Briefkopfs +\vspace*{\vlogospacing} +\renewcommand{\arraystretch}{0.9} +\begin{minipage}[b]{177mm} +\sperren{\textbf{Rechnung Nr. \invnumber}} +{\tiny Bitte stets angeben} \hfill -\begin{minipage}{6cm} - \rightline{\LARGE\textbf{\textit{Rechnung}}} \vspace*{0.2cm} - \rightline{\large\textbf{\textit{Nr. <%invnumber%>% \vspace*{0.2cm} - }}} - - Rechnungsdatum:\hfill <%invdate%> - - Auftrag-Nr:\hfill <%ordnumber%> - - Telefon:\hfill <%phone%> - - Telefax:\hfill <%fax%> - - Ansprechpartner:\hfill <%employee%> + \small + \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}} + \textbf{Seite} & {\thepage} von \pageref{LastPage}\\ + \textbf{Datum} & \invdate \\ + \textbf{Kunden Nr.} & \kundennummer\\ + \nonemptyline{\textbf{Auftrag Nr.} &}{\ordnumber} + \nonemptyline{\textbf{Rechnung Nr.} &}{\invnumber} + \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 +Hiermit erlauben wir uns, Ihnen die nachfolgenden Positionen $(if orddate)$gemäß +Ihrem Auftrag vom \orddate{ }$(end)$in Rechnung zu stellen.\\ -\vspace*{0.5cm} +Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel) +oder per E-Mail (\employeeemail) gerne zur Verfügung.\\[1\baselineskip] +\ifthenelse{\isempty{$(notes)$}}{}{ + $(notes)$\\[1\baselineskip] + }% +%Mit freundlichen Grüßen\\[1\baselineskip] +%\employeename\\[1\baselineskip] +% ---------- 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 +% }} + \ifthenelse{\equal{$(deliverydate_oe)$}{\leer}}{}{ + \newline Lieferdatum:~$(deliverydate_oe)$} + & + $(qty)$ & + $(unit)$ & + \ifthenelse{\isempty{$(sellprice)$}}{&}{ + \numprint{$(sellprice)$} + \ifthenelse{\equal{$(p_discount)$}{0}}{}{ -$(p_discount)$\%} & + \numprint{$(linetotal)$}\Wert{$(linetotal NOFORMAT)$} + }\\ % + $(end number)$ -Ihre Bestellung <%cusordnumber%> vom <%orddate%> -% \hfill - - -\vspace*{0.5cm} - -Sehr geehrte Damen und Herren, - -für unsere erbrachten Lieferungen und Leistungen erlauben wir uns, -folgende Positionen in Rechnung zu stellen. - -\vspace{0.5cm} - -\begin{tabularx}{\textwidth}{lrXrr} - \hline - \textbf{Pos} & \textbf{Menge} & \textbf{Bezeichnung} & - \textbf{E-Preis/\euro} & \textbf{G-Preis/\euro} \\ - \hline - <%foreach number%> - <%runningnumber%> & <%qty%> <%unit%> & \raggedright <%description%> & - <%sellprice%> \euro & <%linetotal%> \euro \\ - <%if discount_sub%> & Zwischensumme: & & <%discount_sub%> \euro & <%end if%>\\ - <%end number%>\hline - \multicolumn{4}{l}{Nettobetrag} & <%subtotal%> \euro \\ - <%foreach tax%> - \multicolumn{4}{l}{<%taxdescription%>} & <%tax%> \euro \\ - <%end tax%> - \multicolumn{4}{l}{\textbf{Endbetrag}} & \textbf{<%invtotal%> \euro} \\ \hline -\end{tabularx} +\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}[b]{@{}r@{ }r@{ }l} + {Nettobetrag:}& \numprint{$(subtotal)$}& \currency\\ +% ---------- Alle Steuern ausweisen ---------- + $(foreach tax)$ +% {$(taxdescription)$ auf }\numprint{$(taxbase)$}~\currency: & \numprint{$(tax)$}& \\ + {$(taxdescription)$}: & \numprint{$(tax)$}& \currency\\ + $(end tax)$ + \midrule + {\textbf{Rechnungsbetrag:}} & \bfseries\numprint{\invtotal} & \textbf{\currency}\\ +% ---------- Wenn bereits etwas gezahlt wurde ---------- +$(if invtotal != total)$ + $(foreach payment)$ + Zahlung vom {$(paymentdate)$}: & {\numprint{-$(payment)$}} & \currency \\ + $(end paymentdate)$ + \midrule + \textbf{Offener Betrag: } & \textbf{\numprint{\total}} & \textbf{\currency}\\ +$(end)$ +\bottomrule +\end{tabular} +} %Ende des Summenkasten -\vspace{1cm} -\ifthenelse{\equal{<%deliverydate%>}{}}{Das Leistungsdatum entspricht, soweit nicht anders angegeben, dem Rechnungsdatum.}{Liefertermin: <%deliverydate%>} \\ -Zahlbar bis <%duedate%> in Summe <%invtotal%> \euro\ ohne Abzüge. +% ---------- 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 ---------- +\vspace*{0.5em} +\parbox{\textwidth}{ +% ---------- Bereich für Lieferadresse ---------- +\textbf{Leistungsempfänger:}\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 max. Abstand nach unten ---------- +$(if payment_terms)$ +\vspace*{0.5em} +\textbf{Zahlungsbedingungen:}\hfill\parbox[t]{0.7\textwidth}{$(payment_terms)$}\\ +$(end)$ +\vspace*{0.5em} +%Bitte überweisen Sie den Rechnungsbetrag in Höhe von +%{\numprint{\total}~\currency} innerhalb von +%%{\numprint{\total}~\currency} +%\ifthenelse{\equal{\duedate}{\leer}}{{14}}{{\terms}}~Tagen +%auf das unten angegebene Konto. +%\ifthenelse{\equal{\duedate}{\leer}}{}\\ \vfil +% {Nach dem {\duedate} behalten wir uns Verzugszinsen vor.} +Soweit nicht anders angegeben, \ifthenelse{\equal{\deliverydate}{\leer}} + {entspricht das Leistungsdatum dem Rechnungsdatum.} + {wurde die Leistung am {\deliverydate} erbracht.}\\ +\vfill +\footnotesize +Bereits gelieferte Waren bleiben bis zur vollständigen Bezahlung der +Rechnung unser Eigentum. +%} \end{document} -