.grid_12 %ul#breadcrumb %li.home %a{ :href => '/'} Home %li %a{ :href => '/services' } Services %li = @service.name %h2= @page_title = @service.name %p A service in the %a{ :href => '/directorates/' + @service.directorate.slug } = @service.directorate.name Directorate %p.noprint.download %a{ :href => "/services/#{@service.slug}.csv" } Download data as CSV %p %h3 Summary %table %tr %th.right Payments %th.right Total %th.right Max %th.right Min %th.right Average %tr %td.right= @count %td.right= sprintf("£%0d", @total) %td.right= sprintf("£%0d", @max) %td.right= sprintf("£%0d", @min) %td.right= sprintf("£%0d", @avg) %p %h3 Suppliers by Spend %table %tr %th Supplier %th Total £ %th Total % - for row in @results %tr %td %a{ :href => "/suppliers/#{row['supplier_slug']}" } = row['supplier_name'] %td.right= sprintf("%0d", row['total']) %td.right= sprintf("%0.1f", row['total'] / @total * 100) %p %h3 Payments to Suppliers %table %tr %th Date %th Ref. %th Supplier %th.right £ - for payment in @service.payments %tr %td= payment.d.strftime("%d %b %Y") %td.right %a{ :href => "/payments/#{payment.id}" } = payment.id %td %a{ :href => '/suppliers/' + payment.supplier.slug } = payment.supplier.name %td.right= sprintf("%0d", payment.amount) %tr %td %td %td %strong TOTAL %td.right= sprintf("%0d", @total) .clear
= haml_partial "comment_header"
Comments powered by Disqus