\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{kiviletter}[2020/04/24 Letter Layouts for Kivitendo]
-
\newif\if@kivi@infobox
\DeclareOption{reffields}{\@kivi@infoboxfalse}
\DeclareOption{infobox}{\@kivi@infoboxtrue}
\DeclareNewLayer[
foreground,
hoffset=\useplength{toaddrhpos},
-voffset=\dimexpr\useplength{toaddrvpos}+\useplength{toaddrheight}+4\baselineskip,
+voffset=\dimexpr\useplength{toaddrvpos}+\useplength{toaddrheight}+4\baselineskip,%sep to shippingaddressbox
contents={\usebox\shippingAddressBox}
]{kivitendo.shippingaddress}
\removereffields
\AtBeginLetter{
\ifdim\ht\shippingAddressBox>\z@
- \addtoplength{refvpos}{\ht\shippingAddressBox}
- \addtoplength{refvpos}{4\baselineskip}
+ \addtoplength{refvpos}{\dimexpr\ht\shippingAddressBox+\dp\shippingAddressBox}
+ \addtoplength{refvpos}{4\baselineskip}%sep between address boxes
\fi
}
\ExplSyntaxOff