From: Marei Peischl Date: Sun, 12 Jan 2020 21:37:47 +0000 (+0100) Subject: new structure to purchase_order-tex X-Git-Tag: release-3.5.6.1~283 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=149f46a975df81fa2ff7681c4a5b6677da5a12d9;p=kivitendo-erp.git new structure to purchase_order-tex --- diff --git a/purchase_order.tex b/purchase_order.tex index bea144307..c0484c02b 100644 --- a/purchase_order.tex +++ b/purchase_order.tex @@ -18,154 +18,109 @@ \begin{document} -\begin{minipage}[t]{8cm} - \scriptsize - - {\color{gray}\underline{\firma\ $\cdot$ \strasse\ $\cdot$ \ort}} - \normalsize - - \vspace*{0.3cm} - - <%name%> - - <%if department_1%><%department_1%><%end if%> - - <%if department_2%><%department_2%><%end if%> - - <%cp_givenname%> <%cp_name%> - - <%street%> - - ~ - - <%zipcode%> <%city%> - - <%country%> -\end{minipage} -\hfill -\begin{minipage}{6cm} - \rightline{\LARGE\textbf{\textit{\bestellung}}} \vspace*{0.2cm} - \rightline{\large\textbf{\textit{\nr ~<%ordnumber%>% - }}} \vspace*{0.2cm} - - \datum:\hfill <%orddate%> - - <%if cusordnumber%>\unsereBestellnummer:\hfill <%cusordnumber%><%end if%> - - <%if quonumber%>\angebot~\nr:\hfill <%quonumber%><%end if%> - - \ansprechpartner:\hfill <%employee_name%> - - \textTelefon \hfill <%employee_tel%> - - \textEmail \hfill <%employee_email%> -\end{minipage} +\setkomavar{title}{ + \bestellung~ + \nr~<%ordnumber%> +} +\setkomavar*{date}{\datum} +\setkomavar{date}{<%orddate%>} +<%if cusordnumber%> +\setkomavar*{yourref}{\unsereBestellnummer} +\setkomavar{yourref}{<%cusordnumber%>} +<%end if%> +<%if quonumber%>\setkomavar{quote}{<%quonumber%>}<%end if%> +\setkomavar{fromname}{<%employee_name%>} +\setkomavar{fromphone}{<%employee_tel%>} +\setkomavar{fromemail}{<%employee_email%>} +\setkomavar{transaction}{<%transaction_description%>} <%if shiptoname%> - \vspace{0.8cm} - \scriptsize \underline{\abweichendeLieferadresse:}\\ - \normalsize <%shiptoname%> - - <%if shiptocontact%> <%shiptocontact%><%end if%> - - <%shiptodepartment_1%> - - <%shiptodepartment_2%> - - <%shiptostreet%> - - <%shiptozipcode%> <%shiptocity%> +\makeatletter +\begin{lrbox}\shippingAddressBox + \parbox{\useplength{toaddrwidth}}{ + \backaddr@format{\scriptsize\usekomafont{backaddress}% + \strut abweichende Lieferadresse + } + \par\smallskip + \setlength{\parskip}{\z@} + \par + \normalsize + <%shiptoname%>\par + <%if shiptocontact%> <%shiptocontact%><%end if%>\par + <%shiptodepartment_1%>\par + <%shiptodepartment_2%>\par + <%shiptostreet%>\par + <%shiptozipcode%> <%shiptocity%> + } +\end{lrbox} +\makeatother <%end if%> -\vspace*{1.5cm} -\hfill + +\begin{letter}{ + <%name%>\strut\\ + <%if department_1%><%department_1%>\\<%end if%> + <%if department_2%><%department_2%>\\<%end if%> + <%cp_givenname%> <%cp_name%>\strut\\ + <%street%>\strut\\ + <%zipcode%> <%city%>\strut\\ + <%country%> \strut + } % Anrede nach Geschlecht unterscheiden -\ifthenelse{\equal{<%cp_name%>}{}}{\anrede}{ - \ifthenelse{\equal{<%cp_gender%>}{f}} - {\anredefrau}{\anredeherr} <%cp_title%> <%cp_name%>,}\\ - -\bestellformel\\ - -\vspace{0.5cm} - - -% -% - longtable kann innerhalb der Tabelle umbrechen -% - da der Umbruch nicht von Lx-Office kontrolliert wird, kann man keinen -% Übertrag machen -% - Innerhalb des Langtextes <%longdescription%> wird nicht umgebrochen. -% Falls das gewünscht ist, \\ mit \renewcommand umschreiben (siehe dazu: -% http://www.lx-office.org/uploads/media/Lx-Office_Anwendertreffen_LaTeX-Druckvorlagen-31.01.2011_01.pdf) -% -\setlength\LTleft\parindent % Tabelle beginnt am linken Textrand -\setlength\LTright{0pt} % Tabelle endet am rechten Textrand -\begin{longtable}{@{}rrp{7cm}@{\extracolsep{\fill}}rr@{}} -% Tabellenkopf -\hline -\textbf{\position} & \textbf{\menge} & \textbf{\bezeichnung} & \textbf{\einzelpreis} & \textbf{\gesamtpreis} \\ -\hline\\ -\endhead - -% Tabellenkopf erste Seite -\hline -\textbf{\position} & \textbf{\menge} & \textbf{\bezeichnung} & \textbf{\einzelpreis} & \textbf{\gesamtpreis} \\ -\hline\\[-0.5em] -\endfirsthead - -% Tabellenende -\\ -\multicolumn{5}{@{}r@{}}{\weiteraufnaechsterseite} -\endfoot - -% Tabellenende letzte Seite -\hline\\ -\multicolumn{4}{@{}l}{\nettobetrag} & <%subtotal%> \currency\\ -<%foreach tax%> -\multicolumn{4}{@{}l}{<%taxdescription%>} & <%tax%> \currency\\ -<%end tax%> -\multicolumn{4}{@{}l}{\textbf{\schlussbetrag}} & \textbf{<%ordtotal%>} \currency\\ -\hline\hline\\ -\endlastfoot - -% eigentliche Tabelle -<%foreach number%> - <%runningnumber%> & - \raggedleft <%qty%> <%unit%> & - \textbf{<%description%>} & - <%sellprice%> \currency & - \ifthenelse{\equal{<%p_discount%>}{0}}{}{\sffamily\scriptsize{(-<%p_discount%> \%)}} - <%linetotal%> \currency \\* % kein Umbruch nach der ersten Zeile, damit Beschreibung und Langtext nicht getrennt werden - - <%if longdescription%> && \scriptsize <%longdescription%>\\<%end longdescription%> - <%if reqdate%> && \scriptsize \lieferdatum: <%reqdate%>\\<%end reqdate%> - <%if serialnumber%> && \scriptsize \seriennummer: <%serialnumber%>\\<%end serialnumber%> - <%if ean%> && \scriptsize \ean: <%ean%>\\<%end ean%> - <%if projectnumber%> && \scriptsize \projektnummer: <%projectnumber%>\\<%end projectnumber%> - <%if make%> - <%foreach make%> - \ifthenelse{\equal{<%make%>}{<%name%>}}{&& \artikelnummer: <%model%>\\}{} - <%end foreach%> - <%end if%> - \\[-0.8em] -<%end number%> - -\end{longtable} - - -\vspace{0.2cm} +\opening{ + \ifstr{<%cp_name%>}{} + {\anrede} + { + \ifstr{<%cp_gender%>}{f} + {\anredefrau} + {\anredeherr} + <%cp_title%> <%cp_name%>, + } +} +\thispagestyle{kivitendo.letter.first} + +\bestellformel + +\begin{PricingTabular*} + % eigentliche Tabelle + \FakeTable{ + <%foreach number%>% + <%runningnumber%> &% + <%number%> &% + \textbf{<%description%>}% + <%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>% + <%if reqdate%>\ExtraDescription{\lieferdatum: <%reqdate%>}<%end reqdate%>% + <%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>% + <%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>% + <%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>% + &% + <%qty%> <%unit%> &% + <%sellprice%>&% + \ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}% + <%linetotal%>\tabularnewline + <%end number%> + } + \begin{PricingTotal} + % Tabellenende letzte Seite + \nettobetrag & <%subtotal%>\\ + <%foreach tax%> + <%taxdescription%> & <%tax%>\\ + <%end tax%> + \bfseries\schlussbetrag & \bfseries <%ordtotal%>\\ + \end{PricingTotal} +\end{PricingTabular*} <%if notes%> - \vspace{5mm} - <%notes%> - \vspace{5mm} +<%notes%> +\medskip <%end if%> <%if delivery_term%> \lieferung ~<%delivery_term.description_long%>\\ <%end delivery_term%> -\gruesse \\ \\ \\ - <%employee_name%> +\closing{\gruesse} +\end{letter} \end{document}