Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 12 Nov 2012 16:58:42 +0000 (17:58 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 12 Nov 2012 16:58:42 +0000 (17:58 +0100)
31 files changed:
bin/mozilla/admin.pl
templates/print/Standard/bin_list.html [deleted file]
templates/print/Standard/bin_list.tex
templates/print/Standard/credit_note.tex [changed mode: 0644->0755]
templates/print/Standard/invoice.html [deleted file]
templates/print/Standard/invoice.odt
templates/print/Standard/invoice.tex
templates/print/Standard/kivitendo-seite1.pdf [new file with mode: 0644]
templates/print/Standard/kivitendo-seiteff.pdf [new file with mode: 0644]
templates/print/Standard/kivitendobriefkopf.tex [new file with mode: 0644]
templates/print/Standard/mahnung.tex [new file with mode: 0644]
templates/print/Standard/mahnung_invoice.tex [new file with mode: 0644]
templates/print/Standard/mitBriefpapier.sty [new file with mode: 0644]
templates/print/Standard/ohneBriefpapier.sty [new file with mode: 0644]
templates/print/Standard/pick_list.html [deleted file]
templates/print/Standard/pick_list.tex
templates/print/Standard/proforma.tex [new file with mode: 0644]
templates/print/Standard/purchase_delivery_order.tex [new file with mode: 0644]
templates/print/Standard/purchase_order.html [deleted file]
templates/print/Standard/purchase_order.tex
templates/print/Standard/request_quotation.html [deleted file]
templates/print/Standard/request_quotation.tex
templates/print/Standard/sales_delivery_order.tex
templates/print/Standard/sales_order.html [deleted file]
templates/print/Standard/sales_order.tex
templates/print/Standard/sales_quotation.html [deleted file]
templates/print/Standard/sales_quotation.tex
templates/print/Standard/statement.html [deleted file]
templates/print/Standard/zahlungserinnerung.tex
templates/print/Standard/zahlungserinnerung_invoice.tex [deleted file]
templates/print/Standard/zwischensumme.sty [new file with mode: 0644]

index 5936e89..97180b4 100755 (executable)
@@ -388,7 +388,7 @@ sub add_user {
     "countrycode"  => "de",
     "numberformat" => "1.000,00",
     "dateformat"   => "dd.mm.yy",
-    "stylesheet"   => "lx-office-erp.css",
+    "stylesheet"   => "kivitendo.css",
     "menustyle"    => "old",
     dbport         => $::auth->{DB_config}->{port} || 5432,
     dbuser         => $::auth->{DB_config}->{user} || 'lxoffice',
diff --git a/templates/print/Standard/bin_list.html b/templates/print/Standard/bin_list.html
deleted file mode 100644 (file)
index d57632d..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-<body bgcolor=ffffff>
-
-<table width=100%>
-  <tr>
-    <td width=10>&nbsp;</td>
-    
-    <td>
-      <table width=100%>
-       <tr>
-         <td>
-           <h4>
-           <%company%>
-           <br><%address%>
-           </h4>
-         </td>
-         
-         <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
-
-         <th align=right>
-           <h4>
-           Tel: <%tel%>
-           <br>Fax: <%fax%>
-           </h4>
-         </td>
-       </tr>
-       
-       <tr>
-         <th colspan=3>
-           <h4>L A G E R L I S T E</h4>
-         </th>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100% cellspacing=0 cellpadding=0>
-       <tr bgcolor=000000>
-         <th align=left width=50%><font color=ffffff>Absender</th>
-         <th align=left width=50%><font color=ffffff>Lieferanschrift</th>
-       </tr>
-
-       <tr valign=top>
-         <td><%name%>
-         <br><%street%>
-         <br><%zipcode%>
-         <br><%city%>
-         <br><%country%>
-         <br>
-
-         <%if contact%>
-         <br>Kontakt: <%contact%>
-         <%end contact%>
-
-         <%if vendorphone%>
-         <br>Tel: <%vendorphone%>
-         <%end vendorphone%>
-
-         <%if vendorfax%>
-         <br>Fax: <%vendorfax%>
-         <%end vendorfax%>
-
-         <%if email%>
-         <br><%email%>
-         <%end email%>
-         
-         </td>
-         
-         <td><%shiptoname%>
-         <br><%shiptostreet%>
-         <br><%shiptozipcode%>
-         <br><%shiptocity%>
-         <br><%shiptocountry%>
-
-         <br>
-         <%if shiptocontact%>
-         <br>Kontakt: <%shiptocontact%>
-         <%end shiptocontact%>
-         
-         <%if shiptophone%>
-         <br>Tel: <%shiptophone%>
-         <%end shiptophone%>
-
-         <%if shiptofax%>
-         <br>Fax: <%shiptofax%>
-         <%end shiptofax%>
-         </td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr height=5></tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100% border=1>
-       <tr>
-         <th width=17% align=left nowrap>BestellNr. #</th>
-         <th width=17% align=left nowrap>Datum</th>
-         <th width=17% align=left nowrap>Kontakt</th>
-         <%if warehouse%>
-         <th width=17% align=left nowrap>Lager</th>
-         <%end warehouse%>
-         <th width=17% align=left>Versandort</th>
-         <th width=15% align=left>Lieferung durch</th>
-       </tr>
-
-       <tr>
-         <td><%ordnumber%>&nbsp;</td>
-
-         <%if shippingdate%>
-         <td><%shippingdate%></td>
-         <%end shippingdate%>
-
-         <%if not shippingdate%>
-         <td><%orddate%></td>
-         <%end shippingdate%>
-
-         <td><%employee%>&nbsp;</td>
-
-         <%if warehouse%>
-         <td><%warehouse%></td>
-         <%end warehouse%>
-
-         <td><%shippingpoint%>&nbsp;</td>
-         <td><%shipvia%>&nbsp;</td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100%>
-       <tr bgcolor=000000>
-         <th align=left><font color=ffffff>Pos</th>
-         <th align=left><font color=ffffff>ArtNr.</th>
-         <th align=left><font color=ffffff>Beschreibung</th>
-         <th><font color=ffffff>Seriennummer</th>
-         <th>&nbsp;</th>
-         <th><font color=ffffff>Menge</th>
-         <th><font color=ffffff>Erh</th>
-         <th>&nbsp;</th>
-         <th><font color=ffffff>Lagerplatz</th>
-       </tr>
-
-       <%foreach number%>
-       <tr valign=top>
-         <td><%runningnumber%></td>
-         <td><%number%></td>
-         <td><%description%></td>
-         <td><%serialnumber%></td>
-         <td><%deliverydate%></td>
-         <td align=right><%qty%></td>
-         <td align=right><%ship%></td>
-         <td><%unit%></td>
-         <td><%bin%></td>
-       </tr>
-       <%end number%>
-
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td><hr noshade></td>
-  </tr>
-
-</table>
-
index 67a78ed..91e3b9c 100644 (file)
@@ -29,7 +29,7 @@
 \parbox{\textwidth}{
   \parbox[b]{.42\textwidth}{%
     <%company%>
-
+    
     <%address%>
   }\hfill
   \begin{tabular}[b]{rr@{}}
   \rule[1.5ex]{\textwidth}{0.5pt}
 }
 
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+  \textbf{Pos} & \textbf{Nummer} & \textbf{Beschreibung} & \textbf{Seriennummer} & & \textbf{Menge} & \textbf{Erh} & & \textbf{Lagerplatz} \\
+<%end pagebreak%>
+
 
 \vspace*{0.5cm}
 
old mode 100644 (file)
new mode 100755 (executable)
index 69ac965..3dd8b58
-\documentclass[twoside]{scrartcl}
-\usepackage{eurosym}
-\usepackage{tabularx}
-\usepackage{ifthen}
-\usepackage[utf8]{inputenc}
-\begin{document}
-
-\setlength{\parindent}{0cm}
-
-\pagestyle{empty}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+% credit_note.tex
+% Verkauf Gutschrift
+% Ü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=$( )$
+% ----------
 
-\fontfamily{cmss}\fontshape{n}\selectfont
+\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
 
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+% ---------- Report-Variablen zur Verwendung in lxbriefkopf.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}
 
-\vspace*{1.5cm}
+% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
+% \newcommand{\companybank}{$(company_bank)$}
+% \newcommand{\companybankcode}{$(company_bank_code)$}
+% \newcommand{\companyaccountnumber}{$(company_account_number)$}
 
-\begin{minipage}{8cm}
-  <%name%>
+% ---------- 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]
+}
 
-  <%street%>
+% ---------- 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{\invnumbercreditnote}{$(invnumber_for_credit_note)$} %Rechnungsnummer Gutschrift
+\newcommand{\docnumber}{Rechnungsnummer: \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
 
-  <%zipcode%> <%city%>
+% ---------- 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)$}
 
-  <%country%>
-\end{minipage}
-\hfill
-\begin{minipage}{6cm}
-  \rightline{\LARGE\textbf{\textit{Gutschrift}}} \vspace*{0.2cm}
-  \rightline{\large\textbf{\textit{Nr. <%invnumber%>% \vspace*{0.2cm}
-  }}}
-  für Rechnung: \hfill <%invnumber_for_credit_note%>
+% ---------- Währungszeichen ----------
+\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\$}{}
 
-  Gutschriftdatum:\hfill <%invdate%>
+% ---------- Ende Reportvariablen-Umsetzung ----------
 
-  Auftrag-Nr:\hfill <%ordnumber%>
+% ---------- Briefkopf dazuladen ----------
+\input{lxbriefkopf}
 
-  Telefon:\hfill <%phone%>
+\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
 
-  Telefax:\hfill <%fax%>
+% ---------- Firmenlogo nur erste Seite ----------
+\thispagestyle{briefkopf}
 
-  Ansprechpartner:\hfill <%employee%>
+% ---------- Datum und Nummern ----------
+% Position unterhalb des Briefkopfs
+\vspace*{\vlogospacing}
+\renewcommand{\arraystretch}{0.9}
+\begin{minipage}[b]{177mm}
+\sperren{\textbf{Gutschrift Nr. \invnumber}}
+\hfill
+       \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.} &}{\invnumbercreditnote}
+               \nonemptyline{\textbf{Gutschrift 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 erstatten wir Ihnen zur Rechnung Nr. \invnumbercreditnote{ } die nachfolgenden Positionen.\\
+Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel) oder per E-Mail (\employeeemail) gerne zur Verfügung.
+%\\[0.4\baselineskip]
+\ifthenelse{\isempty{$(notes)$}}{}{
+      $(notes)$
+      }%
+\vspace{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\\
+  \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)$
 
-\vspace*{0.5cm}
-
-Ihre Bestellung <%cusordnumber%> vom <%orddate%>
-% \hfill
-
-\vspace*{0.5cm}
-
-Sehr geehrte Damen und Herren,
-
-\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}
-
-\vspace{1cm}
+\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}
+   {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)$
+          abzgl. Zahlung vom {$(paymentdate)$}:& {\numprint{-$(payment)$}} & \currency\\
+       $(end paymentdate)$
+       \midrule
+       \textbf{Verbleibend: } & \textbf{\numprint{\total}} & \textbf{\currency}\\
+$(end)$
+\bottomrule
+ \end{tabular}
+} %Ende des Summenkasten
+\vfill
+% ---------- Nachbemerkung mit max. Abstand nach unten ----------
+{
+%Soweit nicht anders angegeben,
+%\ifthenelse{\equal{\deliverydate}{\leer}}
+%   {entspricht das Leistungsdatum dem Rechnungsdatum.}
+%   {wurde die Leistung am {\deliverydate} erbracht.}\\[0.5em]
+%Bitte überweisen Sie den Rechnungsbetrag in Höhe von
+%{\numprint{\total}~\currency} innerhalb von
+%\ifthenelse{\equal{\duedate}{\leer}}{{14}}{{\terms}}~Tagen
+%auf das unten angegebene Konto.
+%\ifthenelse{\equal{\duedate}{\leer}}{}
+%  {Nach dem {\duedate} behalten wir uns Verzugszinsen vor.}
+Bitte nennen Sie uns eine Bankverbindung auf welche das Guthaben überwiesen werden soll.\\
+\vfil
+\footnotesize
+Bereits gelieferte Waren bleiben bis zur vollständigen Bezahlung der
+Rechnung unser Eigentum.
+}
 
 \end{document}
-
diff --git a/templates/print/Standard/invoice.html b/templates/print/Standard/invoice.html
deleted file mode 100644 (file)
index 2858f4f..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-<tr valign=bottom>
-  <td width=10>&nbsp;</td>
-  <td>
-  
-  <table width=100%>
-  <tr>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      </h4>
-    </td>
-
-    <td align=right>
-      <h4>
-      Telefon <%tel%>
-      <br>Telefax <%fax%>
-      </h4>
-    </td>
-  </tr>
-
-  <tr>
-    <th colspan=3>
-      <h4>R E C H N U N G</h4>
-    </th>
-  </tr>
-
-  </table>
-
-
-  <table width=100% callspacing=0 cellpadding=0>
-    
-  <tr>
-    <td align=right>
-    <table>
-    <tr>
-      <th align=right>Ausgestellt am</th><td width=10>&nbsp;</td><td><%invdate%></td>
-    </tr>
-  
-    <tr>
-      <th align=right>Bezahlbar bis</th><td width=10>&nbsp;</td><td><%duedate%></td>
-    </tr>
-
-    <tr>
-      <th align=right>Nummer</th><td>&nbsp;</td><td><%invnumber%></td></tr>
-    </tr>
-  
-    <tr>
-      <th align=right>Lieferdatum</th><td>&nbsp;</td><td><%deliverydate%></td></tr>
-    </tr>
-<!--
-    <tr>
-      <th align=right>Clerk:</th><td>&nbsp;</td><td><%username%></td>
-    </tr>
--->
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-    </td>
-    </table>
-  </tr>
-
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-      <th align=left><font color=ffffff>An:</th>
-      <th align=left><font color=ffffff>Lieferaddresse:</th>
-    </tr>
-
-<!--
-     other variables which can be use:
-     contact, shiptocontact, shiptophone, shiptofax
--->
-
-    <tr>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-      </td>
-      
-      <td><%shiptoname%>
-      <br><%shiptostreet%>
-      <br><%shiptozipcode%>
-      <br><%shiptocity%>
-      <br><%shiptocountry%>
-      </td>
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-  </tr>
-  
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-<!--      <th align=right><font color=ffffff>No.</th>  -->
-      <th align=left><font color=ffffff>Nummer</th>
-      <th align=left><font color=ffffff>Beschreibung</th>
-      <th><font color=ffffff>Anz.</th>
-      <th>&nbsp;</th>
-      <th><font color=ffffff>Preis</th>
-      <th><font color=ffffff>Rab</th>
-      <th><font color=ffffff>Total</th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-<!--      <td align=right><%runningnumber%>.</td>
-adjust the colspan if you include this to shift subtotal one to the right
--->
-      <td><%number%></td>
-      <td><%description%></td>
-      <td align=right><%qty%></td>
-      <td><%unit%></td>
-      <td align=right><%sellprice%></td>
-      <td align=right><%discount%></td>
-      <td align=right><%linetotal%></td>
-    </tr>
-<%end number%>
-
-<!--
-you can also use netprice instead of sellprice if you
-don't want to show the discount
-netprice = sellprice - discount
--->
-
-    <tr>
-      <td colspan=7><hr noshade></td>
-    </tr>
-    
-<%if taxincluded%>
-    <tr>
-      <th colspan=5 align=right>Total</th>
-      <td colspan=2 align=right><%invtotal%></td>
-    </tr>
-<%end taxincluded%>
-<%if not taxincluded%>
-    <tr>
-      <th colspan=5 align=right>Zwischensumme</th>
-      <td colspan=2 align=right><%subtotal%></td>
-    </tr>
-<%end taxincluded%>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=5 align=right><%taxdescription%> auf <%taxbase%></th>
-      <td colspan=2 align=right><%tax%></td>
-    </tr>
-<%end tax%>
-
-<%if paid%>
-    <tr>
-      <th colspan=5 align=right>Bezahlt</th>
-      <td colspan=2 align=right>- <%paid%></td>
-    </tr>
-<%end paid%>
-
-    <tr>
-      <td colspan=3>&nbsp;</td>
-      <td colspan=4><hr noshade></td>
-    </tr>
-
-    <tr>
-      <td colspan=3>Bezahlbar innerhalb von <b><%terms%></b> Tagen</td>
-<%if total%>
-      <th colspan=2 align=right>Total</th>
-      <th colspan=2 align=right><%total%></th>
-<%end total%>
-    </tr>
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<tr>
-  <td>
-  <table width=100%>
-    <tr valign=top>
-<%if notes%>
-      <td>Bemerkungen:</td>
-      <td><%notes%></td>
-<%end notes%>
-      <td align=right>
-      Alle Preise in <b><%currency%></b>
-      <br><%shippingpoint%>
-      </td>
-    </tr>
-
-  </table>
-  </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-  
-<tr>
-  <td>
-  <table width=100%>
-  <tr valign=top>
-    <td><font size=-3>
-    Rechnung ist bezahlbar innerhalb von <%terms%> Tagen.
-    Nach dem <%duedate%> werden Zinsen zu einem
-    monatlichen Satz von 1.5% verrechnet.
-    Waren bleiben im Besitz von <%company%> bis die Rechnung voll bezahlt ist.
-    Rückgaben werden mit 10% Lagergebühren belastet. Beschädigte Waren
-    und Waren ohne eine Rückgabenummer werden nicht entgegengenommen.
-    </font>
-    </td>
-    <td width=150>
-    X <hr noshade>
-    </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-<%foreach tax%>
-  <tr>
-    <th colspan=7 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
-  </tr>
-<%end tax%>
-
-<%if taxincluded%>
-  <tr>
-    <th colspan=7 align=left><font size=-2>Steuern sind im Preis inbegriffen.</th>
-  </tr>
-<%end taxincluded%>
-
-<!-- business number
-  <tr>
-    <th colspan=7 align=left><font size=-2>Business Number: <%businessnumber%></font></th>
-  </tr>
--->
-
-  <tr>
-    <th colspan=7 align=left>
-    <hr>
-    <br>Bankverbindung
-    <br>Bank
-    <br>Bankleitzahl
-    <br>Konto No.
-    </td>
-  </tr>
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
-
index 822ba90..6eac45b 100644 (file)
Binary files a/templates/print/Standard/invoice.odt and b/templates/print/Standard/invoice.odt differ
index 27487a3..78710fd 100644 (file)
+% 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}{tabelle$(employee_login)$.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}{$(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\$}{}
 
-\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}
-
diff --git a/templates/print/Standard/kivitendo-seite1.pdf b/templates/print/Standard/kivitendo-seite1.pdf
new file mode 100644 (file)
index 0000000..8343843
Binary files /dev/null and b/templates/print/Standard/kivitendo-seite1.pdf differ
diff --git a/templates/print/Standard/kivitendo-seiteff.pdf b/templates/print/Standard/kivitendo-seiteff.pdf
new file mode 100644 (file)
index 0000000..467d785
Binary files /dev/null and b/templates/print/Standard/kivitendo-seiteff.pdf differ
diff --git a/templates/print/Standard/kivitendobriefkopf.tex b/templates/print/Standard/kivitendobriefkopf.tex
new file mode 100644 (file)
index 0000000..dac3d95
--- /dev/null
@@ -0,0 +1,200 @@
+% kivitendobriefkopf.tex
+% Erstellt von Norbert Simon, n.simon@linet-services.de
+% Version 2.1 vom 21.Oktober 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=$( )$
+% ----------
+\usepackage {color}
+% ---------- Farbe für die Falzmarkierung ----------
+\definecolor{linecolor}{gray}{.75}     
+\definecolor{rulerlineFirst}{RGB}{95,115,5} % Linienfarben Seite 1
+\definecolor{rulerlinePages}{rgb}{0,0,0} % Linienfarben Folgeseiten
+% ---------- Helvetica-Font für Fancyhdr -------------------------
+\newcommand{\helv}{%
+\fontfamily{phv}\fontsize{8}{11}\selectfont}
+% ---------- Helvetica Font einstellen ----------------------------
+\renewcommand{\familydefault}{\sfdefault}
+\fontfamily{phv}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
+% Modern
+% \fontfamily{cmss}\fontsize{10}{12pt plus 0.12pt minus 0.1pt}\selectfont
+% ---------- Basiseinheiten für die Positionierung -----------------
+\newcommand{\vlogospacing}{63mm} % Erste Zeile unterhalb des Anschrift-Blocks
+\newcommand{\hlogospacing}{35mm} % Logo-Breite für Ausrichtung
+% ---------- Bankverbindung des Unternehmens ---------- 
+\newcommand{\companybank}{Bankname}
+\newcommand{\companybankcode}{xxx xxx xx}
+\newcommand{\companyaccountnumber}{xx xxx xxx xx}
+% ---------- Elemente nur dann ausgeben, wenn ein Wert gesetzt ist ---------- 
+\newcommand{\leer}{}
+\newcommand{\nonemptyline}[2]{\ifthenelse{\equal{#2}{\leer}}{}{#1#2\\}}
+\newcommand{\hasvalue}[2]{\ifthenelse{\equal{#1}{\leer}}{}{#2}}
+% ---------- Seitendefinition A4 ---------- 
+\setlength{\voffset}{-2.0cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0cm}
+\setlength{\oddsidemargin}{1.5cm}
+\setlength{\evensidemargin}{1.5cm}
+\setlength{\textwidth}{174mm}
+\setlength{\textheight}{24cm}
+\setlength{\footskip}{1.8cm}
+\setlength{\parindent}{0cm}
+\renewcommand{\baselinestretch}{1}
+% ---------- Abstand Tabellenzeilen erhöhen ---------- 
+\renewcommand{\arraystretch}{1.3}
+%\fontfamily{cmss}\fontshape{n}\selectfont
+%\fontfamily{phv}\fontshape{n}\selectfont
+% ---------- Seitenköpfe und -Füße ----------
+
+\newsavebox{\fusszeile}
+\sbox{\fusszeile}{
+       \tiny
+       \begin{minipage}[t]{\textwidth}
+       \renewcommand{\arraystretch}{0.9}
+       \hspace*{5mm}
+       \begin{tabular}[t]{l}           
+               Firmenname 1 \\
+               Firmenname 2\\
+               Straße Nr\\
+               Plz Ort\\
+       \end{tabular}
+       \hfill
+       \begin{tabular}[t]{l}           
+               \textbf{Sitz der Gesellschaft}\\
+               Plz Ort\\
+                \textbf{Geschäftsführer}\\
+                Vorname Name\\
+       \end{tabular}
+       \hfill
+       \begin{tabular}[t]{l}           
+               \textbf{Handesregistereintrag}\\
+               Amtsgericht Woshaltis\\
+               HRB xxx\\
+       \end{tabular}
+       \hfill
+       \begin{tabular}[t]{l}           
+               USt-ID-Nr. DE xxxxxxxxx\\
+               Steuer Nr. xx xxx xxxxx\\
+       \end{tabular}
+       \hfill
+        \begin{tabular}[t]{l}          
+                       \textbf{Bankverbindung}\\
+                       \companybank\\
+                       BLZ \companybankcode\\
+                       Konto \companyaccountnumber\\
+        \end{tabular}
+        \renewcommand{\arraystretch}{1}
+       \end{minipage}
+}%Ende sbox
+% ---------- Seitenstil-Definitionen ----------
+% pagestyle "plain" umdefinieren:
+\fancypagestyle{plain}{%
+       
+       \fancyhf{}                                                                              % Erstmal alles löschen
+%      \fancyfoot[OL,EL]{\usebox{\fusszeile}}
+       \fancyhead[L]{\usebox{\plainpages}}
+%      \fancyhead[C]{\helv\footnotesize \docnumber}
+%      \fancyhead[R]{\helv\footnotesize Seite \thepage/\pageref{LastPage}\hspace*{12mm}}
+       \fancyfoot[L]{\helv\footnotesize Seite \thepage/\pageref{LastPage}\hspace*{12mm}}
+       \fancyfoot[C]{\helv\footnotesize \docnumber}
+       \renewcommand{\headrulewidth}{0pt}
+       \renewcommand{\footrulewidth}{0pt}
+       \fancyfootoffset{10mm}
+       \fancyheadoffset{10mm}
+       }
+
+%  pagestyle "briefkopf" definieren:
+\fancypagestyle{briefkopf}{%
+       \fancyhf{}                                                                              % Erstmal alles löschen
+       \fancyhead[L]{\usebox{\kopf}}
+%      \fancyfoot[OL,EL]{\usebox{\fusszeile}}
+       \renewcommand{\headrulewidth}{0pt}
+       \renewcommand{\footrulewidth}{0pt}
+    \fancyfootoffset{10mm}
+       \fancyheadoffset{10mm}
+       }
+       
+\pagestyle{plain}                                                                      % Alle Seiten bekommen plain als Default-Stil
+
+% ---------- Briefkopf ----------
+\newsavebox{\kopf}
+\sbox{\kopf}{
+       \setlength{\unitlength}{1mm}                                            % In der picture-Umgebung sollen alle Zahlen die Einheit 1mm haben.
+
+\begin{picture}(0,0) 
+% ---------- Logo ----------
+% Das Logo muss sich im lx-erp-Pfad im Ordner users/ befinden und kann das 
+% Format PDF, JPG, PNG oder EPS haben.  Mit einer EPS-Grafik kann lx nur einen
+% Ausdruck  nach Postscript machen. Die anderen Grafik-Formate erlauben nur
+% einen PDF-Ausdruck. 
+% Position (put) ist abhängig von der Größe
+%
+
+    \put(-12.5,-288){\includegraphics*{kivitendo-seite1.pdf}}
+  
+
+% ---------- mit Latex gesetzter Briefkopf, rechtsbündig ----------
+%      \put(146,-45){          
+%              \begin{minipage}[t]{35mm}
+%                      \tiny \raggedright
+%                      \small \raggedright
+%                      \footnotesize \raggedright
+%                      Firmenname 1\\
+%                      Firemnname 2\\
+%                      Straße Nr\\
+%                      PLZ Ort\\
+%                      \vspace{2mm}
+%                      Telefon +49 xxx xxx xxx\\
+%                      Telefax +49 xxx xxx xxx\\
+%                      \vspace{2mm}
+%                      E-Mail info@firma.de\\
+%                      Web www.firma.de
+%              \end{minipage}
+%      }%Ende put
+
+% ---------- Adressat ----------
+%      \put(10,-45){\parbox{8cm}{
+%              \begin{raggedright}
+%                      \tiny{\hspace*{2mm}Firma~\textbullet~Straße Nr~\textbullet~Plz Ort}
+%                      \small{\hspace*{2mm}Firma~\textbullet~Straße Nr~\textbullet~Plz Ort}
+%              \end{raggedright}               
+%              }%parbox
+%      }%put
+               
+%      \put(10,-47){\color{rulerlineFirst}\rule{80mm}{0.3pt}}
+       \put(10,-52){
+               \parbox[t]{8cm}{   
+                       \normalsize 
+                       \name \\
+                       \nonemptyline{\cpgreeting{ }\cptitle{ }\cpgivenname{ }}{\cpname}
+                       \nonemptyline{}{\departmentone}
+                       \nonemptyline{}{\departmenttwo}
+                       \street \\
+                       \country{ }\zipcode{ }\city\par
+                       \vspace{3mm}
+                       \nonemptyline{\small Fax:}{\fax}
+                       \nonemptyline{\small Tel:}{\phone} 
+               }%Ende parbox
+       }%Ende put
+       % Falzlinien - Werte ergeben sich aus topoffset etc. - im PDF ausgemessen und für gut befunden 
+%      \put(-5,-95){\color{rulerlineFirst}\rule{2mm}{0.15pt}} 
+%      \put(-8,-138){\color{rulerlineFirst}\rule{3mm}{0.2pt}}
+%      \put(-5,-200){\color{rulerlineFirst}\rule{2mm}{0.15pt}}
+%      \put(7,-265){\color{rulerlineFirst}\rule{\textwidth}{0.2pt}}%Trennline Fußzeile
+\end{picture}  
+}%Ende sbox
+    
+%%%%%%%%%%%%%  Ende des Briefkopfes  %%%%%%%%%%%
+% ---------- Gestaltungselemente Plainseiten ----------
+\newsavebox{\plainpages}
+\sbox{\plainpages}{
+       \setlength{\unitlength}{1mm}                                            % In der picture-Umgebung sollen alle Zahlen die Einheit 1mm haben.
+       \begin{picture}(0,0) 
+        \put(-12.5,-288){\includegraphics*{kivitendo-seiteff.pdf}}
+       \end{picture}   
+}%Ende Sbox
diff --git a/templates/print/Standard/mahnung.tex b/templates/print/Standard/mahnung.tex
new file mode 100644 (file)
index 0000000..d534769
--- /dev/null
@@ -0,0 +1,174 @@
+% overdue-notice-a.tex
+% Verkauf Mahnung
+% Ü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{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 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}{tabelle$(employee_login)$.tex}
+
+% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
+% \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]
+}
+
+
+% ---------- 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}{Rechnungsnummer: \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
+\newcommand{\dunningid}{$(dunning_id)$}        % ID Zahlungserinnerung
+\newcommand{\dunningdate}{$(dunning_date)$}    % Datum der Zahlungserinnerung
+
+
+% ---------- 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ährungszeichen ----------
+\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 erste Seite ----------
+\thispagestyle{briefkopf}
+
+% ---------- Datum und Nummern ----------
+% Position unterhalb des Briefkopfs
+\vspace*{\vlogospacing}
+\renewcommand{\arraystretch}{0.9}
+\begin{minipage}[b]{177mm}
+\sperren{\textbf{Mahnung}}
+\hfill
+       \small
+       \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}}
+               \textbf{Seite} & {\thepage} von \pageref{LastPage}\\
+               \textbf{Datum} & \dunningdate \\
+               \textbf{Kunden Nr.} & \kundennummer\\
+               \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
+Leider haben Sie unsere vorangegangene Zahlungserinnerung ignoriert. Das ist
+bedauerlich, denn dadurch sind uns Kosten entstanden, die wir nun an Sie
+weitergeben müssen. Damit keine weiteren Kosten für Sie entstehen, begleichen
+Sie bitte die nachfolgend ausgewiesenen offenen Posten schnellstmöglich,
+spätestens bis zum $(duedate)$.\\ %[1em plus 3em minus 1em]
+\vspace*{1em} \\
+Mit freundlichen Grüßen\\[1em]
+$(employee_name)$\\[2em]
+\textbf{Offenen Forderungen}\\[0.5em]
+
+\setlength{\tabcolsep}{0mm}
+\begin{tabular*}{\textwidth}{c@{\extracolsep\fill}c@{\extracolsep\fill}c@{\extracolsep\fill}r@{\extracolsep\fill}r@{\extracolsep\fill}r@{\extracolsep\fill}r}
+  \textbf{Rechnungs-Nr.} & \textbf{Datum} & \textbf{fällig am} &
+  \textbf{Betrag} & \textbf{Gebühr} & \textbf{Zinsen} & \textbf{zu zahlen} \\[1pt]
+\hline\\
+$(foreach dn_invnumber)$
+  $(dn_invnumber)$ & $(dn_transdate)$ & $(dn_duedate)$ &
+  $(dn_amount)$ \euro & $(dn_fee)$  \euro & $(dn_interest)$  \euro & $(dn_linetotal)$   \euro \\[1pt]
+$(end dn_invnumber)$
+\cline{1-7}\\
+ Insgesamt: & & & $(total_open_amount)$ \euro & $(fee)$ \euro & $(total_interest)$ \euro & \textbf{$(total_amount)$  \euro} 
+\end{tabular*}
+\rule{\textwidth}{0.5pt}
+
+\vspace{0.5cm}
+
+\hfill \textbf{Bitte zahlen Sie umgehend $(total_amount)$  \euro}
+\end{document}
diff --git a/templates/print/Standard/mahnung_invoice.tex b/templates/print/Standard/mahnung_invoice.tex
new file mode 100644 (file)
index 0000000..a60b698
--- /dev/null
@@ -0,0 +1,169 @@
+% overdue-notice-a.tex
+% Verkauf Mahnung
+% Ü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{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 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}{tabelle$(employee_login)$.tex}
+
+% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
+% \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]
+}
+
+
+% ---------- 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}{Rechnungsnummer: \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
+\newcommand{\dunningid}{$(dunning_id)$}        % ID Zahlungserinnerung
+\newcommand{\dunningdate}{$(dunning_date)$}    % Datum der Zahlungserinnerung
+
+
+% ---------- 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ährungszeichen ----------
+\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 erste Seite ----------
+\thispagestyle{briefkopf}
+
+% ---------- Datum und Nummern ----------
+% Position unterhalb des Briefkopfs
+\vspace*{\vlogospacing}
+\renewcommand{\arraystretch}{0.9}
+\begin{minipage}[b]{177mm}
+\sperren{\textbf{Mahnrechnung Nr. \invnumber}}
+\hfill
+       \small
+       \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}}
+               \textbf{Seite} & {\thepage} von \pageref{LastPage}\\
+               \textbf{Datum} & \invdate \\
+               \textbf{Kunden Nr.} & \kundennummer\\
+               \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 zu Mahnung $(dunning_id)$
+die nachfolgenden Positionen in Rechnung zu stellen.\\
+
+Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel)
+oder per E-Mail (\employeeemail) gerne zur Verfügung.\\[1\baselineskip]
+
+\vspace*{0.5cm}
+
+Bitte begleichen Sie diese Forderung bis zum $(duedate)$.
+
+\vspace*{0.5cm}
+
+\begin{tabularx}{\textwidth}{Xr}
+  \textbf{Posten} & \multicolumn{1}{l}{\textbf{Betrag}}\\
+  \hline
+  Mahngebühren & $(fee)$ EUR \\
+  Zinsen & $(interest)$ EUR \\
+  \cline{2-2}
+  Gesamtsumme & $(invamount)$ EUR\\
+\end{tabularx}
+
+\end{document}
diff --git a/templates/print/Standard/mitBriefpapier.sty b/templates/print/Standard/mitBriefpapier.sty
new file mode 100644 (file)
index 0000000..d697ba5
--- /dev/null
@@ -0,0 +1,68 @@
+\ProvidesFile{versionEins.sty}
+\usepackage[utf8]{inputenc}
+\usepackage{german}
+\usepackage{graphicx}
+% \usepackage{colortbl}
+% \usepackage{lastpage}
+% \usepackage{tabularx}
+
+% \pageref
+
+\setlength{\voffset}{-0.3cm}
+\setlength{\hoffset}{-2.5cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{2cm}
+\setlength{\textwidth}{16.4cm}
+\setlength{\textheight}{20.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+
+\setlength{\tabcolsep}{0.2cm}
+\setlength{\unitlength}{1cm}
+
+\newcommand{\myhead}{%
+  \fontfamily{cmss}\fontsize{10pt}{10pt}\fontseries{m}\selectfont
+  \begin{picture}(0,0)
+    \put(-2.025,-26.95){\includegraphics*{kivitendo-seite1.pdf}}
+  \end{picture}
+}
+
+\newcommand{\myfoot}{%
+}
+
+\newcommand{\plainfoot}{%
+  \fontfamily{cmss}\fontsize{10pt}{10pt}\fontseries{m}\selectfont
+  \begin{minipage}[t][1cm][t]{\textwidth}
+    \begin{minipage}[t][1cm][t]{5cm}
+      \refnr
+    \end{minipage} \hspace*{10.25cm}
+    \begin{minipage}[t][1cm][t]{2cm}
+      Seite \thepage \\
+    \end{minipage}
+  \end{minipage}
+}
+
+\newcommand{\plainhead}{%
+  \fontfamily{cmss}\fontsize{10pt}{10pt}\fontseries{m}\selectfont
+  \begin{picture}(0,0)
+    \put(-2.025,-26.95){\includegraphics*{kivitendo-seiteff.pdf}}
+  \end{picture}
+}
+
+
+\renewcommand{\ps@headings}{%
+  \renewcommand{\@oddhead}{\myhead}
+  \renewcommand{\@evenhead}{\@oddhead}%
+  \renewcommand{\@oddfoot}{\myfoot}
+  \renewcommand{\@evenfoot}{\@oddfoot}%
+}
+
+\renewcommand{\ps@plain}{%
+  \renewcommand{\@oddhead}{\plainhead}
+  \renewcommand{\@evenhead}{\@oddhead}%
+  \renewcommand{\@oddfoot}{\plainfoot}
+  \renewcommand{\@evenfoot}{\@oddfoot}%
+}
diff --git a/templates/print/Standard/ohneBriefpapier.sty b/templates/print/Standard/ohneBriefpapier.sty
new file mode 100644 (file)
index 0000000..18639f3
--- /dev/null
@@ -0,0 +1,66 @@
+\ProvidesFile{ohneBriefpapier.sty}
+\usepackage[utf8]{inputenc}
+\usepackage{german}
+\usepackage{graphicx}
+% \usepackage{colortbl}
+% \usepackage{lastpage}
+% \usepackage{tabularx}
+
+% \pageref
+
+\setlength{\voffset}{-0.3cm}
+\setlength{\hoffset}{-2.5cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{2cm}
+\setlength{\textwidth}{16.4cm}
+\setlength{\textheight}{20.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+
+\setlength{\tabcolsep}{0.2cm}
+\setlength{\unitlength}{1cm}
+
+\newcommand{\myhead}{%
+  \fontfamily{cmss}\fontsize{10pt}{10pt}\fontseries{m}\selectfont
+  \begin{picture}(0,0)
+    \put(13.3,-23.8){\includegraphics*[width=3.6cm,keepaspectratio=true]{PNG/hinweis-rechts-unten.png}}
+  \end{picture}
+}
+
+\newcommand{\myfoot}{%
+}
+
+\newcommand{\plainfoot}{%
+  \fontfamily{cmss}\fontsize{10pt}{10pt}\fontseries{m}\selectfont
+  \begin{minipage}[t][1cm][t]{\textwidth}
+    \begin{minipage}[t][1cm][t]{5cm}
+      \refnr
+    \end{minipage} \hspace*{10.25cm}
+    \begin{minipage}[t][1cm][t]{2cm}
+      Seite \thepage \\
+    \end{minipage}
+  \end{minipage}
+}
+
+\newcommand{\plainhead}{%
+  \fontfamily{cmss}\fontsize{10pt}{10pt}\fontseries{m}\selectfont
+
+}
+
+
+\renewcommand{\ps@headings}{%
+  \renewcommand{\@oddhead}{\myhead}
+  \renewcommand{\@evenhead}{\@oddhead}%
+  \renewcommand{\@oddfoot}{\myfoot}
+  \renewcommand{\@evenfoot}{\@oddfoot}%
+}
+
+\renewcommand{\ps@plain}{%
+  \renewcommand{\@oddhead}{\plainhead}
+  \renewcommand{\@evenhead}{\@oddhead}%
+  \renewcommand{\@oddfoot}{\plainfoot}
+  \renewcommand{\@evenfoot}{\@oddfoot}%
+}
diff --git a/templates/print/Standard/pick_list.html b/templates/print/Standard/pick_list.html
deleted file mode 100644 (file)
index 0de88eb..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-  <tr>
-    <td width=10>&nbsp;</td>
-    
-    <td>
-      <table width=100%>
-       <tr>
-         <td>
-         <h4>
-         <%company%>
-         <br><%address%>
-         </h4>
-         </td>
-
-         <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
-
-         <td align=right>
-         <h4>
-         Tel: <%tel%>
-         <br>Fax: <%fax%>
-         </h4>
-         </td>
-       </tr>
-
-       <tr>
-         <th colspan=3>
-           <h4>S A M M E L L I S T E</h4>
-         </th>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100% callspacing=0 cellpadding=0>
-        <tr bgcolor=000000>
-         <th width=50% align=left><font color=ffffff>Lieferanschrift:</th>
-         <th width=50%>&nbsp;</th>
-       </tr>
-
-       <tr valign=top>
-         <td><%shiptoname%>
-         <br><%shiptostreet%>
-         <br><%shiptozipcode%>
-         <br><%shiptocity%>
-         <br><%shiptocountry%>
-         </td>
-
-         <td>
-         <%if shiptocontact%>
-         <br>Kontakt: <%shiptocontact%>
-         <%end shiptocontact%>
-
-         <%if shiptophone%>
-         <br>Tel: <%shiptophone%>
-         <%end shiptophone%>
-
-         <%if shiptofax%>
-         <br>Fax: <%shiptofax%>
-         <%end shiptofax%>
-
-         <%shiptoemail%>
-         </td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr height=5></tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100% border=1>
-        <tr>
-         <th width=17% align=left>BestellNr. #</th>
-         <th width=17% align=left>Datum</th>
-         <th width=17% align=left nowrap>Kontakt</th>
-         <%if warehouse%>
-         <th width=17% align=left>Lager</th>
-         <%end warehouse%>
-         <th width=17% align=left>Versandort</th>
-         <th width=15% align=left>Transportmittel</th>
-       </tr>
-
-        <tr>
-         <td><%ordnumber%>&nbsp;</td>
-
-         <%if shippingdate%>
-         <td><%shippingdate%></td>
-         <%end shippingdate%>
-
-         <%if not shippingdate%>
-         <td><%orddate%></td>
-         <%end shippingdate%>
-
-         <td><%employee%>&nbsp;</td>
-
-         <%if warehouse%>
-         <td><%warehouse%>&nbsp;</td>
-         <%end warehouse%>
-
-         <td><%shippingpoint%>&nbsp;</td>
-         <td><%shipvia%>&nbsp;</td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td>
-      <table width=100%>
-       <tr bgcolor=000000>
-         <th align=left><font color=ffffff>Pos</th>
-         <th align=left><font color=ffffff>Nummer</th>
-         <th align=left><font color=ffffff>Beschreibung</th>
-         <th><font color=ffffff>Menge</th>
-         <th><font color=ffffff>geliefert</th>
-         <th>&nbsp;</th>
-         <th><font color=ffffff>Lagerplatz</th>
-       </tr>
-
-        <%foreach number%>
-       <tr valign=top>
-         <td><%runningnumber%>
-         <td><%number%></td>
-         <td><%description%></td>
-         <td align=right><%qty%></td>
-         <td align=right>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]</td>
-         <td><%unit%></td>
-         <td align=right><%bin%></td>
-       </tr>
-       <%end number%>
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-
-    <td><hr noshade></td>
-  </tr>
-
-</table>
-
index 6da629b..f505182 100644 (file)
@@ -1,3 +1,14 @@
+% pick_list.tex
+% Sammelliste Verkauf
+% Überarbeitet von Norbert Simon, n.simon@linet-services.de
+% Version 2.5 vom 16.Oktober 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[frame]{xy}
 \usepackage{tabularx}
 
 \parbox{\textwidth}{
   \parbox[b]{.42\textwidth}{
-    <%company%>
+    $(company)$
 
-    <%address%>
+    $(address)$
   }\hfill
   \begin{tabular}[b]{rr@{}}
-  Tel & <%tel%>\\
-  Fax & <%fax%>
+  Tel & $(tel)$\\
+  Fax & $(fax)$
   \end{tabular}
 
   \rule[1.5ex]{\textwidth}{0.5pt}
 }
 
 
+%$(pagebreak 90 27 37)$
+%\end{tabular*}
+
+%\newpage
+
+\markboth{$(company)$\hfill $(ordnumber)$}{$(company)$\hfill $(ordnumber)$}
+
+\vspace*{-12pt}
+
+%\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rcll@{}}
+%  \textbf{Pos} & \textbf{Nummer} & \textbf{Beschreibung} &
+%  \textbf{Menge} & \textbf{Lagerausgang} & & \textbf{Lagerplatz} \\
+%$(end pagebreak)$
+
+
 \vspace*{0.5cm}
 
 \parbox[t]{1cm}{\hfill}
 \parbox[t]{1cm}{\hfill}
 \parbox[t]{.5\textwidth}{
 
-<%shiptoname%> \\
-<%shiptostreet%> \\
-<%shiptozipcode%> \\
-<%shiptocity%> \\
-<%shiptocountry%>
+$(shiptoname)$ \\
+$(shiptostreet)$ \\
+$(shiptozipcode)$ \\
+$(shiptocity)$ \\
+$(shiptocountry)$
 }
 \parbox[t]{.4\textwidth}{
-  <%shiptocontact%>
+  $(shiptocontact)$
 
-  <%if shiptophone%>
-  Tel: <%shiptophone%>
-  <%end shiptophone%>
+  $(if shiptophone)$
+  Tel: $(shiptophone)$
+  $(end shiptophone)$
 
-  <%if shiptofax%>
-  Fax: <%shiptofax%>
-  <%end shiptofax%>
+  $(if shiptofax)$
+  Fax: $(shiptofax)$
+  $(end shiptofax)$
 
-  <%shiptoemail%>
+  $(shiptoemail)$
 }
 \hfill
 
 \hfill
 
 \vspace{1cm}
-
+\typeout{hier?}
 \begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
-  \textbf{BestellNr. \#} & \textbf{Datum} & \textbf{Kontakt}
-  <%if warehouse%>
-  & \textbf{Lager}
-  <%end warehouse%>
-  & \textbf{Lagerplatz} & \textbf{Lieferung mit} \\ [0.5em]
+  \textbf{BestellNr. \#} &
+  \textbf{Datum} &
+  \textbf{Kontakt} &
+  $(if warehouse)$ \textbf{Lager} & $(end warehouse)$
+  \textbf{Lagerplatz} &
+  \textbf{Lieferung mit} \\ [0.5em]
   \hline
-  <%ordnumber%>
-  <%if shippingdate%>
-  & <%shippingdate%>
-  <%end shippingdate%>
-  <%if not shippingdate%>
-  & <%orddate%>
-  <%end shippingdate%>
-  & <%employee%>
-  <%if warehouse%>
-  & <%warehouse%>
-  <%end warehouse%>
-  & <%shippingpoint%> & <%shipvia%> \\
+       $(ordnumber)$ &
+       $(if shippingdate)$ $(shippingdate)$ &$(end shippingdate)$
+       $(if not shippingdate)$ $(orddate)$ &$(end shippingdate)$
+       $(employee)$ &
+       $(if warehouse)$ $(warehouse)$ &$(end warehouse)$
+       $(shippingpoint)$ &
+       $(shipvia)$ \\
   \hline
 \end{tabularx}
 
 \vspace{1cm}
 
-\begin{tabular*}{\textwidth}{@{}rlp{\descrwidth}@{\extracolsep\fill}rcll@{}}
-  \textbf{Pos} & \textbf{Nummer} & \textbf{Beschreibung} &
-  \textbf{Menge} & \textbf{Lagerausgang} & & \textbf{Lagerplatz} \\
-<%foreach number%>
-  <%runningnumber%> & <%number%> & <%description%> &
-  <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
-<%end number%>
-\end{tabular*}
-
+%\begin{tabular*}{\textwidth}{@{}rlp{\descrwidth}@{\extracolsep\fill}rcll@{}}
+\setlength{\tabcolsep}{0mm}
+\begin{tabularx}{\textwidth}{p{1.5cm}p{6cm}p{2cm}p{2cm}p{4cm}p{1.5cm}}
+  \textbf{Art-Nr} &
+  \textbf{Beschreibung} &
+  \textbf{Serien-Nr} &
+  \textbf{Menge} &
+  \textbf{Lager} &
+  \textbf{Lagerplatz} \\
+$(foreach number)$
+ $(if si_qty)$
+  $(foreach si_number)$
+   $(si_number)$ &
+   $(si_description)$ &
+   $(si_chargenumber)$ &
+   \hfill $(si_qty)$ $(si_unit)$ &
+   $(si_warehouse)$ &
+   $(si_bin)$\\[1em]
+  $(end si_number)$
+ $(else)$
+  $(number)$ &
+  $(description)$ &
+  &
+  \hfill $(qty)$ $(unit)$ &
+  & \\[1em]
+ $(end si_qty)$
+$(end number)$
+\end{tabularx}
 
 \parbox{\textwidth}{
 \rule{\textwidth}{2pt}
 }
 
 \end{document}
-
diff --git a/templates/print/Standard/proforma.tex b/templates/print/Standard/proforma.tex
new file mode 100644 (file)
index 0000000..adefdde
--- /dev/null
@@ -0,0 +1,284 @@
+% 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}
diff --git a/templates/print/Standard/purchase_delivery_order.tex b/templates/print/Standard/purchase_delivery_order.tex
new file mode 100644 (file)
index 0000000..cec5b79
--- /dev/null
@@ -0,0 +1,100 @@
+% purchase_delivery_order.tex für LX-Office ab V2.6.3
+% Bestell-Eingangslieferschein
+% ----------
+% Überarbeitet von Norbert Simon, n.simon@linet-services.de
+% Version 2.1 vom 21.Oktober 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[frame]{xy}
+\usepackage{tabularx}
+\usepackage[utf8]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{17cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\markboth{$(company)$\hfill $(ordnumber)$}{$(company)$\hfill $(ordnumber)$}
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{Von}
+\vspace{0.7cm}
+
+$(name)$ \\
+$(street)$ \\
+$(zipcode)$ \\
+$(city)$ \\
+$(country)$
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{Eingangslieferschein}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+  \textbf{BestellNr. \#} & \textbf{Datum} & \textbf{Kontakt}
+  $(if warehouse)$
+  & \textbf{Lager}
+  $(end warehouse)$
+  & \textbf{Lagerplatz} & \textbf{Lieferung mit} \\ [0.5em]
+  \hline
+
+  $(ordnumber)$
+  $(if shippingdate)$
+  & $(shippingdate)$
+  $(end shippingdate)$
+  $(if not shippingdate)$
+  & $(orddate)$
+  $(end shippingdate)$
+  & $(employee)$
+  $(if warehouse)$
+  & $(warehouse)$
+  $(end warehouse)$
+  & $(shippingpoint)$ & $(shipvia)$ \\
+  \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+  \textbf{Pos} & \textbf{Nummer} & \textbf{Beschreibung} & \textbf{Seriennumner} & & \textbf{Menge} & \textbf{Erh} & & \textbf{Lagerplatz} \\
+
+$(foreach number)$
+  $(runningnumber)$ & $(number)$ & $(description)$ & $(serialnumber)$ &
+  $(deliverydate)$ & $(qty)$ & $(ship)$ & $(unit)$ & $(bin)$ \\
+$(end number)$
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
diff --git a/templates/print/Standard/purchase_order.html b/templates/print/Standard/purchase_order.html
deleted file mode 100644 (file)
index e83c67a..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-<tr valign=bottom>
-  <td width=10>&nbsp;</td>
-  <td>
-  
-  <table width=100%>
-  <tr>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      </h4>
-    </td>
-
-    <td align=right>
-      <h4>
-      Telefon <%tel%>
-      <br>Telefax <%fax%>
-      </h4>
-    </td>
-  </tr>
-
-  <tr>
-    <th colspan=3>
-      <h4>B E S T E L L U N G</h4>
-    </th>
-  </tr>
-
-  </table>
-
-
-  <table width=100% callspacing=0 cellpadding=0>
-    
-  <tr>
-    <td align=right>
-    <table>
-    <tr>
-      <th align=right>Bestellungsdatum</th><td width=10>&nbsp;</td><td><%orddate%></td>
-    </tr>
-  
-    <tr>
-      <th align=right>Lieferbar bis</th><td width=10>&nbsp;</td><td><%reqdate%></td>
-    </tr>
-
-    <tr>
-      <th align=right>Bestellnummer</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
-    </tr>
-  
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-    </td>
-    </table>
-  </tr>
-
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-      <th align=left><font color=ffffff>An:</th>
-    </tr>
-
-    <tr>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-      </td>
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-  </tr>
-  
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-<!--      <th align=right><font color=ffffff>No.</th>  -->
-      <th align=left><font color=ffffff>Nummer</th>
-      <th align=left><font color=ffffff>Artikel</th>
-      <th><font color=ffffff>Anz</th>
-      <th>&nbsp;</th>
-      <th><font color=ffffff>Preis</th>
-      <th><font color=ffffff>Total</th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-<!--      <td align=right><%runningnumber%>.</td>
-adjust the colspan if you include this to shift subtotal one to the right
--->
-      <td><%number%></td>
-      <td><%description%></td>
-      <td align=right><%qty%></td>
-      <td><%unit%></td>
-      <td align=right><%sellprice%></td>
-      <td align=right><%linetotal%></td>
-    </tr>
-<%end number%>
-
-    <tr>
-      <td colspan=6><hr noshade></td>
-    </tr>
-    
-    <tr>
-      <th colspan=4 align=right>Zwischensumme</th>
-      <td colspan=2 align=right><%subtotal%></td>
-    </tr>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
-      <td colspan=2 align=right><%tax%></td>
-    </tr>
-<%end tax%>
-
-    <tr>
-      <td colspan=2>&nbsp;</td>
-      <td colspan=4><hr noshade></td>
-    </tr>
-
-    <tr>
-      <td colspan=2>Netto <b><%terms%></b> Tage</td>
-      <th colspan=2 align=right>Total</th>
-      <th colspan=2 align=right><%total%></th>
-    </tr>
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<tr>
-  <td>
-  <table width=100%>
-    <tr valign=top>
-<%if notes%>
-      <td>Bemerkungen</td>
-      <td><%notes%></td>
-<%end notes%>
-      <td align=right>
-      Alle Preise in <b><%currency%></b>
-      <br><%shippingpoint%>
-      </td>
-    </tr>
-
-  </table>
-  </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-  
-<tr>
-  <td>
-  <table width=100%>
-  <tr valign=top>
-    <td><font size=-3>
-    &nbsp;
-    </font>
-    </td>
-    <td width=150>
-    X <hr noshade>
-    </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
-
index 0e0bf39..3abc871 100644 (file)
+% purchase_order.tex für LX-Office ab V2.6.3
+% Einkauf - Bestellung
+% ----------
+% Ü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{eurosym}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\begin{document}
-
-\thispagestyle{empty}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-\setlength{\parindent}{0cm}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\vspace*{1.5cm}
-
-\begin{minipage}{8cm}
-  <%name%>
-
-  <%street%>
-
-  <%zipcode%> <%city%>
+\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{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 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}{tabelle$(employee_login)$.tex}
+
+% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
+% \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)$}
+\newcommand{\docnumber}{Bestellung Nr. \ordnumber}
+\newcommand{\vendornumber}{$(vendornumber)$}
+\newcommand{\reqdate}{$(reqdate)$}
+\newcommand{\orddate}{$(orddate)$}
+\newcommand{\ordnumber}{$(ordnumber)$}
+\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ährungszeichen ----------
+\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}
 
-  <%country%>
-\end{minipage}
+\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}
+
+% ---------- Datum und Nummern ----------
+% Position unterhalb des Briefkopfs
+\vspace*{\vlogospacing}
+\renewcommand{\arraystretch}{0.9}
+\begin{minipage}[b]{177mm}
+\sperren{\textbf{Bestellung Nr. \ordnumber}}
 \hfill
-\begin{minipage}{6cm}
-  \rightline{\LARGE\textbf{\textit{Bestellung}}}
-  \rightline{\large\textbf{\textit{Nr. <%ordnumber%>%
-  }}}
-
-  Datum:\hfill <%orddate%>
-
-  Kunden-Nr:\hfill <%customernumber%>
-
-  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} & \orddate \\
+               \nonemptyline{\textbf{Lieferung bis} &}{\reqdate}
+               \nonemptyline{\textbf{Unsere Kunden Nr.} &}{\vendornumber}
+               \textbf{Bestellung Nr.} & \ordnumber\\
+               \nonemptyline{\textbf{Terminwunsch} &}{\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
+gemäß Ihrem Angebot
+\ifthenelse{\equal{\orddate}{\leer}}{}{vom \orddate{}}%
+, beauftragen wir Sie mit der nachstehenden Lieferung.
+Bei Fragen zur Bestellung, steht Ihnen \employeename \ per Telefon (\employeetel) oder per E-Mail (\employeeemail) gerne zur Verfügung.\\
+
+%\\[1\baselineskip]
+
+% ---------- Bemerkung übernehmen ----------
+\ifthenelse{\isempty{$(notes)$}}{}{
+      \vspace{ 5mm}
+      $(notes)$
+      \vspace*{5mm}
+      }
+
+
+% ---------- Die eigentliche-Tabelle ----------
+
+% ---------- Tabelle puffern ----------
+\begin{filecontents}{\employeetable}
+% ---------- globale Variable laufsumme deklarieren
+\resetlaufsumme
+% ---------- Spaltendefinition ----------
+\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)$}{}}{}{$(longdescription)$} &
+       $(qty)$ &
+       $(unit)$ &
+       \numprint{$(sellprice)$} &
+       \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
+   {\textbf{Gesamtbetrag:}} & \bfseries\numprint{$(ordtotal)$} & \textbf{\currency}\\
+   \bottomrule
+\end{tabular}
+}
+\vfill
+Grundlage dieses Auftrages sind unsere Einkaufsbedingungen. 
+Wir bitten um gleichlautende Auftragsbestätigung.\\
+\vspace{1.5\baselineskip}
+
+\nonemptyline{\textbf{Liefertermin: }}{\reqdate}
+
+% ---------- Lieferadresse ----------
+\ifthenelse{\equal{\shiptocity}{\leer}}{}{
+% ---------- Umbruch dazwischen verhindern ----------
+\parbox{\textwidth}{
+\textbf{Lieferanschrift:}
+%[7mm]
+%    \rule{10em}{0mm}
+% ---------- Bereich für Lieferadresse ----------
+       \parbox[t]{7cm}{
+               \shiptoname \\
+               \nonemptyline{}{\shiptodepartmentone}
+               \nonemptyline{}{\shiptodepartmenttwo}
+               \shiptostreet \\
+               \shiptocountry{ }\shiptozipcode{ }\shiptocity\\[1mm]
+               \nonemptyline{Tel: }{\shiptophone}
+               \nonemptyline{Fax: }{\shiptofax}
+       }%ende parbox
+}% ende parbox
+}% ende ifthenelse
 
-\vspace*{0.5cm}
-
-
-Hiermit bestellen wir verbindlich folgende Positionen:
-\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 \\
-  <%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{<%ordtotal%> \euro} \\
-\end{tabularx}
-\hrule
 
 \end{document}
 
diff --git a/templates/print/Standard/request_quotation.html b/templates/print/Standard/request_quotation.html
deleted file mode 100644 (file)
index 6ff0036..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-<tr valign=bottom>
-  <td width=10>&nbsp;</td>
-  <td>
-  
-  <table width=100%>
-  <tr>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      </h4>
-    </td>
-
-    <td><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58>
-    </td>
-
-    <td align=right>
-      <h4>
-      Tel: <%tel%>
-      <br>Fax: <%fax%>
-      </h4>
-    </td>
-  </tr>
-
-  <tr>
-    <th colspan=3>
-      <h4>A N F R A G E</h4>
-    </th>
-  </tr>
-
-  </table>
-
-
-  <table width=100% callspacing=0 cellpadding=0>
-
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-      <th align=left width=50%><font color=ffffff>Rechnungsanschrift:</th>
-      <th align=left width=50%><font color=ffffff>Lieferanschrift:</th>
-    </tr>
-
-    <tr valign=top>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-<br>
-<%if contact%>
-<br>Kontakt: <%contact%>
-<%end contact%>
-<%if vendorphone%>
-<br>Tel: <%vendorphone%>
-<%end vendorphone%>
-<%if vendorfax%>
-<br>Fax: <%vendorfax%>
-<%end vendorfax%>
-      </td>
-
-      <td><%shiptoname%>
-      <br><%shiptostreet%>
-      <br><%shiptozipcode%>
-      <br><%shiptocity%>
-      <br><%shiptocountry%>
-<br>
-<%if shiptocontact%>
-<br>Kontakt: <%shiptocontact%>
-<%end shiptocontact%>
-<%if shiptophone%>
-<br>Tel: <%shiptophone%>
-<%end shiptophone%>
-<%if shiptofax%>
-<br>Fax: <%shiptofax%>
-<%end shiptofax%>
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr><td>&nbsp;</td></tr>
-
-  <tr>
-    <td colspan=2>
-    <table width=100% border=1>
-    <tr>
-      <th width=17% align=left>AnfrageNr. #</th>
-      <th width=17% align=left>Datum</th>
-      <th width=17% align=left>Erforderlich am</th>
-      <th width=17% align=left>Kontakt</th>
-      <th width=17% align=left>Lagerplatz</th>
-      <th width=15% align=left>Versand mit:</th>
-    </tr>
-
-    <tr>
-      <td><%quonumber%></td>
-      <td><%quodate%></td>
-      <td><%reqdate%></td>
-      <td><%employee%></td>
-      <td><%shippingpoint%></td>
-      <td><%shipvia%></td>
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr height="10"></tr>
-
-  <tr>
-    <td>Bitte teilen Sie uns Preise und Lieferzeit für folgende Artikel mit:</td>
-  </tr>
-
-  <tr height="10"></tr>
-
-  <tr>
-    <td>
-    <table width=100%>
-    <tr>
-<!--      <th align=right>No.</th>  -->
-      <th align=left>ArtNr.</th>
-      <th align=left>Beschreibung</th>
-      <th>Menge</th>
-      <th>&nbsp;</th>
-      <th>Lieferung</th>
-      <th>Stückpreis</th>
-      <th>Gesamtpreis</th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-<!--      <td align=right><%runningnumber%>.</td>
-other per line item variables available <%reqdate%>
-adjust the colspan if you include this to shift subtotal one to the right
--->
-      <td><%number%></td>
-      <td><%description%></td>
-      <td align=right><%qty%></td>
-      <td><%unit%></td>
-
-    </tr>
-<%end number%>
-
-    <tr>
-      <td colspan=7><hr noshade></td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<tr>
-  <td>
-  <table width=100%>
-<%if notes%>
-    <tr valign=top>
-      <td>Bemerkungen</td>
-      <td><%notes%></td>
-    </tr>
-<%end notes%>
-
-  </table>
-  </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-  
-<tr>
-  <td>
-  <table width=100%>
-  <tr valign=top>
-    <td width=70%>&nbsp;</td>
-
-    <td width=30%>
-    X <hr noshade>
-    </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
-
index d3ba6f5..913df1e 100644 (file)
+% request_quotation.tex für LX-Office ab V2.6.3
+% Anfrage - Einkauf
+% ----------
+% Ü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[frame]{xy}
-\usepackage{tabularx}
-\usepackage{graphicx}
-\usepackage{german}
-\usepackage[utf8]{inputenc}
-\setlength{\voffset}{0.5cm}
-\setlength{\hoffset}{-2.0cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{1.0cm}
-\setlength{\evensidemargin}{1.0cm}
-\setlength{\textwidth}{17cm}
-\setlength{\textheight}{24.7cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
-\begin{document}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{12cm}
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-
-\pagestyle{myheadings}
-\thispagestyle{empty}
-
-\vspace*{-1.3cm}
-
-\parbox{\textwidth}{
-  \parbox[b]{.42\textwidth}{
-    <%company%>
-
-    <%address%>
-  }\hfill
-  \begin{tabular}[b]{rr@{}}
-  Tel & <%tel%>\\
-  Fax & <%fax%>
-  \end{tabular}
-
-  \rule[1.5ex]{\textwidth}{0.5pt}
-}
-
-
-\vspace*{0.5cm}
-
-\parbox[t]{1cm}{\hfill}
-\parbox[t]{.45\textwidth}{
-\textbf{To}
-\vspace{0.7cm}
-
-<%name%>
-
-<%street%>
-
-<%zipcode%>
-
-<%city%>
-
-<%country%>
-
-\vspace{0.3cm}
-
-<%if contact%>
-<%contact%>
-<%end contact%>
-
-\vspace{0.2cm}
-
-<%if vendorphone%>
-Tel: <%vendorphone%>
-<%end vendorphone%>
-
-<%if vendorfax%>
-Fax: <%vendorfax%>
-<%end vendorfax%>
-
-<%email%>
-}
-\parbox[t]{.45\textwidth}{
-\textbf{Lieferanschrift}
-\vspace{0.7cm}
-
-<%shiptoname%>
-
-<%shiptostreet%>
-
-<%shiptozipcode%>
-
-<%shiptocity%>
-
-<%shiptocountry%>
-
-\vspace{0.3cm}
-
-<%if shiptocontact%>
-<%shiptocontact%>
-<%end shiptocontact%>
-
-<%if shiptophone%>
-Tel: <%shiptophone%>
-<%end shiptophone%>
-
-<%if shiptofax%>
-Fax: <%shiptofax%>
-<%end shiptofax%>
-
-<%shiptoemail%>
+\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{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 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}{tabelle$(employee_login)$.tex}
+
+% ---------- 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]
 }
-\hfill
 
-\vspace{1cm}
+% ---------- Bestellvariablen ----------
+\newcommand{\quonumber}{$(quonumber)$}
+\newcommand{\docnumber}{Anfrage Nr. {\quonumber}}
+\newcommand{\vendornumber}{$(vendornumber)$}
+\newcommand{\reqdate}{$(reqdate)$}
+\newcommand{\orddate}{$(orddate)$}
+\newcommand{\ordnumber}{$(ordnumber)$}
+\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ährungszeichen ----------
+\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}
 
-\textbf{A N F R A G E}
+\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}
+
+% ---------- Datum und Nummern ----------
+% Position unterhalb des Briefkopfs
+\vspace*{\vlogospacing}
+\renewcommand{\arraystretch}{0.9}
+\begin{minipage}[b]{177mm}
+\sperren{\textbf{Anfrage Nr. \quonumber}}
 \hfill
-
-\vspace{1cm}
-
-\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
-  \textbf{AnfrageNr. \#} & \textbf{Datum} & \textbf{Benötigt am} & \textbf{Kontakt} & \textbf{Lagerplatz} & \textbf{Lieferung mit} \\ [0.5ex]
-  \hline
-  <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
-  \hline
-\end{tabularx}
-
-\vspace{1cm}
-
-Bitte nennen Sie uns für folgende Artikel Preis und Liefertermin:
-
-\vspace{1cm}
-
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rl}
-  \textbf{Nummer} & \textbf{Beschreibung} & \textbf{Menge} & \\
-<%foreach number%>
-  <%number%> & <%description%> & <%qty%> & <%unit%> \\
-<%end number%>
-\end{tabular*}
-
-
+       \small
+       \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}}
+               \textbf{Seite} & {\thepage} von \pageref{LastPage}\\
+               \textbf{Datum} & \transdate \\
+               \nonemptyline{\textbf{Unsere Kunden Nr.} &}{\vendornumber}
+               \textbf{Anfrage Nr.} & \quonumber\\
+               \nonemptyline{\textbf{Terminwunsch} &}{\reqdate}
+               \textbf{Ansprechpartner} & \employeename\\
+               \nonemptyline{\textbf{Durchwahl} &}{\employeetel}
+               \nonemptyline{\textbf{E-Mail} &}{\employeeemail}
+       \end{tabular}\\[10mm plus 20mm minus 10mm]
+\end{minipage}
+\normalsize
+\renewcommand{\arraystretch}{1}
+
+% ---------- Begrüßung und Bemerkungen ----------
+\vspace*{5mm}
+\lettergreeting
+hiermit bitten wir um ein für uns freibleibendes und kostenloses Angebot für die nachfolgenden Positionen.
+Eventuell preisgünstigere Alternativen bitten wir gesondert anzubieten.
+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{}}]}}
+% ---------- 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)$ &
+       \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}{
-\rule{\textwidth}{2pt}
-
+ %---------- Summenbereich nach recht schieben  ----------
 \hfill
-
-<%if notes%>
-  <%notes%>
-<%end if%>
-
+\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
+   {\textbf{Gesamtbetrag:}} & \bfseries\numprint{$(ordtotal)$} & \textbf{\currency}\\
+   \bottomrule
+\end{tabular}
 }
+% ---------- 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}{
+\ifthenelse{\equal{$(shipvia)$}{\leer}}{}{Lieferung vorzugsweise mit $(shipvia)$.\\[1em]}
+
+\textbf{Lieferanschrift:} \hspace{2mm}
+%    \rule{10em}{0mm}
+% ---------- Bereich für Lieferadresse ----------
+       \parbox[t]{7cm}{
+               \shiptoname \\
+               \nonemptyline{}{\shiptodepartmentone}
+               \nonemptyline{}{\shiptodepartmenttwo}
+               \shiptostreet \\
+               \shiptocountry{ }\shiptozipcode{ }\shiptocity\\[1mm]
+               \nonemptyline{Tel: }{\shiptophone}
+               \nonemptyline{Fax: }{\shiptofax}
+       }%ende parbox
+}% ende parbox
+}% ende ifthenelse
+
+%Mit freundlichen Grüßen\\[1\baselineskip]
+%\employeename\\[1\baselineskip]
 
 \end{document}
 
index c819d76..bcad78b 100644 (file)
+% sales_delivery_order.tex
+% Verkauf - Lieferschein
+% Überarbeitet von Norbert Simon, n.simon@linet-services.de
+% Version 2.5 vom 15.Oktober 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}
-
-\setlength{\parindent}{0cm}
-
-\pagestyle{empty}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-
-\fontfamily{cmss}\fontshape{n}\selectfont
-
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+\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{ltxtable}       % Mehrseiten-Tabellen mit variabler Spaltenbreite
+\usepackage{booktabs}      % Striche in Tabellen
+\usepackage{microtype,relsize} %Feinpositionierung, Sperren von Text
+\newcommand*{\sperren}[1]{\normalsize\textls*[200]{#1}} %Sperrung Überrschriften
+
+
+% ---------- 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}{tabelle$(employee_login)$.tex}
+
+% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ---------- 
+% \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,}
+       }\\[0.3em]
+}
+
+% ---------- Bestellvariablen ---------- 
+\newcommand{\ordnumber}{$(ordnumber)$}
+\newcommand{\donumber}{$(donumber)$}
+%\newcommand{\donumber}{Lieferschein zu Auftrag Nr. \ordnumber}
+\newcommand{\deldate}{\the\day.\the\month.\the\year}
+\newcommand{\orddate}{$(orddate)$}
+\newcommand{\quodate}{$(quodate)$}
+\newcommand{\reqdate}{$(reqdate)$}
+\newcommand{\kundennummer}{$(customernumber)$}
+
+% ---------- 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ährungszeichen ---------- 
+\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}
 
-\vspace*{1.5cm}
-
-\begin{minipage}{8cm}
-  <%name%>
-
-  <%street%>
-
-  <%zipcode%> <%city%>
-
-  <%country%>
-\end{minipage}
+\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}                              
+% ---------- Datum und Nummern ---------- 
+% Position unterhalb des Briefkopfs
+\vspace*{\vlogospacing}        
+\renewcommand{\arraystretch}{0.9}
+\begin{minipage}[b]{177mm}
+\sperren{\textbf{Lieferschein Nr. \donumber}}
 \hfill
-\begin{minipage}{6cm}
-  \rightline{\LARGE\textbf{\textit{Lieferschein}}} \vspace*{0.2cm}
-  \rightline{\large\textbf{\textit{Nr. <%donumber%>% \vspace*{0.2cm}
-  }}}
-
-  Lieferscheindatum:\hfill <%dodate%>
-
-  Kunden-Nr:\hfill <%customernumber%>
-
-  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} & \deldate \\
+               \textbf{Kunden Nr.} & \kundennummer\\
+               \textbf{Auftrag Nr.} & \ordnumber\\
+               \textbf{Lieferschein Nr.} & \donumber\\
+               \nonemptyline{\textbf{Vorraussichtl. Lieferdatum:} &}{\reqdate}
+               \textbf{Ansprechpartner} & \employeename\\              
+               \nonemptyline{\textbf{Durchwahl} &}{\employeetel}
+               \nonemptyline{\textbf{E-Mail} &}{\employeeemail}                                                
+       \end{tabular}\\[10mm plus 20mm minus 10mm]
 \end{minipage}
-
-\vspace*{0.5cm}
-
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rl@{}}
-  \textbf{Nummer} & \textbf{Artikel} & \textbf{Anz} & \textbf{Einh}  \\
-
-<%foreach number%>
-  <%number%> & <%description%> & <%qty%> & <%unit%>   \\
-    & <%serialnumber%>  & & \\
-<%end number%>
-\end{tabular*}
-
-\vspace{1cm}
-<%if deliverydate%>
-        Die Auslieferung/Fertigstellung erfolgte am : <%deliverydate%>
-<%end if%>
-<%if notes%>
-  <%notes%>
-<%end if%>
+\renewcommand{\arraystretch}{1}        
+\normalsize
+% ---------- Begrüßung und Bemerkungen ---------- 
+\vspace{ 5mm}
+%\lettergreeting
+Wir liefern Ihnen gemäß Ihrem Auftrag %
+\ifthenelse{\equal{\orddate}{\leer}}{}{vom \orddate{ }}% 
+die unten aufgeführten Positionen.\\
+Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel) oder per E-Mail (\employeeemail) gerne zur Verfügnung.\par
+      
+% ---------- Die eigentliche-Tabelle ---------- 
+% ---------- Tabelle puffern ---------- 
+\begin{filecontents}{\employeetable}
+% ---------- Spaltendefinition ---------- 
+\begin{longtable}{@{}rlX@{ }rl@{}}
+% ---------- Kopfzeile der Tabelle ---------- 
+               \textbf{Pos} &
+       \textbf{Art.Nr.} &
+       \textbf{Bezeichnung} &
+       \textbf{Menge} &
+       \textbf{ME}  \\
+       \midrule
+  \endfirsthead
+% ---------- Tabellenkopf nach dem Umbruch ---------- 
+               \textbf{Pos} &
+       \textbf{Art.Nr.} &
+       \textbf{Bezeichnung} &
+       \textbf{Menge} &
+       \textbf{ME} \\
+        \midrule
+  \endhead
+% ---------- Fuss der Teiltabellen ---------- 
+        \midrule
+  \endfoot
+% ---------- Das Ende der Tabelle ---------- 
+       \midrule
+  \endlastfoot
+% ---------- Positionen ---------- 
+  $(foreach number)$
+       $(runningnumber)$ &
+       $(number)$ &
+       $(description)$ &
+       $(qty)$ &
+       $(unit)$ 
+       \\ %       
+  $(end number)$
+\end{longtable}
+% ----------  Ende der Hilfsdatei ---------- 
+\end{filecontents} 
+% ---------- Puffertabelle öffnen ---------- 
+\LTXtable{\textwidth}{\employeetable}
+
+\vfill
+
+Lieferung entgegengenommen:\\[3em]
+\rule{20em}{0.1pt}\\
+\hspace*{5em}Datum, Unterschrift \\
+
+\vfill
+\tiny
+Die zur Zeit gültigen Allgemeinen Auftrags- und Verkaufsbedingungen wurden zur Kenntnis genommen.\\
+
+Beanstandungen sind innerhalb von fünf Werktagen bekanntzugeben. Später eingehende Beanstandungen können nicht mehr berücksichtigt werden. Bitte dokumentieren Sie eventuelle Verpackungs- und Transportschäden der Lieferung anhand von Fotos.
 
 \end{document}
-
diff --git a/templates/print/Standard/sales_order.html b/templates/print/Standard/sales_order.html
deleted file mode 100644 (file)
index 4cbe20a..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-<tr valign=bottom>
-  <td width=10>&nbsp;</td>
-  <td>
-  
-  <table width=100%>
-  <tr>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      </h4>
-    </td>
-
-    <td align=right>
-      <h4>
-      Telefon <%tel%>
-      <br>Telefax <%fax%>
-      </h4>
-    </td>
-  </tr>
-
-  <tr>
-    <th colspan=3>
-      <h4>B E S T E L L U N G</h4>
-    </th>
-  </tr>
-
-  </table>
-
-
-  <table width=100% callspacing=0 cellpadding=0>
-    
-  <tr>
-    <td align=right>
-    <table>
-    <tr>
-      <th align=right>Bestelldatum</th><td width=10>&nbsp;</td><td><%orddate%></td>
-    </tr>
-  
-    <tr>
-      <th align=right>Lieferbar bei</th><td width=10>&nbsp;</td><td><%reqdate%></td>
-    </tr>
-
-    <tr>
-      <th align=right>Bestellnummer</th><td>&nbsp;</td><td><%ordnumber%></td></tr>
-    </tr>
-  
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-    </td>
-    </table>
-  </tr>
-
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-      <th align=left><font color=ffffff>Verrechnet An:</th>
-      <th align=left><font color=ffffff>Lieferaddresse:</th>
-    </tr>
-
-    <tr>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-      </td>
-
-      <td><%shiptoname%>
-      <br><%shiptostreet%>
-      <br><%shiptozipcode%>
-      <br><%shiptocity%>
-      <br><%shiptocountry%>
-      </td>
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-  </tr>
-  
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-<!--      <th align=right><font color=ffffff>No.</th>  -->
-      <th align=left><font color=ffffff>Nummer</th>
-      <th align=left><font color=ffffff>Artikel</th>
-      <th><font color=ffffff>Anz</th>
-      <th>&nbsp;</th>
-      <th><font color=ffffff>Preis</th>
-      <th><font color=ffffff>Rab</th>
-      <th><font color=ffffff>Total</th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-<!--      <td align=right><%runningnumber%>.</td>
-adjust the colspan if you include this to shift subtotal one to the right
--->
-      <td><%number%></td>
-      <td><%description%></td>
-      <td align=right><%qty%></td>
-      <td><%unit%></td>
-      <td align=right><%sellprice%></td>
-      <td align=right><%discount%></td>
-      <td align=right><%linetotal%></td>
-    </tr>
-<%end number%>
-
-    <tr>
-      <td colspan=7><hr noshade></td>
-    </tr>
-    
-<%if taxincluded%>
-    <tr>
-      <th colspan=5 align=right>Total</th>
-      <td colspan=2 align=right><%ordtotal%></td>
-    </tr>
-<%end taxincluded%>
-
-<%if not taxincluded%>
-    <tr>
-      <th colspan=5 align=right>Zwischensumme</th>
-      <td colspan=2 align=right><%subtotal%></td>
-    </tr>
-<%end taxincluded%>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=5 align=right><%taxdescription%> auf <%taxbase%> @ <%taxrate%> %</th>
-      <td colspan=2 align=right><%tax%></td>
-    </tr>
-<%end tax%>
-
-    <tr>
-      <td colspan=2>&nbsp;</td>
-      <td colspan=5><hr noshade></td>
-    </tr>
-
-    <tr>
-      <td colspan=3>Netto <b><%terms%></b> Tage</td>
-      <th colspan=2 align=right>Total</th>
-      <th colspan=2 align=right><%ordtotal%></th>
-    </tr>
-<%if taxincluded%>
-    <tr>
-      <td colspan=3>Steuern sind im Preis inbegriffen</td>
-    </tr>
-<%end taxincluded%>
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<tr>
-  <td>
-  <table width=100%>
-    <tr valign=top>
-<%if notes%>
-      <td>Bemerkungen</td>
-      <td><%notes%></td>
-<%end notes%>
-      <td align=right>
-      Alle Preise in <b><%currency%></b>
-      <br><%shippingpoint%>
-      </td>
-    </tr>
-
-  </table>
-  </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-  
-<tr>
-  <td>
-  <table width=100%>
-  <tr valign=top>
-    <td><font size=-3>
-    Spezialprodukte werden nicht zurückgenommen. Für alle anderen Waren
-    wird eine 10% Stornogebühr verrechnet.
-    </font>
-    </td>
-    <td width=150>
-    X <hr noshade>
-    </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
-
index 7cc8d82..048a560 100644 (file)
-\documentclass[twoside]{scrartcl}
-\usepackage{eurosym}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\begin{document}
-
-\thispagestyle{empty}
-
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-\setlength{\parindent}{0cm}
+% sales_order.tex
+% Auftragsbestätigung 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=$( )$
+% ----------
 
-\fontfamily{cmss}\fontshape{n}\selectfont
+\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
 
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
 
-\vspace*{1.5cm}
+% ---------- 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}{tabelle$(employee_login)$.tex}
 
-\begin{minipage}{8cm}
-  <%name%>
+% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
+% \newcommand{\companybank}{$(company_bank)$}
+% \newcommand{\companybankcode}{$(company_bank_code)$}
+% \newcommand{\companyaccountnumber}{$(company_account_number)$}
 
-  <%street%>
+% ---------- 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]
+}
 
-  <%zipcode%> <%city%>
+% ---------- Bestellvariablen ----------
+\newcommand{\quonumber}{$(quonumber)$}
+\newcommand{\ordnumber}{$(ordnumber)$}
+\newcommand{\docnumber}{{\quonumber}}
+\newcommand{\orddate}{$(orddate)$}
+\newcommand{\quodate}{$(quodate)$}
+\newcommand{\kundennummer}{$(customernumber)$}
+\newcommand{\reqdate}{$(reqdate)$}
+\newcommand{\transdate}{$(transdate)$}
 
-  <%country%>
-\end{minipage}
-\hfill
-\begin{minipage}{6cm}
-  \rightline{\LARGE\textbf{\textit{Auftragsbestätigung}}} \vspace*{0.2cm}
-  \rightline{\large\textbf{\textit{Nr. <%ordnumber%>%
-  }}} \vspace*{0.2cm}
+% ---------- 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)$}
 
-  Datum:\hfill <%orddate%>
+% ---------- Währungszeichen ----------
+\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\$}{}
 
-  Kunden-Nr:\hfill <%customernumber%>
+% ---------- Ende Reportvariablen-Umsetzung ----------
 
-  Telefon:\hfill <%phone%>
+% ---------- Briefkopf dazuladen ----------
+\input{kivitendobriefkopf}
 
-  Telefax:\hfill <%fax%>
+\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}
 
-  Ansprechpartner:\hfill <%employee%>
+% ---------- Datum und Nummern ----------
+% Position unterhalb des Briefkopfs
+\vspace*{\vlogospacing}
+\renewcommand{\arraystretch}{0.9}
+\begin{minipage}[b]{177mm}
+\sperren{\textbf{Auftragsbestätigung Nr. \ordnumber}}
+\hfill
+       \small
+       \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}}
+               \textbf{Seite} & {\thepage} von \pageref{LastPage}\\
+               \textbf{Datum} & \orddate \\
+               \textbf{Kunden Nr.} & \kundennummer\\
+               \textbf{Angebot Nr.} & \docnumber\\
+               \textbf{Auftragsbestätigung Nr.} & \ordnumber\\
+               \nonemptyline{\textbf{Vorraussichtl. 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
+wir bedanken uns für Ihren Auftrag %
+\ifthenelse{\equal{\orddate}{\leer}}{}{vom \orddate{ }}%
+und bestätigen Ihnen diesen wie folgt.\\
+%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)$
 
-\vspace*{0.5cm}
-
+\end{longtable}
+% ----------  Ende der Hilfsdatei ----------
+\end{filecontents}
+% ---------- Puffertabelle öffnen ----------
+\LTXtable{\textwidth}{\employeetable}
+\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
+   {\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 ----------
+\vspace*{0.5em}
+\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
+$(if payment_terms)$
+\vspace*{0.5em}
+\textbf{Zahlungsbedingungen:}\hfill\parbox[t]{0.7\textwidth}{$(payment_terms)$}\\[1em]
+$(end)$
+\vspace*{0.5em}
+%Nutzen Sie bitte für Fragen oder Änderungswünsche die oben angegebenen Kontaktmöglichkeiten.\\ \vfil
+\parbox{\textwidth}{
+Für Nachfragen steht Ihnen \employeename \ per Telefon (\employeetel) oder per E-Mail (\employeeemail) gerne zur Verfügung.\\
 
-\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 \\
-  <%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{<%ordtotal%> \euro} \\
-\end{tabularx}
-\hrule
-
-\vspace{1cm}
-Vereinbarter Liefertermin: <%reqdate%> \\ \\
-\textit{Bitte kontrollieren Sie alle Positionen auf Übereinstimmung
-  mit Ihrer Bestellung! Abweichungen teilen Sie innerhalb von 3 Tagen
-  mit!} \\ \\
+Wir sichern Ihnen eine termin- und fachgerechte Ausführung zu.\\
 
+\vspace{1.5\baselineskip}
+Mit freundlichen Grüßen\\ \vfil
+\employeename
+}% Ende Parbox
+\vfill
+\footnotesize
+Es gelten unsere Liefer- und Zahlungsbedingungen, die wir Ihnen auf Wunsch gerne zukommen lassen.
 \end{document}
-
diff --git a/templates/print/Standard/sales_quotation.html b/templates/print/Standard/sales_quotation.html
deleted file mode 100644 (file)
index 1380631..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-<tr valign=bottom>
-  <td width=10>&nbsp;</td>
-  <td>
-  
-  <table width=100%>
-  <tr valign=top>
-    <td>
-      <h4>
-      <%company%>
-      <br><%address%>
-      </h4>
-    </td>
-
-    <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
-
-    <td align=right>
-      <h4>
-      Tel: <%tel%>
-      <br>Fax: <%fax%>
-      </h4>
-    </td>
-  </tr>
-
-<tr><td colspan=3>&nbsp;</td></tr>
-
-  <tr>
-    <th colspan=3>
-      <h4>A N G E B O T</h4>
-    </th>
-  </tr>
-
-  </table>
-
-  <table width=100% callspacing=0 cellpadding=0>
-
-  <tr>
-    <td>
-    <table width=100%>
-
-    <tr valign=top>
-      <td><%name%>
-      <br><%street%>
-      <br><%zipcode%>
-      <br><%city%>
-      <br><%country%>
-<br>
-<%if contact%>
-<br>Kontakt: <%contact%>
-<%end contact%>
-
-<%if customerphone%>
-<br>Tel: <%customerphone%>
-<%end customerphone%>
-
-<%if customerfax%>
-<br>Fax: <%customerfax%>
-<%end customerfax%>
-
-<%if email%>
-<br><%email%>
-<%end email%>
-      </td>
-
-    </tr>
-    </table>
-    </td>
-  </tr>
-
-  <tr><td>&nbsp;</td></tr>
-
-  <tr>
-    <td colspan=2>
-      <table width=100% border=1>
-        <tr>
-         <th width=17% align=left nowrap>Nummer</th>
-         <th width=17% align=left>Datum</th>
-         <th width=17% align=left>Gültig bis</th>
-         <th width=17% align=left nowrap>Kontakt</th>
-         <th width=17% align=left nowrap>Lagerplatz</th>
-         <th width=15% align=left nowrap>Lieferung mit</th>
-       </tr>
-
-       <tr>
-         <td><%quonumber%></td>
-         <td><%quodate%></td>
-         <td><%reqdate%></td>
-         <td><%employee%></td>
-         <td><%shippingpoint%></td>
-         <td><%shipvia%></td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-
-  <tr>
-    <td>&nbsp;</td>
-  </tr>
-
-  <tr>
-    <td>
-    <table width=100%>
-    <tr bgcolor=000000>
-      <th align=right><font color=ffffff>Nr.</th>
-      <th align=left><font color=ffffff>Artikelnummer</th>
-      <th align=left><font color=ffffff>Beschreibung</th>
-      <th><font color=ffffff>Menge</th>
-      <th>&nbsp;</th>
-      <th><font color=ffffff>Preis</th>
-      <th><font color=ffffff>Rabatt</th>
-      <th><font color=ffffff>Gesamtpreis</th>
-    </tr>
-
-<%foreach number%>
-    <tr valign=top>
-    <td align=right><%runningnumber%></td>
-
-      <td><%number%></td>
-      <td><%description%></td>
-      <td align=right><%qty%></td>
-      <td><%unit%></td>
-      <td align=right><%sellprice%></td>
-      <td align=right><%discount%></td>
-      <td align=right><%linetotal%></td>
-    </tr>
-<%end number%>
-
-    <tr>
-      <td colspan=8><hr noshade></td>
-    </tr>
-
-    <tr>
-<%if taxincluded%>
-      <th colspan=6 align=right>Gesamtbetrag netto</th>
-      <td colspan=2 align=right><%invtotal%></td>
-<%end taxincluded%>
-
-<%if not taxincluded%>
-      <th colspan=6 align=right>Zwischensumme</th>
-      <td colspan=2 align=right><%subtotal%></td>
-<%end taxincluded%>
-    </tr>
-
-<%foreach tax%>
-    <tr>
-      <th colspan=6 align=right><%taxdescription%> von <%taxbase%> @ <%taxrate%> %</th>
-      <td colspan=2 align=right><%tax%></td>
-    </tr>
-<%end tax%>
-
-    <tr>
-      <td colspan=4>&nbsp;</td>
-      <td colspan=4><hr noshade></td>
-    </tr>
-
-    <tr>
-      <td colspan=4>&nbsp;
-<%if terms%>
-      Zahlungsziel <b><%terms%></b> Tage
-<%end terms%>
-      </td>
-      <th colspan=2 align=right>Gesamtbetrag brutto</th>
-      <th colspan=2 align=right><%quototal%></th>
-    </tr>
-
-    <tr>
-      <td>&nbsp;</td>
-    </tr>
-
-    </table>
-    </td>
-  </tr>
-
-<tr>
-  <td>
-  <table width=100%>
-    <tr valign=top>
-<%if notes%>
-      <td>Bemerkungen</td>
-      <td><%notes%></td>
-<%end notes%>
-      <td align=right>
-      Alle Preise in <b><%currency%></b> Euro
-      </td>
-    </tr>
-
-  </table>
-  </td>
-</tr>
-
-<tr><td>&nbsp;</td></tr>
-
-<tr>
-  <td>
-  <table width=100%>
-  <tr valign=top>
-    <td width=60%><font size=-3>
-    Spezialanfertigungen können nicht zurückgenommen werden.
-    </font>
-    </td>
-    <td width=40%>
-    X <hr noshade>
-    </td>
-  </tr>
-  </table>
-  </td>
-</tr>
-
-</table>
-
-</td>
-</tr>
-</table>
-
-</body>
-</html>
-
-
index 42c2422..f608ca0 100644 (file)
-\documentclass[twoside]{scrartcl}
-\usepackage{eurosym}
-\usepackage{tabularx}
-\usepackage[utf8]{inputenc}
-\begin{document}
+% salex_quotation.tex
+% Verkauf - Angebot
+% Ü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=$( )$
+% ----------
 
-\thispagestyle{empty}
+\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
 
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-\setlength{\parindent}{0cm}
 
-\fontfamily{cmss}\fontshape{n}\selectfont
+% ---------- 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}{tabelle$(employee_login)$.tex}
 
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
+% \newcommand{\companybank}{$(company_bank)$}
+% \newcommand{\companybankcode}{$(company_bank_code)$}
+% \newcommand{\companyaccountnumber}{$(company_account_number)$}
 
-\vspace*{1.5cm}
+% ---------- 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]
+}
 
-\begin{minipage}{8cm}
-  <%name%>
+% ---------- Bestellvariablen ----------
+\newcommand{\quonumber}{$(quonumber)$}
+\newcommand{\docnumber}{Angebot Nr. {\quonumber}}
+\newcommand{\quodate}{$(quodate)$}
+\newcommand{\kundennummer}{$(customernumber)$}
+\newcommand{\reqdate}{$(reqdate)$}
 
-  <%street%>
+% ---------- 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)$}
 
-  <%zipcode%> <%city%>
+% ---------- Währungszeichen ----------
+\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\$}{}
 
-  <%country%>
-\end{minipage}
-\hfill
-\begin{minipage}{6cm}
-  \rightline{\LARGE\textbf{\textit{Angebot}}}
-  \rightline{\large\textbf{\textit{Nr. <%quonumber%>%
-  }}}
+% ---------- Ende Reportvariablen-Umsetzung ----------
 
-  Datum:\hfill <%transdate%>
+% ---------- Briefkopf dazuladen ----------
+\input{kivitendobriefkopf}
 
-  Kunden-Nr:\hfill <%customernumber%>
-
-  Telefon:\hfill <%phone%>
-
-  Telefax:\hfill <%fax%>
+\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}
 
-  Ansprechpartner:\hfill <%employee%>
+% ---------- Datum und Nummern ----------
+% Position unterhalb des Briefkopfs
+\vspace*{\vlogospacing}
+\renewcommand{\arraystretch}{0.9}
+\begin{minipage}[b]{177mm}
+\sperren{\textbf{Angebot Nr. \quonumber}}
+\hfill
+       \small
+       \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}}
+               \textbf{Seite} & {\thepage} von \pageref{LastPage}\\
+               \textbf{Datum} & \quodate \\
+               \nonemptyline{\textbf{Gültig bis} &}{\reqdate}
+               \textbf{Kunden Nr.} & \kundennummer\\
+               \textbf{Angebot Nr.} & \quonumber\\
+               \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
+wir bedanken uns für Ihre Anfrage und bieten Ihnen gemäß unserer Liefer- und Zahlungsbedingungen hiermit freibleibend die nachfolgenden Positionen an.
+\ifthenelse{\isempty{$(notes)$}}{}{
+      \newline
+      $(notes)$
+      }
+\vspace{5mm}
 
-\vspace*{0.5cm}
+% ---------- 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 rechts schieben  ----------
 \hfill
-
-\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 \\
-  <%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{<%ordtotal%> \euro }
-\end{tabularx}
-\hrule
-
-\vspace{0.2cm}
-
-Wir danken für Ihre Anfrage und hoffen, Ihnen hiermit ein interessantes Angebot gemacht zu haben. Das Angebot ist
-  gültig bis zum <%reqdate%>. Sollten Sie noch Fragen oder Änderungswünsche haben, können Sie uns gerne jederzeit
-  unter den oben genannten Telefonnummern oder eMail-Adressen kontaktieren. \\
-  Bei der Durchführung des Auftrags gelten unsere AGB, die wir Ihnen gerne zuschicken. \\ \\
-  Mit freundlichen Grüßen, \\ \\ \\
-  <%employee_name%>
-
-
-
+\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
+   {\textbf{Gesamtbetrag:}} & \bfseries\numprint{$(ordtotal)$} & \textbf{\currency}\\
+   \bottomrule
+\end{tabular}
+}
+% ---------- Nachbemerkung mit variablem Abstand ----------
+\vfil
+$(if reqdate)$
+\vspace*{0.3em}
+\textbf{Das Angebot ist gültig bis zum \reqdate.}\\
+\vfil
+$(end)$
+$(if payment_terms)$
+\textbf{Zahlungsbedingungen:}\hfill\parbox[t]{0.7\textwidth}{$(payment_terms)$}\\
+\vfil
+$(end)$
+% ---------- 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 ----------
+\vspace*{0.5em}
+\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
+\vspace*{0.5em}
+\parbox{\textwidth}{
+Sollten Sie Fragen zu unserem Angebot haben, steht Ihnen \employeename \ per Telefon (\employeetel) oder per E-Mail (\employeeemail) gerne zur Verfügung.
+Wir hoffen, dass unser Angebot Ihre Zustimmung findet und würden uns freuen Ihren Auftrag zu erhalten.\par
+\vspace{1.5\baselineskip}
+Mit freundlichen Grüßen\\ \vfil
+\employeename
+}% Ende parbox
+%\vspace{1.5\baselineskip}
+\vfill
+\textbf{Wollen Sie direkt bestellen?}\\[1.2em]
+\small{Machen Sie durch Ihren Stempel und Ihre Unterschrift unser Angebot Nr. \quonumber \ zum Auftrag.}\\[1.2em]
+\vspace{2.5\baselineskip}\\
+\rule{20em}{0.1pt}\\
+\hspace*{5em}Datum, Unterschrift \\
+\vfill
+\footnotesize
+Es gelten unsere Liefer- und Zahlungsbedingungen, die wir Ihnen auf Wunsch gerne zukommen lassen.
 \end{document}
-
diff --git a/templates/print/Standard/statement.html b/templates/print/Standard/statement.html
deleted file mode 100644 (file)
index 37e612c..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-
-<body bgcolor=ffffff>
-
-<table width=100%>
-  <tr>
-    <td width=10>&nbsp;</td>
-    <td>
-      <table width=100%>
-       <tr>
-         <td>
-           <h4>
-           <%company%>
-           <br><%address%>
-           </h4>
-         </td>
-         <th></th>
-         <td align=right>
-         <h4>
-         Tel: <%tel%>
-         <br>Fax: <%fax%>
-         </h4>
-         </td>
-       </tr>
-       <tr>
-         <th colspan=3><h4>S T A T E M E N T</h4></th>
-       </tr>
-       <tr>
-         <td colspan=3 align=right><%statementdate%></td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td>
-      <table width=100%>
-       <tr valign=top>
-         <td><%name%>
-         <br><%street%>
-         <br><%zipcode%>
-         <br><%city%>
-         <br><%country%>
-         <br>
-<%if customerphone%>
-         <br>Tel: <%customerphone%>
-<%end customerphone%>
-<%if customerfax%>
-         <br>Fax: <%customerfax%>
-<%end customerfax%>
-<%if email%>
-         <br><%email%>
-<%end email%>
-         </td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr height=10></tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td>
-      <table width=100%>
-        <tr>
-         <th align=left>Invoice #</th>
-         <th width=15%>Date</th>
-         <th width=15%>Due</th>
-         <th width=10%>Current</th>
-         <th width=10%>30</th>
-         <th width=10%>60</th>
-         <th width=10%>90+</th>
-       </tr>
-<%foreach invnumber%>
-       <tr>
-         <td><%invnumber%></td>
-         <td><%invdate%></td>
-         <td><%duedate%></td>
-         <td align=right><%c0%></td>
-         <td align=right><%c30%></td>
-         <td align=right><%c60%></td>
-         <td align=right><%c90%></td>
-       </tr>
-<%end invnumber%>
-        <tr>
-         <td colspan=7><hr size=1></td>
-       </tr>
-       <tr>
-         <td>&nbsp;</td>
-         <td>&nbsp;</td>
-         <td>&nbsp;</td>
-         <th align=right><%c0total%></td>
-         <th align=right><%c30total%></td>
-         <th align=right><%c60total%></td>
-         <th align=right><%c90total%></td>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr height=10></tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td align=right>
-      <table width=50%>
-        <tr>
-         <th>Total Outstanding</th>
-          <th align=right><%total%></th>
-       </tr>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td><hr noshade></td>
-  </tr>
-  <tr>
-    <td>&nbsp;</td>
-    <td>Please make check payable to <b><%company%></b>.
-    </td>
-  </tr>
-  <tr height=20></tr>
-</table>
-
index 679f6bd..f98f1a5 100644 (file)
-\documentclass[10pt, oneside]{scrartcl}
-\usepackage[utf8]{inputenc}
-\usepackage{german}
-\usepackage{tabularx}
-\usepackage{xspace}
-\usepackage{ifthen}
-\usepackage{eso-pic}
-\usepackage{longtable}
-\usepackage{eurosym}
-
-\setlength{\voffset}{-0.3cm}
-\setlength{\hoffset}{-2.2cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{2cm}
-%\setlength{\evensidemargin}{2cm}
-\setlength{\textwidth}{16.4cm}
-% \setlength{\textwidth}{13.4cm}
-\setlength{\textheight}{23.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\setlength{\tabcolsep}{0cm}
-
-\renewcommand{\baselinestretch}{1}
+% zahlungserinnerung.tex
+% Zahlungserinnerung Verkauf
+% Überarbeitet von Norbert Simon, n.simon@linet-services.de
+% Version 2.1 vom 21.Oktober 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=$( )$
+% ----------
 
-\begin{document}
-\pagestyle{empty}
-\fontfamily{cmss}\fontsize{10pt}{10pt}\fontseries{m}\selectfont
+\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 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}{tabelle$(employee_login)$.tex}
+
+% ---------- Eigene Bankverbindung falls nicht im Briefkopf gesetzt ----------
+% \newcommand{\companybank}{$(company_bank)$}
+% \newcommand{\companybankcode}{$(company_bank_code)$}
+% \newcommand{\companyaccountnumber}{$(company_account_number)$}
 
-% \vspace*{5cm}
+% ---------- 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]
+}
 
-<%name%>
+% ---------- 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}{Rechnungsnummer: \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
+\newcommand{\dunningid}{$(dunning_id)$}        % ID Zahlungserinnerung
+\newcommand{\dunningdate}{$(dunning_date)$}    % Datum der Zahlungserinnerung
 
-% \ifthenelse{\equal{<%cp_name%>}{}}{}{z.Hd. <%cp_name%>}
+% ---------- 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)$}
 
-<%street%>
+% ---------- Währungszeichen ----------
+\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\$}{}
 
-<%zipcode%> <%city%>
+% ---------- 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
 
-\begin{flushright}<%dunning_date%>\end{flushright}
+% ---------- Firmenlogo nur erste Seite ----------
+\thispagestyle{briefkopf}
 
-\vspace*{2.5cm} %\\
-\large
-\textbf{Zahlungserinnerung} \\ \\ \\
+% ---------- Datum und Nummern ----------
+% Position unterhalb des Briefkopfs
+\vspace*{\vlogospacing}
+\renewcommand{\arraystretch}{0.9}
+\begin{minipage}[b]{177mm}
+\sperren{\textbf{Zahlungserinnerung}}
+       \hfill
+       \small
+       \begin{tabular}[b]{r@{\hspace{2mm}}p{\hlogospacing}}
+               \textbf{Seite} & {\thepage} von \pageref{LastPage}\\
+               \textbf{Datum} & \dunningdate \\
+               \textbf{Kunden Nr.} & \kundennummer\\
+               \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
-Sehr geehrte Damen und Herren, \\ \\ \\
-man kann seine Augen nicht überall haben - offensichtlich haben Sie übersehen, die folgenden Rechnungen zu begleichen: \\
+% ---------- Begrüßung und Bemerkungen ----------
+\vspace{ 5mm}
+\lettergreeting
+man kann seine Augen nicht überall haben -- offensichtlich haben Sie übersehen, die folgenden Rechnungen zu begleichen: \\
 \vspace{0.5cm} \\
-\begin{tabularx}{\textwidth}{l@{\hspace*{2cm}}X@{\hspace*{0.5cm}}r}
+\setlength{\tabcolsep}{0mm}
+%\begin{tabularx}{\textwidth}{l@{\hspace*{2cm}}X@{\hspace*{0.5cm}}r}
+\begin{tabularx}{\textwidth}{l@{\extracolsep\fill}c@{\extracolsep\fill}r}
   \textbf{Rechnungsnummer} & \textbf{Rechnungsdatum} & \textbf{Rechnungsbetrag} \\ \hline && \\
-  <%foreach dn_invnumber%>
-    <%dn_invnumber%> & <%dn_transdate%> & <%dn_amount%> \euro \\[0.1cm]
-  <%end dn_invnumber%>
+  $(foreach dn_invnumber)$
+    $(dn_invnumber)$ & $(dn_transdate)$ & $(dn_amount)$ \euro \\[0.1cm]
+  $(end dn_invnumber)$
 \end{tabularx}
-\vspace*{0.5cm} \\
-Wir bitten Sie, diese bis zum <%dunning_duedate%> zu begleichen. \\ \\ \\
-Bitte beachten Sie, dass wir Zahlungseingänge nur bis zum <%dunning_date%> berücksichtigen konnten. Sollten Sie zwischenzeitlich bezahlt haben, betrachten Sie diese Zahlungserinnerung bitte als gegenstandslos. \\ \\ \\
-Mit freundlichen Grüßen, \\ \\ \\ \\
-<%employee_name%>
+\vspace*{2em} \\
+Wir bitten Sie, diese bis zum $(dunning_duedate)$ zu begleichen.\\%[1em plus 3em minus 1em]
+\vspace*{1em} \\
+Zahlungseingänge wurden bis zum $(dunning_date)$ berücksichtigt.
+Sollten Sie zwischenzeitlich bezahlt haben, betrachten Sie diese
+Zahlungserinnerung bitte als gegenstandslos.\\%[1em plus 3em minus 1em]
+\vspace*{2em} \\
+Sollte es triftige Gründe für die Zahlungsverzögerung geben, setzen Sie sich
+bitte mit uns in Verbindung, damit wir gemeinsam eine Lösung finden.\\ %[1em plus 3em minus 1em]
+\vspace*{2em} \\
+Mit freundlichen Grüßen\\ %[1em plus 3em minus 1em]
+\vspace*{1em} \\
+$(employee_name)$
 \end{document}
diff --git a/templates/print/Standard/zahlungserinnerung_invoice.tex b/templates/print/Standard/zahlungserinnerung_invoice.tex
deleted file mode 100644 (file)
index bc5cfa6..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-\documentclass[10pt, oneside]{scrartcl}
-\usepackage[utf8]{inputenc}
-\usepackage{german}
-\usepackage{tabularx}
-\usepackage{xspace}
-\usepackage{ifthen}
-\usepackage{eso-pic}
-\usepackage{longtable}
-\usepackage{eurosym}
-
-\setlength{\voffset}{-0.3cm}
-\setlength{\hoffset}{-2.2cm}
-\setlength{\topmargin}{0cm}
-\setlength{\headheight}{0.5cm}
-\setlength{\headsep}{1cm}
-\setlength{\topskip}{0pt}
-\setlength{\oddsidemargin}{2cm}
-%\setlength{\evensidemargin}{2cm}
-\setlength{\textwidth}{16.4cm}
-% \setlength{\textwidth}{13.4cm}
-\setlength{\textheight}{23.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\setlength{\tabcolsep}{0cm}
-
-\renewcommand{\baselinestretch}{1}
-
-\begin{document}
-\pagestyle{empty}
-\fontfamily{cmss}\fontsize{10pt}{10pt}\fontseries{m}\selectfont
-
-<%name%>
-
-<%street%>
-
-<%zipcode%> <%city%>
-
-\begin{flushright}<%invdate%>\end{flushright}
-
-\vspace*{2.5cm}
-
-\large
-\textbf{Rechnung <%invnumber%>}
-
-\vspace*{1cm}
-
-\normalsize
-Sehr geehrte Damen und Herren,
-
-\vspace*{1cm}
-Hiermit stellen wir Ihnen zu Mahnung <%dunning_id%> die folgenden Posten in Rechnung:
-
-\vspace*{0.5cm}
-
-\begin{tabularx}{\textwidth}{Xr}
-  \textbf{Posten} & \multicolumn{1}{l}{\textbf{Betrag}}\\
-  \hline
-  Mahngebühren & <%fee%> EUR \\
-  Zinsen & <%interest%> EUR \\
-  \cline{2-2}
-  Gesamtsumme & <%invamount%> EUR\\
-\end{tabularx}
-
-\vspace*{0.5cm}
-
-Bitte begleichen Sie diese Forderung bis zum <%duedate%>.
-
-\vspace*{0.5cm}
-
-Mit freundlichen Grüßen,
-
-\vspace*{2cm}
-<%employee_name%>
-
-\end{document}
diff --git a/templates/print/Standard/zwischensumme.sty b/templates/print/Standard/zwischensumme.sty
new file mode 100644 (file)
index 0000000..b733fb3
--- /dev/null
@@ -0,0 +1,188 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Makros zur Berechnung und Ausgabe einer Zwischensumme bei langen Tabellen
+% Der Hack der longtable Ausgabe ist von Heiko Oberdiek, das Paket zref auch.
+%                            ---<(kaimartin)>---(August, 2007)
+%Angepasst an 2.6.3 von n.simon@linet-services.de, 15. November 2011
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Diese Datei steht unter der GPL-Lizenz, Version 3
+% siehe http://www.gnu.de/licenses/gpl-3.0.html
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\usepackage{etex}           % Damit Marken verwendet werden koennen
+\usepackage[savepos,user]{zref}  % Um die jeweils aktuelle Position zu merken
+\usepackage{fltpoint}       % Rechnen mit Komma-Zahlen
+\usepackage{numprint}       % Zahlen formatiert ausgeben
+\usepackage{eurosym}        % Das Euro-Zeichen
+\usepackage{calc}           % Fuer das Makro \widthof{}
+
+% Globale Einstellungen fuer numprint
+\nprounddigits{2}   % Zwei Nachkommasstellen
+%% ",00" nicht durch ",--" ersetzen
+\npprintnull
+
+\fpDecimalSign{.}
+
+\newcommand{\lxNumberFormatGermanInput}{\makeatletter\renewcommand*\nprt@ignorelist{.}\renewcommand*\nprt@dotlist{,}\makeatother}
+\newcommand{\lxNumberFormatEnglishInput}{\makeatletter\renewcommand*\nprt@ignorelist{,}\renewcommand*\nprt@dotlist{.}\makeatother}
+
+\newcommand{\lxNumberFormatGerman}{\lxNumberFormatGermanInput\npthousandsep{.}\npdecimalsign{,}}
+\newcommand{\lxNumberFormatGermanNoSeparator}{\lxNumberFormatGermanInput\npthousandsep{}\npdecimalsign{,}}
+
+\newcommand{\lxNumberFormatEnglish}{\lxNumberFormatEnglishInput\npthousandsep{,}\npdecimalsign{.}}
+\newcommand{\lxNumberFormatEnglishNoSeparator}{\lxNumberFormatEnglishInput\npthousandsep{}\npdecimalsign{.}}
+
+\newcommand{\lxNumberFormatToUse}{\lxNumberFormatGerman}
+
+% Paketoptionen: Dezimaltrennzeichen und Tausendertrennzeichen
+\DeclareOption{german}{\renewcommand{\lxNumberFormatToUse}{\lxNumberFormatGerman}}
+\DeclareOption{germannosep}{\renewcommand{\lxNumberFormatToUse}{\lxNumberFormatGermanNoSeparator}}
+\DeclareOption{english}{\renewcommand{\lxNumberFormatToUse}{\lxNumberFormatEnglish}}
+\DeclareOption{englishnosep}{\renewcommand{\lxNumberFormatToUse}{\lxNumberFormatEnglishNoSeparator}}
+
+\ProcessOptions
+
+\lxNumberFormatToUse
+
+%%%%%%%%%%%%%%Befehle zur Berechnung der Zwischensumme%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand*\laufsumme{0}
+\newcommand*\resetlaufsumme{\global\def\laufsumme{0}}
+\newcommand*\addlaufsumme[1]{\fpAdd{\laufsumme}{\laufsumme}{#1}%
+                                 \global\let\laufsumme\laufsumme}
+\newcommand*\printwert[1]{%
+\lxNumberFormatToUse%
+\lxNumberFormatEnglishInput%
+\numprint{#1}%
+\lxNumberFormatToUse}
+
+%%%%%%%%Plaintex-Hack fuer Positionierung der Zwischensummen%%%%%%%%%%%%%%%%%%
+
+
+\makeatletter  % Das at-Zeichen in Variablen zulassen
+
+% Variablen bereit stellen
+  \newdimen\drx
+  \newdimen\dry
+
+  \newmarks\ltm@marks
+  \def\ltm@setmarks#1{%
+    \marks\ltm@marks{#1}%
+    }
+  \def\ltm@getmarks{%
+    \botmarks\ltm@marks
+    }
+
+
+% Den aktuellen Wert der Laufsumme berechnen und merken
+\newcommand*{\Wert}[1]{%
+  \addlaufsumme{#1}%  Den uebergebenen Wert zur Laufsumme addieren
+  \expandafter\ltm@setmarks\expandafter{\laufsumme}% Die Laufsumme merken
+}
+
+% Merken der aktuellen Position
+\newcommand*{\MarkZwsumPos}{%
+  \leavevmode
+     \zsavepos{zwsumpos\thepage}%
+     \zrefused{zwsumpos\thepage}%
+}
+
+\newcommand*{\MarkUebertrPos}{%
+  \leavevmode
+     \zsavepos{uebertrpos\thepage}%
+     \zrefused{uebertrpos\thepage}%
+}
+
+
+% Ausgabe der Zwischensumme
+\def\ltm@insertfoot#1{%
+    \vbox to\z@{%
+      \vss
+      \hb@xt@\z@{%
+        \color@begingroup
+           \zsavepos{tabende\thepage}%   % Die aktuelle Position merken
+           \drx=0sp
+           \dry=0sp
+           % Die aktuelle Position abziehen und die gemerkte addieren
+           \advance \drx by -\zposx{tabende\thepage}sp
+           \advance \drx by \zposx{zwsumpos\thepage}sp
+           \advance \dry by -\zposy{tabende\thepage}sp
+           \advance \dry by \zposy{zwsumpos\thepage}sp
+           \smash{\kern\drx\raise\dry%
+             \hbox{\makebox[0cm][r]{Zwischensumme:\hspace*{2em}\printwert{#1} \currency}}%
+             }% end smash
+        \color@endgroup
+      }%
+    }%
+}
+
+% Ausgabe des Uebertrags
+% Wie die Ausgabe der Zwischensumme, nur ohne neu gemerkte Position
+\def\ltm@inserthead#1{%
+    \vbox to\z@{%
+      \vss
+      \hb@xt@\z@{%
+        \color@begingroup
+           \zsavepos{tabstart\thepage}%   % Die aktuelle Position merken
+           \drx=0sp
+           \dry=0sp
+           % Die Position des Tabellenendes abziehen und zur gemerkten gehen
+           \advance \drx by -\zposx{tabstart\thepage}sp
+           \advance \drx by \zposx{uebertrpos\thepage}sp
+           \advance \dry by -\zposy{tabstart\thepage}sp
+           \advance \dry by \zposy{uebertrpos\thepage}sp
+           \smash{\kern\drx\raise\dry%
+             \hbox{\makebox[0cm][r]{Übertrag:\hspace*{2em}\printwert{#1} \currency}}%
+             }% end smash
+        \color@endgroup
+      }%
+    }%
+}
+
+\def\ltm@lastfoot{}
+\def\ltm@foot{\ltm@insertfoot{\ltm@getmarks}}
+\def\ltm@head{\ltm@inserthead{\ltm@getmarks}}
+
+
+% Ueberschreiben der Output-Routine von longtable
+\def\LT@output{%
+  \ifnum\outputpenalty <-\@Mi
+    \ifnum\outputpenalty > -\LT@end@pen
+      \LT@err{floats and marginpars %
+              not allowed in a longtable}\@ehc
+    \else
+      \setbox\z@\vbox{\unvbox\@cclv}%
+      \ifdim \ht\LT@lastfoot>\ht\LT@foot
+        \dimen@\pagegoal
+        \advance\dimen@-\ht\LT@lastfoot
+        \ifdim\dimen@<\ht\z@
+          \setbox\@cclv\vbox{%
+            \unvbox\z@\copy\LT@foot\ltm@foot\vss
+          }%
+          \@makecol
+          \@outputpage
+          \setbox\z@\vbox{\box\LT@head}%
+        \fi
+      \fi
+      \global\@colroom\@colht
+      \global\vsize\@colht
+      \vbox{%
+        \unvbox\z@
+        \box\ifvoid\LT@lastfoot
+          \LT@foot\ltm@foot
+        \else
+          \LT@lastfoot\ltm@lastfoot
+        \fi
+      }%
+    \fi
+  \else
+    \setbox\@cclv\vbox{%
+      \unvbox\@cclv\copy\LT@foot\ltm@foot\vss
+    }%
+    \@makecol
+    \@outputpage
+    \global\vsize\@colroom
+    \copy\LT@head\ltm@head
+  \fi
+}
+
+\makeatother    % Das at-Zeichen in Variablen wieder verbieten
+%%%%%%%%%%%%%%%%%%%%Ende plaintex-Hack%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%