44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
%tr#p_customer{:id => p_customer.id, :class => ("table-warning" if !p_customer.account_validated)}
|
|
%td= p_customer.email
|
|
%td= p_customer.code
|
|
%td= p_customer.show_name
|
|
|
|
%td= p_customer.particular.cp if p_customer.particular
|
|
%td= p_customer.particular.city if p_customer.particular
|
|
%td
|
|
-if p_customer.cache_encours < 0
|
|
%span{:style => "color:green"}=number_to_currency p_customer.cache_encours
|
|
-elsif p_customer.cache_encours > 0
|
|
%span=number_to_currency p_customer.cache_encours
|
|
|
|
|
|
-if false
|
|
%td{:style => "text-align:right;"}=number_to_currency p_customer.p_customer_sheets.sum(:a_ok_total)
|
|
%td
|
|
-emails = []
|
|
|
|
|
|
-p_contacts = p_customer.p_contacts
|
|
|
|
-p_customer.particulars.each do |p|
|
|
-p_contacts = p_contacts + p.p_contacts
|
|
|
|
|
|
-p_contacts.uniq.each do |p_c|
|
|
|
|
-emails << p_c.email
|
|
|
|
-emails << p_customer.email
|
|
|
|
-emails = emails.uniq
|
|
|
|
=emails.size
|
|
|
|
|
|
|
|
%td.actions
|
|
= link_to i(:"trash-o"), [:admin, p_customer], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet auteur ? ' } , :remote => true
|
|
= link_to i(:pencil), edit_admin_p_customer_path(p_customer), :remote => true
|
|
= link_to i(:eye), admin_p_customer_path(p_customer)
|
|
|