Skip to content
Snippets Groups Projects
vl-versandauftrag.cls 13.2 KiB
Newer Older
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
\setcounter{errorcontextlines}{100}
\listfiles
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{vl-versandauftrag}
    [2015/04/22 v0.1c Dokumentenklasse (RN/PTB)]
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
\ProcessOptions\relax
\PassOptionsToPackage{paper=a4,pagesize}{typearea}
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed

\LoadClass[%
,fontsize=10pt
]{scrartcl}

\RequirePackage{ifxetex,ifluatex}
\newif\ifXeOrLua \XeOrLuafalse
\ifxetex\XeOrLuatrue\else\ifluatex\XeOrLuatrue\fi\fi

\ifXeOrLua% XeLaTeX oder luaLaTeX
  \RequirePackage{fontspec}
  \setsansfont[Ligatures=TeX]{TeXGyreHeros}
  \setmonofont{AnonymousPro-Regular}[%
    Extension = .ttf,
    BoldFont = AnonymousPro-Bold,
    ItalicFont = AnonymousPro-Italic.ttf,
    BoldItalicFont = AnonymousPro-BoldItalic,
    Scale     = MatchLowercase
  ]
\else
  \RequirePackage[utf8]{inputenc}
  \RequirePackage[T1]{fontenc}
  \RequirePackage{textcomp}
  \RequirePackage{lmodern}
  \RequirePackage{tgheros}
  \RequirePackage[ttdefault=true,scale=1.034]{AnonymousPro}
  %\RequirePackage[scaled=1.05]{zlmtt}% ist lmodern!
\fi

\setlength\textwidth{488bp}
\setlength\textheight{741bp}

\RequirePackage{eso-pic,pict2e,picture,xcolor,relsize,trimspaces}
\RequirePackage{babel}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\RequirePackage[babel=once,german=guillemets]{csquotes}
\AtEndOfClass{\shorthandon{"}}
\defineshorthand{"`}{\openautoquote}
\defineshorthand{"'}{\closeautoquote}
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed

\definecolor{thisGray}{gray}{0.881}

\let\vl@tempdima=\@ovxx
\let\vl@tempdimb=\@ovyy
\let\vl@tempdimc=\@ovdx

\newif\ifInland \Inlandtrue
\newcommand*\Inland[1]{\expandafter\csname Inland\trim@spaces{#1}\endcsname}
\newif\ifEU \EUtrue
\newcommand*\EU[1]{\expandafter\csname EU\trim@spaces{#1}\endcsname}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\newcounter{vl@Shippingtype} \setcounter{vl@Shippingtype}{0}
\newcommand*\ShippingType[1]{\setcounter{vl@Shippingtype}{#1}}
\newcommand*\vl@ShippingNo{}
\newcommand*\ShippingNo[1]{\xdef\vl@ShippingNo{\trim@spaces@noexp{#1}}}
\newcommand*\vl@ShippingName{}
\newcommand*\ShippingName[1]{\xdef\vl@ShippingName{\trim@spaces@noexp{#1}}}
\newcommand*\vl@ShippingContact{}
\newcommand*\ShippingContact[1]{\xdef\vl@ShippingContact{\trim@spaces@noexp{#1}}}
\newcommand*\vl@ShippingStreet{}
\newcommand*\ShippingStreet[1]{\xdef\vl@ShippingStreet{\trim@spaces@noexp{#1}}}
\newcommand*\vl@ShippingTown{}
\newcommand*\ShippingTown[1]{\xdef\vl@ShippingTown{\trim@spaces@noexp{#1}}}
\newcommand*\vl@ShippingZipcode{}
\newcommand*\ShippingZipcode[1]{\xdef\vl@ShippingZipcode{\trim@spaces@noexp{#1}}}
\newcommand*\vl@ShippingLand{}
\newcommand*\ShippingLand[1]{\xdef\vl@ShippingLand{\trim@spaces@noexp{#1}}}
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
\newcommand*\vl@costUnit{}
\newcommand*\CostUnit[1]{\xdef\vl@costUnit{\trim@spaces@noexp{#1}}}
\newcommand*\vl@financeUnit{}
\newcommand*\FinanceUnit[1]{\xdef\vl@financeUnit{\trim@spaces@noexp{#1}}}
\newcommand*\vl@account{}
\newcommand*\Account[1]{\xdef\vl@account{\trim@spaces@noexp{#1}}}
\newcommand*\vl@SAPNo{}
\newcommand*\SAPNo[1]{\xdef\vl@SAPNo{\trim@spaces@noexp{#1}}}
\newcommand*\vl@value{}
\newcommand*\Value[1]{\xdef\vl@value{\trim@spaces@noexp{#1}}}
\newcommand*\vl@DateOfArrival{}
\newcommand*\DateOfArrival[1]{\xdef\vl@DateOfArrival{\trim@spaces@noexp{#1}}}
\newcommand*\vl@WorkingGroup{}
\newcommand*\WorkingGroup[1]{\xdef\vl@WorkingGroup{\trim@spaces@noexp{#1}}}
\newcommand*\vl@TelefonExtension{}
\newcommand*\TelefonExtension[1]{\xdef\vl@TelefonExtension{\trim@spaces@noexp{#1}}}
\newcommand*\vl@Date{}
\newcommand*\Date[1]{\xdef\vl@Date{\trim@spaces@noexp{#1}}}
\newcommand*\vl@Content{}
\newcommand*\Content[1]{\xdef\vl@Content{#1}}
\newcommand*\vl@Purchaser{}
\newcommand*\Purchaser[1]{\xdef\vl@Purchaser{#1}}
Rolf Niepraschk's avatar
Rolf Niepraschk committed
\newcommand*\vl@Referee{}
\newcommand*\Referee[1]{\xdef\vl@Referee{#1}}
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed

Rolf Niepraschk's avatar
Rolf Niepraschk committed
\newcounter{vl@TransportType} \setcounter{vl@TransportType}{0}
\newcommand*\TransportType[1]{\setcounter{vl@TransportType}{#1}}
\newcounter{vl@ShippingCompany} \setcounter{vl@ShippingCompany}{4}
\newcommand*\ShippingCompany[1]{\setcounter{vl@ShippingCompany}{#1}}
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
\newcounter{vl@ShippingPayment} \setcounter{vl@ShippingPayment}{0}
\newcommand*\ShippingPayment[1]{\setcounter{vl@ShippingPayment}{#1}}

\newif\ifInflammable \Inflammablefalse
\newcommand*\LabelInflammable[1]{\expandafter\csname Inflammable\trim@spaces{#1}\endcsname}
\newif\ifGlas \Glasfalse
\newcommand*\LabelGlas[1]{\expandafter\csname Glas\trim@spaces{#1}\endcsname}
\newif\ifSensitive \Sensitivefalse
\newcommand*\LabelSensitive[1]{\expandafter\csname Sensitive\trim@spaces{#1}\endcsname}
\newif\ifTop \Topfalse
\newcommand*\LabelTop[1]{\expandafter\csname Top\trim@spaces{#1}\endcsname}
\newif\ifDangerous \Dangerousfalse
\newcommand*\LabelDangerous[1]{\expandafter\csname Dangerous\trim@spaces{#1}\endcsname}

\AtBeginDocument{%
  \mbox{}
}

\renewcommand*\familydefault{\sfdefault}
\def\huge{\@setfontsize\huge{20.08}{24.2}}
%%\def\large{\@setfontsize\large{11.62}{13.56}}
%%\def\tiny{\@setfontsize\tiny\@viipt\@viiipt}

\newcommand*\checkBox[2][0]{%
  \begingroup
    \fboxrule=0.7bp\fboxsep=0pt % 0.7bp (10pt)
    \raisebox{.3\height}{\fbox{\parbox[c][11bp]{11bp}{%
      \mbox{}\ifcase#1\or\centering\relscale{1.35}$\times$\fi%
    }}}%
  \endgroup\ifx\relax#2\relax\else~\raisebox{.2\height}{#2}\fi%
}

Rolf Niepraschk's avatar
Rolf Niepraschk committed
\newcommand*\vl@SelCompany[1]{
  \ifnum\c@vl@TransportType=0 %
    \ifnum\c@vl@ShippingCompany=#1 %
      1%
    \else
      0%
    \fi
  \else
    0%
  \fi
}

Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
\AddToShipoutPictureBG*{%
  \AtPageLowerLeft{%
    \linethickness{0.6bp}%
    \vl@tempdima=57bp %
    \vl@tempdimb=58bp %
    \put(\vl@tempdima,\vl@tempdimb){\framebox(\textwidth,\textheight){}}%
    \put(227bp,468bp){\textcolor{thisGray}{\rule{318bp}{129bp}}}%
    % dünne waagerechte Linien
    \put(\vl@tempdima,767bp){\line(1,0){\textwidth}}%
    \put(\vl@tempdima,739bp){\line(1,0){\textwidth}}%
    \put(227bp,597bp){\line(1,0){318bp}}%
    \put(\vl@tempdima,468bp){\line(1,0){\textwidth}}%
    \put(\vl@tempdima,417bp){\line(1,0){\textwidth}}%
    \put(\vl@tempdima,389bp){\line(1,0){\textwidth}}%
    \put(\vl@tempdima,361bp){\line(1,0){\textwidth}}%
    \put(\vl@tempdima,247bp){\line(1,0){\textwidth}}%
    \put(\vl@tempdima,205bp){\line(1,0){\textwidth}}%
    \put(\vl@tempdima,104bp){\line(1,0){\textwidth}}%
    \put(\vl@tempdima, 81bp){\line(1,0){\textwidth}}%
    % dünne senkrechte Linien
    \put(227bp,468bp){\line(0,1){299bp}}%
    \put(305bp,739bp){\line(0,1){60bp}}%
    \put(389bp,597bp){\line(0,1){170bp}}%
    \put(290bp,\vl@tempdimb){\line(0,1){83bp}}%
    \put(213bp,361bp){\line(0,1){56bp}}%
    \put(397bp,361bp){\line(0,1){56bp}}%
    \put(368bp,104bp){\line(0,1){37bp}}%
    % Feste Beschriftung
    \put(107bp,776bp){\textbf{\huge Versandauftrag}}%
    \put(321bp,786bp){\large Physikalisch-Technische Bundesanstalt}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
    \put(343bp,772bp){\large Abbestraße 2--12, 10587 Berlin}%
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
    \footnotesize
    \vl@tempdimc=758bp %
    \put( 62bp,\vl@tempdimc){Org.-Einheit, Sachbearbeiter}%
    \put(232bp,\vl@tempdimc){Telefon: 030/3481}%
    \put(310bp,\vl@tempdimc){Datum}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
    \put(395bp,\vl@tempdimc){Versandauftrag wurde ausgefüllt von}%
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
    \vl@tempdimc=728bp %
    \normalsize
    \put(62bp,\vl@tempdimc){\textbf{Versand per:}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \put(62bp,709bp){\checkBox[\ifnum\c@vl@TransportType=0 1\else0\fi]%
        {\textbf{Transportunternehmen}}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
        \put(77bp,689bp){\checkBox[\vl@SelCompany{0}]{Logiline}}%
        \put(77bp,675bp){\checkBox[\vl@SelCompany{1}]{TNT}}%
        \put(77bp,661bp){\checkBox[\vl@SelCompany{2}]{UPS}}%
        \put(77bp,647bp){\checkBox[\vl@SelCompany{3}]{FedEx}}%
        \put(77bp,633bp){\checkBox[\vl@SelCompany{4}]{Post/DHL Express (unfreier}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
          \put(94bp,622bp){Versand nur ins Inland)}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
        \put(77bp,606bp){\checkBox[\vl@SelCompany{5}]{}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
        \put(62bp,543bp){\textbf{Kundennr.:}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
          \ifnum\c@vl@TransportType=0 ~\texttt{\vl@ShippingNo}\fi}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \put(62bp,518bp){\checkBox[\ifnum\c@vl@TransportType=1 1\else0\fi]%
        {\textbf{Abholung wird vom}}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
        \put(77bp,507bp){\textbf{Empfänger veranlasst}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \put(62bp,487bp){\checkBox[\ifnum\c@vl@TransportType=2 1\else0\fi]%
        {\textbf{PTB-Fahrdienst/Kurier}}}%
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
    \put(233bp,\vl@tempdimc){\textbf{Versand nach:}}%
      \put(233bp,709bp){\checkBox[\ifInland 1\else0\fi]{Inland}}%
      \put(233bp,689bp){\checkBox[\ifInland 0\else1\fi]{Ausland}}%
      \put(249bp,669bp){\checkBox[\ifInland 0\else\ifEU 1\else0\fi\fi]{EU}}%
      \put(249bp,655bp){\checkBox[\ifInland 0\else\ifEU 0\else1\fi\fi]{andere}}%
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
      \put(233bp,625bp){(ggf. Proformarechnung beifügen,}%
      \put(233bp,614bp){erhältlich bei Z.1532~--}%
      \put(233bp,603bp){Fr. Hirschauer, Tel.~7372)}%
    \put(396bp,\vl@tempdimc){\textbf{Zustellungsart:}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \put(396bp,709bp){\checkBox[\ifnum\c@vl@Shippingtype=0 1\else0\fi]%
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
        {Standard \scriptsize(2--3 Tage)}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \put(396bp,689bp){\checkBox[\ifnum\c@vl@Shippingtype=1 1\else0\fi]%
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
        {Übernacht-Express}}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \put(396bp,667bp){\checkBox[\ifnum\c@vl@Shippingtype=2 1\else0\fi]%
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
        {andere:}}%
    \put(233bp,580bp){\textbf{\large Reparatur}~(nur bei Bedarf ausfüllen)}%
      \put(233bp,558bp){\checkBox{\textbf{Reparaturschein liegt bei}}}%
      \put(233bp,543bp){\textbf{Lieferscheinnummer:}}%
      \put(233bp,518bp){Mit der Bitte um}%
      \put(233bp,498bp){\checkBox{\textbf{Reparatur im Rahmen der Gewährleistung}}}%
      \put(233bp,478bp){\checkBox{\textbf{Reparaturkosten-Voranschlag}}}%
    \put(62bp,453bp){Angaben zur Zahlungsart:}%
      \put(62bp,433bp){\checkBox[\ifnum\c@vl@ShippingPayment=0 1\else0\fi]%
        {\textbf{frei}~(Kosten trägt die PTB)}}%
      \put(220bp,433bp){\checkBox[\ifnum\c@vl@ShippingPayment=1 1\else0\fi]%
        {Kosten werden vom Laboratorium}}%
        \put(236bp,423bp){per \textbf{Kostenbescheid} eingezogen}%
      \put(403bp,433bp){\checkBox[\ifnum\c@vl@ShippingPayment=2 1\else0\fi]%
        {\textbf{unfrei}~(Empfänger zahlt)}}%
    \footnotesize
    \vl@tempdima=62bp %
    \vl@tempdimc=408bp %
    \put(\vl@tempdima,\vl@tempdimc){Kostenstelle}%
    \put(218bp,\vl@tempdimc){Finanzstelle}%
    \put(401bp,\vl@tempdimc){Titel}%
    \vl@tempdimc=380bp %
    \put(\vl@tempdima,\vl@tempdimc){ggf. SAP-Auftragsnummer}%
    \put(218bp,\vl@tempdimc){Wertangabe}%
    \put(401bp,\vl@tempdimc){Ankunftstag (falls notwendig)}%
    \normalsize
    \vl@tempdimc=350bp %
    \put(\vl@tempdima,\vl@tempdimc){Empfänger (Name, Straße, PLZ, Ort) Zustellungen
      an ein Postfach sind nicht möglich!!!}%
    \vl@tempdimc=339bp %
    \put(\vl@tempdima,\vl@tempdimc){\textbf{Bei allen Sendungen bitte Telefonnummer
      und ggf. die E-Mail Adresse angeben!}}%
    \put(\vl@tempdima,237bp){Inhalt:}%
    \put(\vl@tempdima,194bp){Sendung mit folgendem \textbf{Warnhinweis} versehen:}
      \put(\vl@tempdima,173bp){\checkBox[\ifInflammable 1\else 0\fi]{Feuergefährlich!}}%
      \put(167bp,173bp){\checkBox[\ifGlas 1\else 0\fi]{Vorsicht Glas!}}%
      \put(258bp,173bp){\checkBox[\ifSensitive 1\else 0\fi]{Vorsicht! Empfindliche}}%
         \put(274bp,163bp){Elektrogeräte}%
      \put(386bp,173bp){\checkBox[\ifTop 1\else 0\fi]{Oben}}%
        \put(402bp,163bp){Nicht stürzen!}%
      \put(478bp,173bp){\checkBox[\ifDangerous 1\else 0\fi]{Gefahrgut}}%
    \put(193bp,145bp){{\large\textbf{Nur von der Versandstelle auszufüllen}}}
    \footnotesize
    \vl@tempdimc=132bp %
    \put(\vl@tempdima,\vl@tempdimc){Verpackung}%
      \begingroup
      \vl@tempdimc=111bp %
      \put(\vl@tempdima,\vl@tempdimc){\line(1,0){26bp}}%
      \large
      \put(105bp,\vl@tempdimc){\checkBox{Karton}}%
      \put(164bp,\vl@tempdimc){\checkBox{Kiste}}%
      \put(221bp,\vl@tempdimc){\checkBox{Palette}}%
      \endgroup
    \put(295bp,\vl@tempdimc){Gewicht}%
      \put(351bp,112bp){{\large kg}}%
    \put(374bp,\vl@tempdimc){Bearbeitet von}%
    \vl@tempdimc=94bp %
    \put(\vl@tempdima,\vl@tempdimc){Eingang bei Z.1533 am}%
    \put(295bp,\vl@tempdimc){Verpackt durch}%
    \vl@tempdimc=72bp %
    \put(\vl@tempdima,\vl@tempdimc){Abgesandt am}%
    \put(295bp,\vl@tempdimc){Unterschrift Z.1533}%
    % ...
    % Variable Beschriftung
    %
    \vl@tempdima=62bp %
    \begingroup
      \ttfamily\normalsize
      \vl@tempdimc=744bp % -14bp
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      \put(\vl@tempdima,\vl@tempdimc){\vl@WorkingGroup, \vl@Referee}%
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
      \put(395bp,\vl@tempdimc){\vl@Purchaser}%
      \put(232bp,\vl@tempdimc){\vl@TelefonExtension}%
      \put(310bp,\vl@tempdimc){\vl@Date}%
      \vl@tempdimc=394bp % -14bp
      \put(\vl@tempdima,\vl@tempdimc){\vl@costUnit}%
      \put(218bp,\vl@tempdimc){\vl@financeUnit}%
      \put(401bp,\vl@tempdimc){\vl@account}%
      \vl@tempdimc=366bp %
      \put(\vl@tempdima,\vl@tempdimc){\vl@SAPNo}%
      \put(218bp,\vl@tempdimc){\vl@value}%
      \put(401bp,\vl@tempdimc){\vl@DateOfArrival}%
Rolf Niepraschk's avatar
Rolf Niepraschk committed
      % TODO: mehrzeilige Ausgabe vorsehen?
      \put(\vl@tempdima,320bp){\vl@ShippingName}%
      \put(\vl@tempdima,310bp){\vl@ShippingContact}%
      \put(\vl@tempdima,300bp){\vl@ShippingStreet}%
      \put(\vl@tempdima,290bp){\vl@ShippingZipcode~\vl@ShippingTown}%
      \put(\vl@tempdima,280bp){\vl@ShippingLand}%
Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
      %
      \put(\vl@tempdima,225bp){\parbox[t]{\dimexpr\textwidth-1em}{\vl@Content}}
    \endgroup
  }
  \AtPageLowerLeft{%
    \put(57bp,58bp){%
      \linethickness{1.4bp}%
      \framebox(\textwidth,99bp){}%
      \put(0,83bp){\line(-1,0){\textwidth}}%
    }
  }
}%

% TODO: Evtl. auslagern in "vl-versandauftrag-8bit.clo"
\DeclareUnicodeCharacter{202F}{\,}% 'NARROW NO-BREAK SPACE'
\DeclareUnicodeCharacter{2009}{\,\hspace{0pt}}% 'THIN SPACE'
\DeclareUnicodeCharacter{00AD}{\-}% 'SOFT HYPHEN'

Rolf Niepraschk's avatar
...
Rolf Niepraschk committed
\emergencystretch=1em %
\pagestyle{empty}

\endinput