% sty-File fuer Modul bgh (bill generator)
%
%
\newsavebox{\canrede}%
\newsavebox{\cname}%
\newsavebox{\cfirma}%
\newsavebox{\cstr}%
\newsavebox{\cort}%
\newsavebox{\cland}%
\newsavebox{\rechnum}%
\newsavebox{\rechdat}%
\newsavebox{\rechstart}%
\newsavebox{\rechend}%
\newsavebox{\faellig}%
\newsavebox{\ansprech}%
\newsavebox{\cfon}%
\newsavebox{\cfax}%
\newsavebox{\copcode}%
\newsavebox{\cvatno}%
\newsavebox{\bankname}%
\newsavebox{\bankstreet}%
\newsavebox{\banktown}%
\newsavebox{\bankcountry}%
\newsavebox{\bankaccountno}%
\newsavebox{\bankcode}%
\newsavebox{\bankswiftcode}%
%
\newcommand{\custanrede}[1]{\sbox{\canrede}{#1}}%
\newcommand{\custname}[1]{\sbox{\cname}{#1}}%
\newcommand{\custfirma}[1]{\sbox{\cfirma}{#1}}%
\newcommand{\custstr}[1]{\sbox{\cstr}{#1}}%
\newcommand{\custort}[1]{\sbox{\cort}{#1}}%
\newcommand{\custland}[1]{\sbox{\cland}{#1}}%
\newcommand{\custfon}[1]{\sbox{\cfon}{\small{#1}}}%
\newcommand{\custfax}[1]{\sbox{\cfax}{\small{#1}}}%
\newcommand{\custopcode}[1]{\sbox{\copcode}{\small{#1}}}%
\newcommand{\custvatno}[1]{\sbox{\cvatno}{\small{#1}}}%
%
\newcommand{\invstart}[1]{\sbox{\rechstart}{\small{#1}}}%
\newcommand{\invend}[1]{\sbox{\rechend}{\small{#1}}}%
\newcommand{\fullfilldate}[1]{\sbox{\faellig}{\small{#1}}}%
\newcommand{\infocont}[1]{\sbox{\ansprech}{\small{#1}}}%
%
\newcommand{\myrb}[1]{\raisebox{1.5ex}[-1.5ex]{#1}}%
%
%\newcommand{\invdate}[1]{\sbox{\rechdat}{#1}}%
%\newcommand{\invperiode}[1]{\sbox{\rechperiode}{#1}}%
%
\newlength{\adrstartpoint}%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%      INVOICE (first page)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%
%% write headline
%%

%%%%%%%%%%%%%
%% write address lines: 
%%
\newcommand{\writeadrarea}{%
\setlength{\adrstartpoint}{3.5cm-\headsep}
}


%%%%%%%%%%%%%
%% write invoice type
%%
\newcommand{\docutype}[2]{{\LARGE \bf #1 for #2}
\\[0.5cm]}



%%%%%%%%%%%%%
%% write invoice number, invoice date and period
%%
\newcommand{\invdatetabheader}{%
\setlength{\tabcolsep}{1mm}
\begin{tabular}{llp{1cm}@{\hspace\fill}ll}
}
%

\newcommand{\invdatetabtrailer}{
\end{tabular}
\\[0.5cm]}%
%


%%%%%%%%%%%%%
%% write invoice tabular header 
%%
\newcommand{\invtabheaderone}[3]{{\large \bf #1 \\[0.0cm]}
\begin{footnotesize}%
\begin{tabular*}{19cm}{|r|p{9cm}@{\extracolsep\fill}|D,,{6}|D,,{6}|}
\hline
{\bf \#} & {\bf Item Description} \rule[-2mm]{0cm}{7mm}  & \multicolumn{1}{c|}{\bf Amount #2} & \multicolumn{1}{c|}{\bf Amount #3} \\
\hline \hline
}%
%

\newcommand{\invtabheadertwo}[4]{{\large \bf #1 \\[0.0cm]}
\begin{footnotesize}%
\begin{tabular*}{19cm}{|r|p{7cm}@{\extracolsep\fill}|D,,{6}|D,,{6}|D,,{6}|}
\hline
{\bf \#} & {\bf Item Description} \rule[-2mm]{0cm}{7mm}  & \multicolumn{1}{c|}{\bf Amount #2} & \multicolumn{1}{c|}{\bf Amount #3} & \multicolumn{1}{c|}{\bf Amount #4}  \\
\hline \hline
}%
%

%%%%%%%%%%%%%
%% write invoice tabular trailer
%%
\newcommand{\invtabtrailer}{%
\end{tabular*}\end{footnotesize}
}
%
%


%%%%%%%%%%%%%
%% write exchange rate
%%
\newcommand{\exrateheaderone}{
\small
\hspace*{\fill} \begin{tabular}[t]{|c||c|}
\hline
{\bf Exchange rate} &{\bf Date} \\
\hline
}

\newcommand{\exrateheadertwo}{
\small
\hspace*{\fill} \begin{tabular}[t]{|c||c|||c||c|}
\hline
{\bf Exchange rate} &{\bf Date} & {\bf Exchange rate} &{\bf Date} \\
\hline
}

\newcommand{\exrateheaderdiscount}{
\scriptsize
\hspace*{\fill} \begin{tabular}[t]{|c||c|}
\hline
{\bf Exchange rate for discount amounts} &{\bf Date} \\
\hline
}

\newcommand{\exratevalueone}[3]{
\scriptsize 1,00 SDR = \scriptsize #1 \scriptsize #2 & \scriptsize #3 \\
\hline
}
\newcommand{\exratevaluetwo}[6]{
\scriptsize 1,00 SDR = #1 \scriptsize #2 & \scriptsize #3 & \scriptsize 1,00 SDR = \scriptsize #4 \scriptsize #5 & \scriptsize #6 \\
\hline
}
\newcommand{\exratetrailer}{
\end{tabular}
}
%


%%%%%%%%%%%%%
%% write bank account  
%%
\newcommand{\writepaymentbegin}{\\[1.0cm]
\scriptsize
\begin{tabular}{llp{1cm}ll}
{\bf Terms of payment:} & & & {\bf Payable to:} & \\
}
\newcommand{\writepaymentend}{
\end{tabular}
\\[0.5cm]}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%      SUMMARY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%
%% write exchange rate and tax
%%
\newcommand{\exratetaxheaderone}[1]{
{\large \bf TAX} \\
\begin{tabular*}{19cm}{|r||@{\extracolsep\fill}|r|r|r||r||r|r|}
\hline
         & {\bf #1}  &              &               & {\bf TAX}    & {\bf Net}    & {\bf Net}    \\
{\bf \#} & {\bf to}  & {\bf Month} & {\bf TAX \%} & {\bf Amount} & {\bf Amount} & {\bf Amount} \\
         & {\bf SDR} &              &               & {\bf SDR}    & {\bf #1}     & {\bf SDR}    \\
\hline \hline
}

\newcommand{\exratetaxheadertwo}[2]{
{\large \bf TAX} \\
\begin{tabular*}{19cm}{|r||@{\extracolsep\fill}|r|r|r|r||r||r|r|r|}
\hline
         & {\bf #2}  & {\bf #1}  &              &               & {\bf TAX}    & {\bf Net}    & {\bf Net}    & {\bf Net}    \\
{\bf \#} & {\bf to}  & {\bf to}  & {\bf Month} & {\bf TAX \%} & {\bf Amount} & {\bf Amount} & {\bf Amount} & {\bf Amount} \\
         & {\bf SDR} & {\bf SDR} &              &               & {\bf SDR}    & {\bf #2}     & {\bf #1}     & {\bf SDR}    \\
\hline \hline
}
%

\newcommand{\exratetaxtrailer}{
\end{tabular*} \\[1.0cm]
}
%



\newcommand{\sumgeneralheader}[3] {{\large \bf #1 \\[0.0cm]}
\tablefirsthead{%
\hline
{\bf \#} & {\bf Item Description}  & {\bf Amount} & {\bf Amount} \\
         &                         & {\bf #2}     & {\bf #3} \\
\hline \hline
}%
\tablehead{%
\hline
\multicolumn{4}{|l|}{\small\sl continued from previous page}\\
\hline
{\bf \#} & {\bf Item Description}  & {\bf Amount} & {\bf Amount} \\
         &                         & {\bf #2}     & {\bf #3} \\
\hline \hline
}%
\tabletail{%
\hline
\multicolumn{4}{|r|}{\small\sl continued on next page}\\
\hline
}
\tablelasttail{ \hline}


\begin{supertabular*}{19cm}{|r|p{8cm}@{\extracolsep\fill}|r|r|}
}
%

%\newcommand{\sumgeneralheader}[3] {{\large \bf #1 \\[0.0cm]}
%\begin{tabular*}{19cm}{|r|p{8cm}@{\extracolsep\fill}|r|r|}
%\hline
%{\bf \#} & {\bf Item Description}  & {\bf Amount} & {\bf Amount} \\
%         &                         & {\bf #2}     & {\bf #3} \\
%\hline \hline
%}%
%

\newcommand{\sumgeneralheaderaddcur}[4] {{\large \bf #1 \\[0.0cm]}
\tablefirsthead{%
\hline
{\bf \#} & {\bf Item Description}  & {\bf Amount} & {\bf Amount} & {\bf Amount} \\
         &                         & {\bf #2}     & {\bf #3}    & {\bf #4} \\
\hline \hline
}%
\tablehead{%
\hline
\multicolumn{5}{|l|}{\small\sl continued from previous page}\\
\hline
{\bf \#} & {\bf Item Description}  & {\bf Amount} & {\bf Amount} & {\bf Amount} \\
         &                         & {\bf #2}     & {\bf #3}    & {\bf #4} \\
\hline \hline
}%
\tabletail{%
\hline
\multicolumn{5}{|r|}{\small\sl continued on next page}\\
\hline
}
\tablelasttail{ \hline}

\begin{supertabular*}{19cm}{|r|p{8cm}@{\extracolsep\fill}|r|r|r|}

}%
%

%\newcommand{\sumgeneralheaderaddcur}[4] {{\large \bf #1 \\[0.0cm]}
%\begin{tabular*}{19cm}{|r|p{8cm}@{\extracolsep\fill}|r|r|r|}
%\hline
%{\bf \#} & {\bf Item Description}  & {\bf Amount} & {\bf Amount} & {\bf Amount} \\
%         &                         & {\bf #2}     & {\bf #3}    & {\bf #4} \\
%\hline \hline
%}%
%
\newcommand{\sumdisheadertax}[2] {{\large \bf #1 \\[0.0cm]}
\tablefirsthead{%
\hline
        &                      &         &          &           &           &            &{\bf New}   &{\bf Original}&{\bf Dis-} &{\bf Discount}&{\bf Discount} \\
{\bf \#}&{\bf Item Description}&{\bf TAX}&{\bf Cur.}&{\bf Price}&{\bf Price}&{\bf Volume}&{\bf Amount}&{\bf Amount}  &{\bf count}&{\bf Amount}  &{\bf Amount} \\
        &                      &{\bf \%} &          &           &{\bf per}  &            &            &              &{\bf \%}   &              &{\bf #2} \\
\hline \hline
}
%
\tablehead{%
\hline
\multicolumn{12}{|l|}{\small\sl continued from previous page}\\
\hline
        &                      &         &          &           &           &            &{\bf New}   &{\bf Original}&{\bf Dis-} &{\bf Discount}&{\bf Discount} \\
{\bf \#}&{\bf Item Description}&{\bf TAX}&{\bf Cur.}&{\bf Price}&{\bf Price}&{\bf Volume}&{\bf Amount}&{\bf Amount}  &{\bf count}&{\bf Amount}  &{\bf Amount} \\
        &                      &{\bf \%} &          &           &{\bf per}  &            &            &              &{\bf \%}   &              &{\bf #2} \\
\hline \hline
}

\tabletail{%
\hline
\multicolumn{12}{|r|}{\small\sl continued on next page}\\
\hline
}
\tablelasttail{%
\hline
}

\begin{supertabular*}{19cm}{|>{\tiny}r|>{\tiny}p{3.5cm}@{\extracolsep\fill}|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r||>{\tiny}r|}
}

%
\newcommand{\sumdisheader}[2]{{\large \bf #1 \\[0.0cm]}
\tablefirsthead{%
\hline
        &                      &          &           &           &            &{\bf New}   &{\bf Original}&{\bf Dis-} &{\bf Discount}&{\bf Discount} \\
{\bf \#}&{\bf Item Description}&{\bf Cur.}&{\bf Price}&{\bf Price}&{\bf Volume}&{\bf Amount}&{\bf Amount}  &{\bf count}&{\bf Amount}  &{\bf Amount} \\
        &                      &          &           &{\bf per}  &            &            &              &{\bf \%}   &              &{\bf #2} \\
\hline \hline
}
%
%
\tablehead{%
\hline
\multicolumn{11}{|l|}{\small\sl continued from previous page}\\
\hline
        &                      &          &           &           &            &{\bf New}   &{\bf Original}&{\bf Dis-} &{\bf Discount}&{\bf Discount} \\
{\bf \#}&{\bf Item Description}&{\bf Cur.}&{\bf Price}&{\bf Price}&{\bf Volume}&{\bf Amount}&{\bf Amount}  &{\bf count}&{\bf Amount}  &{\bf Amount} \\
        &                      &          &           &{\bf per}  &            &            &              &{\bf \%}   &              &{\bf #2} \\
\hline \hline
}

\tabletail{%
\hline
\multicolumn{11}{|r|}{\small\sl continued on next page}\\
\hline
}
\tablelasttail{%
\hline
}

\begin{supertabular*}{19cm}{|>{\tiny}r|>{\tiny}p{3.5cm}@{\extracolsep\fill}|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r|>{\tiny}r||>{\tiny}r|}
}
%
%
\newcommand{\sumtrailer}{%
\end{tabular*} \\[1.0cm]
}
%
\newcommand{\sumsupertrailer}{%
\end{supertabular*} \\[1.0cm]
}
%
\newcommand{\sumtrailerdiscount}{%
\end{supertabular*} \\[1.0cm]
}




%%%%%%%%%%%%%
%% credit 
%%
\newcommand{\headersumcredit}{
\small
\tablefirsthead{%
\multicolumn{4}{l}{\bf \large Summary} \\
\hline
{\bf \# } & {\bf Description} & {\bf Net SDR} & {\bf Tax SDR} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{4}{|l|}{\small\sl continued from previous page}\\
\hline
{\bf \# } & {\bf Description} & {\bf Net SDR} & {\bf Tax SDR} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{4}{|r|}{\small\sl continued on next page}\\
\hline
}
\tablelasttail{ \hline}
%\bottomcaption{}  do nothing
\begin{supertabular*}{19cm}{|>{\scriptsize}r|>{\scriptsize}p{12.0cm}@{\extracolsep\fill}|>{\scriptsize}r|>{\scriptsize}r|}
}
%
%
\newcommand{\trailersumcredit}{%
\end{supertabular*} \\
}
%
%







%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%      DETAILS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%
%% write detail header
%%
\newcommand{\headerdetailglobal}{
\small
\twocolumn[{\begin{center} {\LARGE\bf Roaming Traffic Details Amount} \end{center}}]
}
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%      TAP file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\headerdetailtapzwei}[2]{
\headerdetailglobal%
\tablefirsthead{%
\hline
{\bf \# } & {\bf TAP } & {\bf Total} & \multicolumn{2}{c|}{\bf IMSI Amount SDR} \\ \cline{4-5}
          & {\bf Seq.} & {\bf Amount SDR} & {\bf Group #1} & {\bf Group #2} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{5}{|l|}{\small\sl continued from previous row}\\
\hline
{\bf \# } & {\bf TAP } & {\bf Total}      & \multicolumn{2}{c|}{\bf IMSI Amount SDR} \\ \cline{4-5}
          & {\bf Seq.} & {\bf Amount SDR} & {\bf Group #1} & {\bf Group #2} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{5}{|r|}{\small\sl continued on next row}\\
\hline
}
\tablelasttail{%
\hline
}
%\bottomcaption{}  do nothing
\begin{supertabular}{|r|l|r|r|r|}
}
%
%
%
\newcommand{\headerdetailtapeins}[1]{
\headerdetailglobal%
\tablefirsthead{%
\hline
{\bf \# } & {\bf TAP } & {\bf Total}      & {\bf IMSI Amount SDR} \\
          & {\bf Seq.} & {\bf Amount SDR} & {\bf Group #1} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{4}{|l|}{\small\sl continued from previous row}\\
\hline
{\bf \# } & {\bf TAP } & {\bf Total}      & {\bf IMSI Amount SDR} \\
          & {\bf Seq.} & {\bf Amount SDR} & {\bf Group #1} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{4}{|r|}{\small\sl continued on next row}\\
\hline
}
\tablelasttail{ \hline}
%\bottomcaption{}  do nothing
\begin{supertabular}{|r|l|r|r|}
}
%
%
%
\newcommand{\headerdetailtapnull} {
\headerdetailglobal%
\tablefirsthead{%
\hline
 &  & {\scriptsize\bf Net}      & {\scriptsize\bf Tax}     & {\scriptsize\bf Gross} \\
 &  & {\scriptsize\bf Amount} & {\scriptsize\bf Amount} & {\scriptsize\bf Amount} \\
{\scriptsize\bf \# } & {\scriptsize\bf TAP Name } & {\scriptsize\bf SDR} & {\scriptsize\bf SDR} & {\scriptsize\bf SDR} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{5}{|l|}{\sl continued from previous row}\\
\hline
 &  & {\scriptsize\bf Net}      & {\scriptsize\bf Tax}     & {\scriptsize\bf Gross} \\
 &  & {\scriptsize\bf Amount} & {\scriptsize\bf Amount} & {\scriptsize\bf Amount} \\
{\scriptsize\bf \# } & {\scriptsize\bf TAP Name } & {\scriptsize\bf SDR} & {\scriptsize\bf SDR} & {\scriptsize\bf SDR} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{5}{|l|}{\sl continued on next row}\\
\hline}
\tablelasttail{\hline}
%\bottomcaption{}  do nothing
\begin{supertabular*}{9.5cm}{|>{\scriptsize}r|@{\extracolsep\fill}>{\scriptsize}l|>{\scriptsize}r|>{\tiny}r|>{\tiny}r|}
}
%
%
%
\newcommand{\headerdetailhubchild} {
\tablefirsthead{%
\hline
 &  & {\scriptsize\bf Net}      & {\scriptsize\bf Tax}     & {\scriptsize\bf Gross} \\
 &  & {\scriptsize\bf Amount} & {\scriptsize\bf Amount} & {\scriptsize\bf Amount} \\
{\scriptsize\bf \# } & {\scriptsize\bf TAP Name } & {\scriptsize\bf SDR} & {\scriptsize\bf SDR} & {\scriptsize\bf SDR} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{5}{|l|}{\sl continued from previous row}\\
\hline
 &  & {\scriptsize\bf Net}      & {\scriptsize\bf Tax}     & {\scriptsize\bf Gross} \\
 &  & {\scriptsize\bf Amount} & {\scriptsize\bf Amount} & {\scriptsize\bf Amount} \\
{\scriptsize\bf \# } & {\scriptsize\bf TAP Name } & {\scriptsize\bf SDR} & {\scriptsize\bf SDR} & {\scriptsize\bf SDR} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{5}{|l|}{\sl continued on next row}\\
\hline}
\tablelasttail{\hline}
%\bottomcaption{}  do nothing
\begin{supertabular*}{9.5cm}{|>{\scriptsize}r|@{\extracolsep\fill}>{\scriptsize}l|>{\scriptsize}r|>{\tiny}r|>{\tiny}r|}
}
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%      RAP file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\headerdetailrapzwei}[2]{
\\[2cm]
\tablefirsthead{%
\hline
{\bf \# } & {\bf RAP Seq. } & {\bf TAP Ref. } & {\bf Amount SDR} & \multicolumn{2}{c|}{\bf IMSI Amount SDR} \\ \cline{4-5}
          &                 &                 &                  & {\bf Group #1} & {\bf Group #2} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{6}{|l|}{\small\sl continued from previous row}\\
\hline
{\bf \# } & {\bf RAP Seq. } & {\bf TAP Ref. } & {\bf Amount SDR} & \multicolumn{2}{c|}{\bf IMSI Amount SDR} \\ \cline{4-5}
          &                 &                 &                  & {\bf Group #1} & {\bf Group #2} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{6}{|r|}{\small\sl continued on next row}\\
\hline
}
\tablelasttail{%
\hline
}
%\bottomcaption{}  do nothing
\begin{supertabular}{|r|l|l|r|c|c|}
}
%
%
%
\newcommand{\headerdetailrapeins}[1]{
\\[2cm]
\tablefirsthead{%
\hline
{\bf \# } & {\bf RAP Seq. } & {\bf TAP Ref. } & {\bf Amount SDR} & {\bf IMSI Amount SDR} \\
          &                 &                 &                  & {\bf Group #1} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{5}{|l|}{\small\sl continued from previous row}\\
\hline
{\bf \# } & {\bf RAP Seq. } & {\bf TAP Ref. } & {\bf Amount SDR} & {\bf IMSI Amount SDR} \\
          &                 &                 &                  & {\bf Group #1} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{5}{|r|}{\small\sl continued on next row}\\
\hline
}
\tablelasttail{ \hline}
%\bottomcaption{}  do nothing
\begin{supertabular}{|r|l|l|r|c|}
}
%
%
%
\newcommand{\headerdetailrapnull} {
\\[2cm]
\tablefirsthead{%
\hline
{\bf \# } & {\bf RAP Name } & {\bf TAP Name } & {\bf Amount SDR} & {\bf Tax SDR} & {\bf Gross Amount SDR} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{6}{|l|}{\sl continued from previous row}\\
\hline
{\bf \# } & {\bf RAP Name } & {\bf TAP Name } & {\bf Amount SDR} & {\bf Tax SDR} & {\bf Gross Amount SDR} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{6}{|l|}{\sl continued on next row}\\
\hline}
\tablelasttail{\hline}
%\bottomcaption{}  do nothing
%\begin{supertabular*}{6cm}{|r|l|l@{\extracolsep\fill}|r|}
\begin{supertabular*}{5cm}{|r|l@{\extracolsep\fill}|l|r|r|r|}
}
%
%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%      TAP file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
\newcommand{\trailerdetailtapzwei}[1]{%
\multicolumn{2}{|l|}{\bf Total} & {\bf #1} & \multicolumn{2}{l|}{} \\
\end{supertabular} \\
}
%
\newcommand{\trailerdetailtapeins}[1]{%
\multicolumn{2}{|l|}{\bf Total} & {\bf #1} & \\
\end{supertabular} \\
}
%
\newcommand{\trailerdetailtapnull}[1]{%
\multicolumn{2}{|l|}{\scriptsize\bf Total TAP files} & {\scriptsize\bf #1} & & \\
\end{supertabular*} \\
}
%
%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%      RAP file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\trailerdetailrapzwei}[1]{%
\multicolumn{3}{|l|}{\bf Total} & {\bf #1} & \multicolumn{2}{l|}{} \\
\end{supertabular} \\
}
%
\newcommand{\trailerdetailrapeins}[1]{%
\multicolumn{3}{|l|}{\bf Total} & {\bf #1} & \\
\end{supertabular} \\
}
%
\newcommand{\trailerdetailrapnull}[1]{%
\multicolumn{3}{|l|}{\bf Total RAP files} & {\bf #1} \\
\end{supertabular*} \\
}
%
%
%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%      total detail
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\totaldetail}[3]{
\\[2cm]
\tablefirsthead{%
\hline
{\bf Detail Total} & {\bf Amount SDR} \\ 
\hline \hline
}
\tablehead{%
\hline
\multicolumn{2}{|l|}{\sl continued from previous row}\\
\hline
{\bf Detail Total} & {\bf Amount SDR} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{2}{|l|}{\sl continued on next row}\\
\hline}
\tablelasttail{\hline}
%\bottomcaption{}  do nothing
\begin{supertabular}{|l@{\hspace{2cm}}|r|}
Total TAP files & #1 \\ \hline
Total RAP files & #2 \\ \hline \hline
{\bf Total}     & {\bf #3} \\
\end{supertabular} \\

}
%
%
%
%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%
%%%%%        SMS   
%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\headerdetailsms}[1]{
\newpage
\small
{\begin{center} {\LARGE\bf SMS Interworking Traffic Details Net Amount} \end{center}}
%
\tablefirsthead{%
\hline
{\bf \# } & {\bf SMS Type} & {\bf Date} & {\bf SMS-C Address} & {\bf SMS Count} & {\bf Unit Price #1   } & {\bf Amount #1} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{7}{|l|}{\small\sl continued from previous page}\\
\hline
{\bf \# } & {\bf SMS Type} & {\bf Date} & {\bf SMS-C Address} & {\bf SMS Count} & {\bf Unit Price #1   } & {\bf Amount #1} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{7}{|r|}{\small\sl continued on next page}\\
\hline
}
\tablelasttail{ \hline}
%\bottomcaption{}  do nothing
\begin{supertabular*}{19cm}{|>{\scriptsize}r|>{\scriptsize}p{3.0cm}@{\extracolsep\fill}|>{\scriptsize}r|>{\scriptsize}r|>{\scriptsize}r|>{\scriptsize}r|>{\scriptsize}r|}
}
%
%
\newcommand{\trailerdetailsms}{%
\end{supertabular*} \\
}
%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%
%%%%%        MMS   
%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\headerdetailmms}[1]{
\newpage
\small
{\begin{center} {\LARGE\bf MMS Interworking Traffic Details Net Amount} \end{center}}
%
\tablefirsthead{%
\hline
          &            &              &                 &                    &                 & {\bf Unit } &  \\
          &            &              &                 &                    &                 & {\bf Price} &  \\
{\bf \# } & {\bf Date} & {\bf Domain} & {\bf MMS Class} & {\bf Volume in KB} & {\bf MMS Count} & {\bf #1   } & {\bf Amount #1} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{8}{|l|}{\small\sl continued from previous page}\\
\hline
          &            &              &                 &                    &                 & {\bf Unit } &  \\
          &            &              &                 &                    &                 & {\bf Price} &  \\
{\bf \# } & {\bf Date} & {\bf Domain} & {\bf MMS Class} & {\bf Volume in KB} & {\bf MMS Count} & {\bf #1   } & {\bf Amount #1} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{8}{|r|}{\small\sl continued on next page}\\
\hline
}
\tablelasttail{ \hline}
%\bottomcaption{}  do nothing
\begin{supertabular*}{19cm}{|>{\scriptsize}r|>{\scriptsize}l|>{\scriptsize}p{5.0cm}@{\extracolsep\fill}|>{\scriptsize}l|>{\scriptsize}r|>{\scriptsize}r|>{\scriptsize}r|>{\scriptsize}r|}
}
%
%
\newcommand{\trailerdetailmms}{%
\end{supertabular*} \\
}
%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%
%%%%%        WLAN   
%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% sdr amount is not longer used
%
\newcommand{\headerdetailwlan}[1]{
\newpage
\small
\twocolumn[{\begin{center} {\LARGE\bf WLAN Roaming Traffic Details Net Amount} \end{center}}]
%
\tablefirsthead{%
\hline
{\bf \# } & {\bf UDR Seq.} & {\bf Realms} & {\bf Amount #1} \\
\hline \hline
}
\tablehead{%
\hline
\multicolumn{4}{|l|}{\small\sl continued from previous row}\\
\hline
{\bf \# } & {\bf UDR Seq.} & {\bf Realms} & {\bf Amount #1} \\
\hline \hline
}
\tabletail{%
\hline
\multicolumn{4}{|r|}{\small\sl continued on next row}\\
\hline
}
\tablelasttail{ \hline}
%\bottomcaption{}  do nothing
\begin{supertabular*}{8cm}{|>{\scriptsize}r|>{\scriptsize}l|>{\scriptsize}p{3.0cm}@{\extracolsep\fill}|>{\scriptsize}r|}
}
%
%
\newcommand{\trailerdetailwlan}{%
\end{supertabular*} \\
}
%
%
%
