rendered paste body\documentclass[11pt,twoside,a4paper]{article}
\usepackage{a4wide,amsmath,amssymb}
\usepackage{invoice}
\usepackage{ifthen}
\usepackage{calc}
\newcounter{bh}
\newcounter{bm}
\newcounter{eh}
\newcounter{em}
\newcounter{dh}
\newcounter{dm}
\newcounter{hrdec}
\def\timediff#1:#2-#3:#4 {%
\setcounter{bh}{#1}
\setcounter{bm}{#2}
\setcounter{eh}{#3}
\setcounter{em}{#4}
\ifthenelse{\(\value{eh}>\value{bh}\or\value{eh}=\value{bh}\)
\and\(\value{em}>\value{bm}\or\value{em}=\value{bm}\)}
{\setcounter{dh}{\value{eh}-\value{bh}}
\setcounter{dm}{\value{em}-\value{bm}}}
{\ifthenelse{\(\value{eh}>\value{bh}\or\value{eh}=\value{bh}\)
\and\value{em}<\value{bm}}
{\setcounter{dh}{\value{eh}-\value{bh}-1}
\setcounter{dm}{60+\value{em}-\value{bm}}}
{\ifthenelse{\value{eh}<\value{bh}
\and\(\value{em}>\value{bm}\or\value{em}=\value{bm}\)}
{\setcounter{dh}{24+\value{eh}-\value{bh}}
\setcounter{dm}{\value{em}-\value{bm}}}
{\ifthenelse{\value{eh}<\value{bh}\and\value{em}<\value{bm}}
{\setcounter{dh}{23+\value{eh}-\value{bh}}
\setcounter{dm}{60+\value{em}-\value{bm}}}}}{}}
\setcounter{hrdec}{\value{dm}*5/3}
\ifthenelse{\value{dm}>5}{\thedh.\thehrdec}{\thedh.0\thehrdec}}
\begin{document}
\timediff10:15-16:00
\begin{invoice}{EUR}{0}
\ProjectTitle{Rechnung }%
% Contents Rate/Unit Count
\edef\foo{{ab.cd.de}{12.5}{\timediff10:15-16:00}} \expandafter\Fee\foo
% \Fee{ab.cd.de} {12.5} {\timediff10:15-16:00}
% \Fee{ab.cd.de} {12.5} {10}
\ProjectTitle{Sales Restructuring}%
% Contents Rate/Unit Count
\Fee{Sales Structure Analysis} {2750.00} { 6}
\Fee{Negotiation with Agents} {2750.00} { 3}
\end{ivoice}
\end{document}
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
(./invoice_test.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size11.clo))
(/usr/share/texmf-texlive/tex/latex/ltxmisc/a4wide.sty
(/usr/share/texmf-texlive/tex/latex/ntgclass/a4.sty))
(/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty
(/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty))
(/usr/share/texmf-texlive/tex/latex/amsfonts/amssymb.sty
(/usr/share/texmf-texlive/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texmf-texlive/tex/latex/invoice/invoice.sty
(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty)
(/usr/share/texmf-texlive/tex/latex/tools/longtable.sty)
(/usr/share/texmf-texlive/tex/latex/tools/calc.sty)
(/usr/share/texmf-texlive/tex/generic/realcalc/realcalc.tex
`Real arithmetic', Version 1.0, Jan. 1993(C) Frank Buchholz)
(/usr/share/texmf-texlive/tex/latex/invoice/invoice.def)) (./invoice_test.aux)
VAT is zero!
! Argument of \timediff has an extra }.
<inserted text>
\par
l.49 ...foo{{ab.cd.de}{12.5}{\timediff10:15-16:00}
} \expandafter\Fee\foo
?