pic_vert_app/app/views/admin/orders/index.html.haml
2015-01-29 23:29:08 +01:00

36 lines
693 B
Plaintext

.header
.right
=link_to "Ajouter", new_admin_order_path, :remote => true, :class => "btn btn-primary"
%h1 Liste des commandes
%table.table.table-border
%tr
%td
Somme estimée :
%td
=number_to_currency @orders.where(:paid => true).sum(:total)
%td
Nombre de commandes payées :
%td
=@orders.where(:paid => true).count
%td
Nombre de commandes abandonnées :
%td
=@orders.count - @orders.where(:paid => true).count
%table.table.table-striped
%tr
%th Date
%th Email
%th Nom
%th Paiement
%th Total
%th Frais
%th Nbr
%th
%tbody#orders
=render @orders