.grid_12 %ul#breadcrumb %li.home %a{ :href => '/'} Home %li %a{ :href => '/services' } Services %li = @service.name %h2= @page_title = @service.name + " (Service)" %p.noprint.download %a{ :href => "/services/#{@service.slug}.csv" } Download data as CSV %table %tr %th Date %th Ref. %th Directorate %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 => '/directorates/' + payment.directorate.slug } = payment.directorate.name %td %a{ :href => '/suppliers/' + payment.supplier.slug } = payment.supplier.name %td.right= sprintf("%0d", payment.amount) %tr %td %td %td %td %strong TOTAL %td.right= sprintf("%0d", @total) %table %tr %th.right Count %th.right Max %th.right Min %th.right Average %tr %td.right= @count %td.right= sprintf("%0d", @max) %td.right= sprintf("%0d", @min) %td.right= sprintf("%0d", @avg)