= contextual_links

.page-header
  %h1= t_title

  %table.list
    %tr
      %th= t_attr :code
      %th= t_attr :title
      %th.right= t_attr :amount

    - for template in @salary_booking_templates
      - amount = template.line_items.where(:date => @duration).sum(&:total_amount)
      - next if amount == 0
      %tr
        %td= template.code
        %td= template.title
        %td.currency= currency_fmt(amount)

- content_for :sidebar do
  .sub-tabs
    %ul
      - for month in 1..12
        - date = Date.new(Date.today.year, month, 1)
        %li= link_to t('date.month_names')[date.month], url_for(:date => date.to_s(:db))

= contextual_links

.page-header
  %h1= t_title

  %table.list
    %tr
      %th= t_attr :code
      %th= t_attr :title
      %th.right= t_attr :amount

    - for template in @salary_booking_templates
      - amount = template.line_items.where(:date => @duration).sum(&:accounted_amount)
      - next if amount == 0
      %tr
        %td= template.code
        %td= template.title
        %td.currency= currency_fmt(amount)

- content_for :sidebar do
  .sub-tabs
    %ul
      - for month in 1..12
        - date = Date.new(Date.today.year, month, 1)
        %li= link_to t('date.month_names')[date.month], url_for(:date => date.to_s(:db))

Use accounted_amount in salary booking template statistics.
Use accounted_amount in salary booking template statistics.
