.row
  - @organization.eligible_funding_sources.each do |fs|
    .col-md-4      
      = render :partial => 'fund_detail', :locals => {:fund => fs}
    
.row
  .col-md-12
    %table.table
      %thead
        %tr
          - @columns.each_with_index do |cell, idx|
            - if idx == 0
              %th.left= cell
            - else
              %th.center= cell
          - if @organization.direct_recipient
            %th
              
      %tbody      
        - @budgets.each do |row|
          %tr
            - row.each_with_index do |obj, idx|
              - if idx == 0
                %td.left= obj
              - else
                %td.right= format_as_currency(obj)
            - if @organization.direct_recipient
              %td
                %button.pull-right.btn.btn-success.btn-xs{:data => {:toggle => 'modal', :target => '#budget-edit-modal', :id => row[0].object_key}}
                  %i.fa.fa-edit= " Update"
    
      %tfoot
        %tr
          - @totals.each_with_index do |cell, idx|
            - if idx == 0
              %th.left= cell
            - else
              %th.right= format_as_currency(cell)

= render 'chart_scripts'

.row
  .col-md-12      
    .chart{:id => "chart_#{@report.id}"} 
       
.row
  .col-md-12
    %table.table
      %thead
        %tr
          - @columns.each_with_index do |cell, idx|
            - if idx == 0
              %th.left= cell
            - else
              %th.center= cell
          - if @organization.direct_recipient
            %th
              
      %tbody      
        - @budgets.each do |row|
          %tr
            - row.each_with_index do |obj, idx|
              - if idx == 0
                %td.left= obj
              - else
                %td.right= format_as_currency(obj)
            - if @organization.direct_recipient
              %td
                %button.pull-right.btn.btn-success.btn-xs{:data => {:toggle => 'modal', :target => '#budget-edit-modal', :id => row[0].object_key}}
                  %i.fa.fa-edit= " Update"
    
      %tfoot
        %tr
          - @totals.each_with_index do |cell, idx|
            - if idx == 0
              %th.left= cell
            - else
              %th.right= format_as_currency(cell)

= render 'chart_scripts'

Replace incomplete logic in CPT budgets view
Replace incomplete logic in CPT budgets view
