Skip to content
Snippets Groups Projects
Commit c686b68d authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

setcommand

parent 9db420e9
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
\listfiles \listfiles
\NeedsTeXFormat{LaTeX2e}[1999/12/01] \NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{vl-versandauftrag} \ProvidesClass{vl-versandauftrag}
[2015/04/23 v0.1f Dokumentenklasse (RN/PTB)] [2015/04/24 v0.1g Dokumentenklasse (RN/PTB)]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
\ProcessOptions\relax \ProcessOptions\relax
\PassOptionsToPackage{paper=a4,pagesize}{typearea} \PassOptionsToPackage{paper=a4,pagesize}{typearea}
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
\let\vl@tempdimc=\@ovdx \let\vl@tempdimc=\@ovdx
\newcommand\vl@tempa{} \newcommand\vl@tempa{}
\newcommand*\vl@setboolean[3][false]{% #1=default (opt.), #2=ifXXX, #3=value \newcommand*\vl@setboolean[3][false]{% #1=default (opt.), #2=if, #3=value
\edef\vl@tempa{\trim@spaces{#3}}% \edef\vl@tempa{\trim@spaces{#3}}%
\expandafter\csname #2\ifx\@empty\vl@tempa #1\else\vl@tempa\fi\endcsname \expandafter\csname #2\ifx\@empty\vl@tempa #1\else\vl@tempa\fi\endcsname
} }
...@@ -48,48 +48,54 @@ ...@@ -48,48 +48,54 @@
\setcounter{#2}{\ifx\@empty\vl@tempa #1\else\vl@tempa\fi}% \setcounter{#2}{\ifx\@empty\vl@tempa #1\else\vl@tempa\fi}%
} }
\newcommand*\vl@setcommand[3][]{% #1=default (opt.), #2=macro, #3=value
\edef\vl@tempa{\trim@spaces@noexp{#3}}%
\expandafter\protected@xdef\csname #2\endcsname{%
\ifx\@empty\vl@tempa #1\else\vl@tempa\fi}%
}
\newif\ifInland \Inlandtrue \newif\ifInland \Inlandtrue
\newcommand*\Inland[1]{\vl@setboolean{Inland}{#1}} \newcommand*\Inland[1]{\vl@setboolean{Inland}{#1}}
\newif\ifEU \EUtrue \newif\ifEU \EUtrue
\newcommand*\EU[1]{\vl@setboolean{EU}{#1}} \newcommand*\EU[1]{\vl@setboolean{EU}{#1}}
\newcommand*\vl@ShippingNo{} \newcommand*\vl@ShippingNo{}
\newcommand*\ShippingNo[1]{\xdef\vl@ShippingNo{\trim@spaces@noexp{#1}}} \newcommand*\ShippingNo[1]{\vl@setcommand{vl@ShippingNo}{#1}}
\newcommand*\vl@ShippingName{} \newcommand*\vl@ShippingName{}
\newcommand*\ShippingName[1]{\xdef\vl@ShippingName{\trim@spaces@noexp{#1}}} \newcommand*\ShippingName[1]{\vl@setcommand{vl@ShippingName}{#1}}
\newcommand*\vl@ShippingContact{} \newcommand*\vl@ShippingContact{}
\newcommand*\ShippingContact[1]{\xdef\vl@ShippingContact{\trim@spaces@noexp{#1}}} \newcommand*\ShippingContact[1]{\vl@setcommand{vl@ShippingContact}{#1}}
\newcommand*\vl@ShippingStreet{} \newcommand*\vl@ShippingStreet{}
\newcommand*\ShippingStreet[1]{\xdef\vl@ShippingStreet{\trim@spaces@noexp{#1}}} \newcommand*\ShippingStreet[1]{\vl@setcommand{vl@ShippingStreet}{#1}}
\newcommand*\vl@ShippingTown{} \newcommand*\vl@ShippingTown{}
\newcommand*\ShippingTown[1]{\xdef\vl@ShippingTown{\trim@spaces@noexp{#1}}} \newcommand*\ShippingTown[1]{\vl@setcommand{vl@ShippingTown}{#1}}
\newcommand*\vl@ShippingZipcode{} \newcommand*\vl@ShippingZipcode{}
\newcommand*\ShippingZipcode[1]{\xdef\vl@ShippingZipcode{\trim@spaces@noexp{#1}}} \newcommand*\ShippingZipcode[1]{\vl@setcommand{vl@ShippingZipcode}{#1}}
\newcommand*\vl@ShippingLand{} \newcommand*\vl@ShippingLand{}
\newcommand*\ShippingLand[1]{\xdef\vl@ShippingLand{\trim@spaces@noexp{#1}}} \newcommand*\ShippingLand[1]{\vl@setcommand{vl@ShippingLand}{#1}}
\newcommand*\vl@costUnit{} \newcommand*\vl@CostUnit{}
\newcommand*\CostUnit[1]{\xdef\vl@costUnit{\trim@spaces@noexp{#1}}} \newcommand*\CostUnit[1]{\vl@setcommand{vl@CostUnit}{#1}}
\newcommand*\vl@financeUnit{} \newcommand*\vl@FinanceUnit{}
\newcommand*\FinanceUnit[1]{\xdef\vl@financeUnit{\trim@spaces@noexp{#1}}} \newcommand*\FinanceUnit[1]{\vl@setcommand{vl@FinanceUnit}{#1}}
\newcommand*\vl@account{} \newcommand*\vl@Account{}
\newcommand*\Account[1]{\xdef\vl@account{\trim@spaces@noexp{#1}}} \newcommand*\Account[1]{\vl@setcommand{vl@Account}{#1}}
\newcommand*\vl@SAPNo{} \newcommand*\vl@SAPNo{}
\newcommand*\SAPNo[1]{\xdef\vl@SAPNo{\trim@spaces@noexp{#1}}} \newcommand*\SAPNo[1]{\vl@setcommand{vl@SAPNo}{#1}}
\newcommand*\vl@value{} \newcommand*\vl@Value{}
\newcommand*\Value[1]{\xdef\vl@value{\trim@spaces@noexp{#1}}} \newcommand*\Value[1]{\vl@setcommand{vl@Value}{#1}}
\newcommand*\vl@DateOfArrival{} \newcommand*\vl@DateOfArrival{}
\newcommand*\DateOfArrival[1]{\xdef\vl@DateOfArrival{\trim@spaces@noexp{#1}}} \newcommand*\DateOfArrival[1]{\vl@setcommand{vl@DateOfArrival}{#1}}
\newcommand*\vl@WorkingGroup{} \newcommand*\vl@WorkingGroup{}
\newcommand*\WorkingGroup[1]{\xdef\vl@WorkingGroup{\trim@spaces@noexp{#1}}} \newcommand*\WorkingGroup[1]{\vl@setcommand{vl@WorkingGroup}{#1}}
\newcommand*\vl@TelefonExtension{} \newcommand*\vl@TelefonExtension{}
\newcommand*\TelefonExtension[1]{\xdef\vl@TelefonExtension{\trim@spaces@noexp{#1}}} \newcommand*\TelefonExtension[1]{\vl@setcommand{vl@TelefonExtension}{#1}}
\newcommand*\vl@Date{} \newcommand*\vl@Date{}
\newcommand*\Date[1]{\xdef\vl@Date{\trim@spaces@noexp{#1}}} \newcommand*\Date[1]{\vl@setcommand{vl@Date}{#1}}
\newcommand*\vl@Content{} \newcommand*\vl@Content{}
\newcommand*\Content[1]{\xdef\vl@Content{#1}} \newcommand*\Content[1]{\vl@setcommand{vl@Content}{#1}}
\newcommand*\vl@Purchaser{} \newcommand*\vl@Purchaser{}
\newcommand*\Purchaser[1]{\xdef\vl@Purchaser{#1}} \newcommand*\Purchaser[1]{\vl@setcommand{vl@Purchaser}{#1}}
\newcommand*\vl@Referee{} \newcommand*\vl@Referee{}
\newcommand*\Referee[1]{\xdef\vl@Referee{#1}} \newcommand*\Referee[1]{\vl@setcommand{vl@Referee}{#1}}
\newcounter{vl@TransportType} \setcounter{vl@TransportType}{0} \newcounter{vl@TransportType} \setcounter{vl@TransportType}{0}
\newcommand*\TransportType[1]{\vl@setcounter{vl@TransportType}{#1}} \newcommand*\TransportType[1]{\vl@setcounter{vl@TransportType}{#1}}
...@@ -300,12 +306,12 @@ ...@@ -300,12 +306,12 @@
\put(232bp,\vl@tempdimc){\vl@TelefonExtension}% \put(232bp,\vl@tempdimc){\vl@TelefonExtension}%
\put(310bp,\vl@tempdimc){\vl@Date}% \put(310bp,\vl@tempdimc){\vl@Date}%
\vl@tempdimc=394bp % -14bp \vl@tempdimc=394bp % -14bp
\put(\vl@tempdima,\vl@tempdimc){\vl@costUnit}% \put(\vl@tempdima,\vl@tempdimc){\vl@CostUnit}%
\put(218bp,\vl@tempdimc){\vl@financeUnit}% \put(218bp,\vl@tempdimc){\vl@FinanceUnit}%
\put(401bp,\vl@tempdimc){\vl@account}% \put(401bp,\vl@tempdimc){\vl@Account}%
\vl@tempdimc=366bp % \vl@tempdimc=366bp %
\put(\vl@tempdima,\vl@tempdimc){\vl@SAPNo}% \put(\vl@tempdima,\vl@tempdimc){\vl@SAPNo}%
\put(218bp,\vl@tempdimc){\vl@value}% \put(218bp,\vl@tempdimc){\vl@Value}%
\put(401bp,\vl@tempdimc){\vl@DateOfArrival}% \put(401bp,\vl@tempdimc){\vl@DateOfArrival}%
% TODO: mehrzeilige Ausgabe vorsehen? % TODO: mehrzeilige Ausgabe vorsehen?
\put(\vl@tempdima,320bp){\vl@ShippingName}% \put(\vl@tempdima,320bp){\vl@ShippingName}%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment