diff --git a/cli/OverheadAccounts.py b/cli/OverheadAccounts.py index 35e204a..4a6f172 100644 --- a/cli/OverheadAccounts.py +++ b/cli/OverheadAccounts.py @@ -286,6 +286,7 @@ def perform(dbh, params): letter['receivable_overhead'] = tenant['flat_area'] * houses[tenant['house_id']]['part_by_montharea'] * tenant['rent_time'] letter['unbalanced_overhead'] = tenant['paid_overhead'] - letter['receivable_overhead'] letter['unbalanced_overhead_unsigned'] = abs(letter['unbalanced_overhead']) + letter['total_overhead'] = houses[tenant['house_id']]['flat_sum_2'] letters.append(letter) diff --git a/cli/betriebskostenuebersicht.tmpl b/cli/betriebskostenuebersicht.tmpl index 5bd2fe5..e26b7fb 100644 --- a/cli/betriebskostenuebersicht.tmpl +++ b/cli/betriebskostenuebersicht.tmpl @@ -2,32 +2,41 @@ \usepackage{german} \usepackage{eurosym} \usepackage[a4paper, left=2cm, right=2cm, top=2cm]{geometry} +\usepackage{icomma} +\setlength{\parindent}{0pt} \begin{document} - -Haus: $details['description'] -Jahr: $year - -\begin{tabular}{|p{5cm}|r|r|r|} - -\hline Art & Wohnungen & andere Fl"achen & gesamt \\ - -\hline Fl"ache & $areas['flat_area'] & $areas['other_area'] & $areas['total_area'] \\ -\hline Faktor & #echo '%.10f' % $areas['flat_factor'] # & #echo '%.10f' % $areas['other_factor'] # & \\ +\subsection*{Betriebskostenabrechnung} -#for $item in $overhead_items -\hline $item['category'] & #echo '%.2f' % $item['flat_part'] # & #echo '%.2f' % $item['other_part'] # & #echo '%.2f' % $item['sum'] # \\ -#end for - -\hline Zwischensumme & #echo '%.2f' % $flat_sum # & #echo '%.2f' % $other_sum # & #echo '%.2f' % $total_sum # \\ -\hline Umlageausfallwagnis & #echo '%.2f' % $umlage_ausfall_wagnis # & & \\ -\hline Summe & #echo '%.2f' % $flat_sum_2 # & & \\ - -\hline Anteil / Monat / m2 & #echo '%.10f' % $part_by_montharea # & & \\ -\hline - +\begin{tabular}{ll} +Objekt & $details['description'] \\ +Jahr & $year \\ +Eigent"umer & Nober Grundbesitz GmbH \\ \end{tabular} +\addvspace{1cm} + + \begin{tabular}{|p{5cm}|r|r|r|} + \hline Art & Wohnungen & andere Fl"achen & Gesamtfl"ache \\ + \hline + \hline Fl"ache & \tt{$areas['flat_area']\,m\textsuperscript{2}} & \tt{$areas['other_area']\,m\textsuperscript{2}} & \tt{$areas['total_area']\,m\textsuperscript{2}} \\ + \hline Faktor & \tt{#echo '%.10f' % $areas['flat_factor'] #} & \tt{#echo '%.10f' % $areas['other_factor'] #} & \\ + + + #for $item in $overhead_items + \hline $item['category'] & \tt{#echo '%.2f' % $item['flat_part'] #\,\euro{}} & \tt{#echo '%.2f' % $item['other_part'] #\,\euro{}} & \tt{#echo '%.2f' % $item['sum'] #\,\euro{}} \\ + #end for + + \hline \multicolumn{4}{c}{ } \\ + \hline Zwischensumme & \tt{#echo '%.2f' % $flat_sum #\,\euro{}} & \tt{#echo '%.2f' % $other_sum #\,\euro{}} & \tt{#echo '%.2f' % $total_sum #\,\euro{}} \\ + \hline Umlageausfallwagnis & \tt{#echo '%.2f' % $umlage_ausfall_wagnis #\,\euro{}} & & \\ + \hline Summe & \tt{#echo '%.2f' % $flat_sum_2 #\,\euro{}} & & \\ + + \hline \multicolumn{4}{c}{ } \\ + \hline Anteil pro Monat und m\textsuperscript{2} & \tt{#echo '%.10f' % $part_by_montharea #\,\euro{}} & & \\ + \hline + \end{tabular} + \end{document} \ No newline at end of file diff --git a/cli/jahresabrechnung.tmpl b/cli/jahresabrechnung.tmpl index 2404c90..fb0fbad 100644 --- a/cli/jahresabrechnung.tmpl +++ b/cli/jahresabrechnung.tmpl @@ -23,29 +23,27 @@ f"ur die im vergangenen Jahr angefallenen Betriebskosten ergibt sich f"ur Sie folgende Abrechnung. - \texttt{ - \begin{tabular}{|p{10cm}|p{5cm}|} - \hline Jahr & $year \\ - \hline Haus & $tenant['house'] \\ - \hline Betriebskosten gesamt & gesamtbetriebskosten\,\euro{} \\ - \hline Gesamt-Wohnfl"ache & $flat_area\,m\textsuperscript{2} \\ - \hline Ihre Wohnung & $tenant['flat'] \\ - \hline Ihre Wohnfl"ache & $tenant['flat_area']\,m\textsuperscript{2} \\ - \hline Ihre Mietzeit & $tenant['rent_time']\,Monate \\ - \hline Ihr Betriebskostenanteil nach Fl"ache und Mietzeit & #echo '%.2f' % $receivable_overhead #\,\euro{} \\ - \hline Ihre Zahlungen & $tenant['paid_total']\,\euro{} \\ - \hline davon Anteil Miete & $tenant['receivable_fee']\,\euro{} \\ - \hline davon Anteil Betriebskostenvorauszahlung & $tenant['paid_overhead']\,\euro{} \\ - \hline - #if $unbalanced_overhead < 0 - Zuwenig - #else - Zuviel - #end if - gezahlte Betriebskosten & #echo '%.2f' % $unbalanced_overhead_unsigned #\,\euro{} \\ - \hline - \end{tabular} - } + \begin{tabular}{|p{10cm}|r|} + \hline Jahr & \tt{$year} \\ + \hline Haus & $tenant['house'] \\ + \hline Betriebskosten gesamt & \tt{#echo '%.2f' % $total_overhead #\,\euro{}} \\ + \hline Gesamt-Wohnfl"ache & \tt{$flat_area\,m\textsuperscript{2}} \\ + \hline Ihre Wohnung & $tenant['flat'] \\ + \hline Ihre Wohnfl"ache & \tt{$tenant['flat_area']\,m\textsuperscript{2}} \\ + \hline Ihre Mietzeit & \tt{$tenant['rent_time']\,Monate} \\ + \hline Ihr Betriebskostenanteil nach Fl"ache und Mietzeit & \tt{#echo '%.2f' % $receivable_overhead #\,\euro{}} \\ + \hline Ihre Zahlungen & \tt{$tenant['paid_total']\,\euro{}} \\ + \hline davon Anteil Miete & \tt{$tenant['receivable_fee']\,\euro{}} \\ + \hline davon Anteil Betriebskostenvorauszahlung & \tt{$tenant['paid_overhead']\,\euro{}} \\ + \hline + #if $unbalanced_overhead < 0 + Zuwenig + #else + Zuviel + #end if + gezahlte Betriebskosten & \tt{#echo '%.2f' % $unbalanced_overhead_unsigned #\,\euro{}} \\ + \hline + \end{tabular} #if 1 > 0 Bitte "uberweisen Sie den Betrag von #echo '%.2f' % $unbalanced_overhead_unsigned #\,\euro{} kurzfristig auf mein Konto.