|
- \documentclass[10pt]{article}
- \usepackage[utf8]{inputenc}
- \usepackage[T1]{fontenc}
- \usepackage[left=0.5cm,right=0.5cm,top=0.5cm,bottom=0.5cm,noheadfoot,nomarginpar,showframe]{geometry}
- \usepackage{lmodern}
- \usepackage{tabularx}
- \usepackage{tabu}
- \usepackage{multirow}
- \usepackage{graphicx}
- \renewcommand{\familydefault}{\sfdefault}
- \setlength{\extrarowheight}{3pt}
-
- \begin{document}
- \footnotesize
-
- \pagestyle{empty}
-
- \begin{center}
- \begin{tabularx}{\textwidth}{XXXX}
-
- &&& \\
- \multicolumn{4}{l}{\bf \large Faktúra: \hfill {{invoice.number}}} \\
- &&& \\ \hline
- \multicolumn{2}{X|}{} & \multicolumn{2}{X}{} \\
- \multicolumn{2}{l|}{\bf Dodávateľ:} & \multicolumn{2}{X}{\bf Odberateľ} \\
- \multicolumn{2}{X|}{} & \multicolumn{2}{X}{} \\
-
- \multicolumn{2}{l|}{\large\bf {{issuer.name}}} & \multicolumn{2}{l}{\large\bf {{customer.name}}} \\
- {{py:
- a1 = issuer.address[:]
- a2 = customer.address[:]
- a1 += (len(a2)-len(a1))*[""]
- a2 += (len(a1)-len(a2))*[""]
- }}
- {{for f1, f2 in zip(a1, a2)}}
- \multicolumn{2}{l|}{\large {{f1}}} & \multicolumn{2}{l}{\large {{f2}}} \\
- {{endfor}}
-
- % COMPANY ID NUMBERS
- \multicolumn{2}{X|}{} & \multicolumn{2}{X}{} \\
- \multicolumn{2}{l|}{IČO: {{issuer.ico}}} & \multicolumn{2}{l}{IČO: {{if customer.icdph}}\hspace{0.3cm}{{endif}} {{customer.ico}}} \\
- \multicolumn{2}{l|}{DIČ: {{issuer.dic}}} & \multicolumn{2}{l}{DIČ: {{if customer.icdph}}\hspace{0.3cm}{{endif}} {{customer.dic}}} \\
- {{if issuer.icdph or customer.icdph}}
- {{if issuer.icdph}}
- \multicolumn{2}{l|}{IČDPH: {{issuer.icdph}}} &
- {{else}}
- \multicolumn{2}{l|}{Neplatca DPH} &
- {{endif}}
- {{if customer.icdph}}
- \multicolumn{2}{l}{IČDPH: {{customer.icdph}}} \\
- {{else}}
- \multicolumn{2}{l}{} \\
- {{endif}}
- {{endif}}
-
- \multicolumn{2}{X|}{} & \multicolumn{2}{X}{} \\
-
- % Comments
- {{py:
- a1 = issuer.comments[:]
- a2 = customer.comments[:]
- a1 += (len(a2)-len(a1))*[""]
- a2 += (len(a1)-len(a2))*[""]
- }}
- {{for f1, f2 in zip(a1, a2)}}
- \multicolumn{2}{l|}{ \footnotesize {{f1}} } & \multicolumn{2}{l}{ \footnotesize {{f2}} } \\
- {{endfor}}
- \multicolumn{2}{X|}{} & \multicolumn{2}{X}{} \\
-
- \multicolumn{2}{l|}{\bf Platobné podmienky:} & & \\
- Forma úhrady: & \multicolumn{1}{l|}{ {{"v~hotovosti" if invoice.payment=="cash" else "prevodom"}}} & & \\
- IBAN: & \multicolumn{1}{l|}{ {{issuer.iban}}} & Dátum vystavenia: & \multicolumn{1}{r}{ {{invoice.issued.strftime("%d.%m.%Y")}}} \\
- SWIFT/BIC: & \multicolumn{1}{l|}{ {{issuer.swift}} } & \multicolumn{2}{l}{Dátum dodania: \hfill {{invoice.delivered.strftime("%d.%m.%Y")}}} \\
- Variabilný symbol: & \multicolumn{1}{l|}{ {{invoice.number}}} & \multicolumn{2}{l}{\large\bf Dátum splatnosti: \hfill {{invoice.due.strftime("%d.%m.%Y")}}} \\
- % COMMENTS
- {{if invoice.notes}}
- \multicolumn{2}{X|}{} & \multicolumn{2}{X}{} \\ \hline
- & & & \\
- \bf Poznámky: & & & \\[1em]
- {{for note in invoice.notes}}
- \multicolumn{4}{l}{\large {{note}}} \\
- {{endfor}}
- {{endif}}
-
- \multicolumn{2}{X|}{} & \multicolumn{2}{X}{} \\ \hline
-
- & & & \\
-
- \multicolumn{4}{l}{\bf Faktúrujeme Vám za služby podľa Rámcovej zmluvy} \\
-
- & & & \\
-
- % ITEMS
- \multicolumn{4}{X}{%
- \hspace*{-1.35\tabcolsep}
- \begin{tabu} to \textwidth {%
- >{\hsize=2.5\hsize}X[l]%
- >{\hsize=0.5\hsize}X[r]%
- >{\hsize=0.5\hsize}X[r]%
- >{\hsize=0.5\hsize}X[r]%
- >{\hsize=0.5\hsize}X[r]}
- \normalsize \bf Popis položky & \bf Množstvo & \bf MJ & \bf Cena za MJ & \bf Celková cena \\
- {{for item in invoice.items}}
- {{item[0]}} & {{item[1]}} & {{item[2]}} & {{eur(item[3])}} & {{eur(item[1] * item[3])}} \\
- {{endfor}}
- \end{tabu}
- } \\
-
- %& & & \\
- %\hline
- %& & & \\
- %\multicolumn{3}{l}{\large\bf Celkom k úhrade:} & \multicolumn{1}{r}{\large\bf {{eur(invoice.sum)}} } \\
- & & & \\
- \hline
- \multicolumn{4}{r}{} \\
- %\multicolumn{4}{r}{\includegraphics[scale=1]{../signature.jpg}\hspace{.4cm} } \\
- \end{tabularx}
- \end{center}
-
- \vfill
-
- % Footer
- \centering
- \begin{tabu} to \textwidth {XX|XX|X|X[r]}
- \hline
- Vyhotovil: Peter Hatina && Prevzal: && Celková suma: & {{eur(invoice.sum)}} \\ \cline{5-6}
- \multirow{2}{*}{\hspace*{1.0cm}\includegraphics[scale=0.3]{../signature.jpg} } && && Uhradené zálohami: & {{eur(invoice.advance)}} \\ \cline{5-6}
- && && Zostáva uhradiť: & {{eur(invoice.topay)}} \\ \cline{5-6}
- && && & \\
- && && \multirow{-2}{*}{K úhrade:} & \multirow{-2}{*}{ \bf \large {{eur(invoice.topay)}}\phantom} \\
- \end{tabu}
-
- \end{document}
|