\documentclass[10pt,letterpaper,oneside,onecolumn]{scrartcl}
\usepackage[frame]{xy}
\usepackage{tabularx}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\setlength{\voffset}{0.5cm}
\setlength{\hoffset}{-1.9cm}
\setlength{\topmargin}{0cm}
\setlength{\headheight}{0.5cm}
\setlength{\headsep}{1cm}
\setlength{\topskip}{0pt}
\setlength{\oddsidemargin}{1.0cm}
\setlength{\evensidemargin}{1.0cm}
\setlength{\textwidth}{19.2cm}
\setlength{\textheight}{24.7cm}
\setlength{\footskip}{1cm}
\setlength{\parindent}{0pt}
\renewcommand{\baselinestretch}{1}

\begin{document}

\pagestyle{myheadings}
\thispagestyle{empty}

\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont

\vspace*{-1.3cm}

  \textbf{PVM Sąskaita - faktūra}\\
  \textbf{Serija ir numeris:} & <%invnumber%>\\
  \vspace{0.5cm}  
  }

\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline
  \textbf{Data} & \textbf{Apmokėti iki} & \textbf{Užsakymo Nr.}
  & \textbf{Darbuotojas} & \textbf{Pakrovimo vieta} &
  \textbf{Vežėjas} \\ [0.5em]
  \hline
  <%invdate%> & <%duedate%> & <%ordnumber%> & <%employee%>
  & <%shippingpoint%> & <%shipvia%> \\
  \hline
\end{tabularx}

\vspace*{0.5cm}

\parbox[t]{1cm}{\hfill}
\parbox[t]{.4\textwidth}{
\textbf{Pardavėjas:}
\vspace{0.3cm}

Pavadinimas: <%company%>\\
Adresas: <%address%>\\
Įmonės kodas: <%businessnumber%>\\
PVM mokėtojo kodas: įrašyti savo\\
Bankas: įrašyti savo\\
Atsiskaitomoji s-ta: įrašyti savo\\
Tel: & <%tel%>\\
Fax: & <%fax%>
\vspace{0.3cm}
}
\parbox[t]{.6\textwidth}{
\textbf{Pirkėjas:}
\vspace{0.3cm}

Pavadinimas: <%name%>

Įmonės (asmens) kodas: <%customernumber%>

PVM mokėtojo kodas: <%customertaxnumber%>

Adresas: <%address1%>, <%address2%>
         <%city%>, <%state%>
         <%zipcode%> <%country%>

<%if customerphone%>
Tel: <%customerphone%>
<%end customerphone%>

<%if customerfax%>
Fax: <%customerfax%>
<%end customerfax%>

<%email%>
}
\hfill

\begin{tabularx}{\textwidth}{@{}rlXlrlrrr@{}}
  \textbf{Eil.Nr.} & \textbf{Prekės kodas} & \textbf{Aprašymas} & & \textbf{Kiekis} &
    \textbf{Mato vnt.} & \textbf{Kaina} & \textbf{Nuol. \%} & \textbf{Viso eilutėje} \\ [0.5em]
<%foreach number%>
  <%runningnumber%> & <%number%> & <%description%> & <%deliverydate%> &
  <%qty%> & <%unit%> & <%sellprice%> & <%discountrate%> & <%linetotal%> \\
<%end number%>
\end{tabularx}


\parbox{\textwidth}{
\rule{\textwidth}{2pt}

\vspace{0.2cm}

\hfill
\begin{tabularx}{7cm}{Xr@{}}
  Viso be PVM: & <%subtotal%> \\
<%foreach tax%>
  PVM <%taxrate%> \%: & <%tax%> \\
<%end tax%>
  Viso su PVM: & <%total%> \\
  \hline
\end{tabularx}

\vspace{0.3cm}

Suma apmokėjimui: <%text_amount%> Lt. <%decimal%> ct.
\hfill
Visos kainos paskaičiuotos \textbf{<%currency%> valiuta!}.

\vspace{1cm}

<%if notes%>
  <%notes%>
<%end if%>

}
\vspace{0.3cm}
Prekes perdaviau: & <%shippingpoint%> \hline
\vspace{0.3cm}
Prekes priėmiau: & <%shipvia%> \hline
\vspace{0.3cm}

\usebox{\ftr}

\end{document}

