tamaloa/direktkreditverwaltung

View on GitHub
app/views/year_end_closings/show.html.haml

Summary

Maintainability
Test Coverage
%h1= "Jahresabschluss #{@year_end_closing.year}"

.btn.btn-info
  = link_to 'Übersichtstabelle herunterladen', year_end_closing_path(@year_end_closing, format: :csv)

.btn.btn-info
  = link_to 'Alle Auszüge in ZIP-Datei', year_end_closing_path(@year_end_closing, format: :zip)

.btn.btn-warning
  = link_to 'Kontoauszüge verschicken', emails_path(year: @year_end_closing.year)


%h3 Übersichttabelle Jahresabschluss

%table.table
  %thead
    %th DK#
    %th DK Geber_in
    %th Vorjahressaldo
    %th Kontobewegungen
    %th Zinsen
    %th Saldo Jahresabschluss
    %th Jahresabschluss
  - @year_end_closing.contracts.each do |contract|
    %tr
      %td= link_to contract.number, contract
      %td= contact_short(contract.contact)
      %td= currency @year_end_closing.balance_closing_of_year_before(contract)
      %td= @year_end_closing.movements_excluding_interest(contract)
      %td= currency @year_end_closing.annual_interest(contract)
      %td= currency @year_end_closing.balance_closing_of_year(contract)
      %td
        = link_to "Kontoauszug",
                    year_closing_statement_path(contract, year: @year_end_closing.year)
        = link_to "(als PDF)",
                    year_closing_statement_path(contract, year: @year_end_closing.year, format: :pdf),
                    target: '_blank'