This commit is contained in:
Nicolas Bally 2017-06-07 19:23:07 +02:00
parent 99ae57c362
commit 6aad844697

View File

@ -1,5 +1,5 @@
-@read_only = true -@read_only = true
-@vouistar = true if @reseaux.id != 2 and @reseaux.parent_id != 2 -@vouistar = true if @reseaux.id == 2 or @reseaux.parent_id == 2
.center.row .center.row
.right .right
@ -49,8 +49,8 @@
-if !@vouistar -if !@vouistar
%th %th
CA CA
%th %th
Gains Gains
%th Dernière activité %th Dernière activité
@ -88,12 +88,12 @@
%td %td
=number_to_currency customer.accepted_offers.joins(:offer).where(:state => "documents_completed").sum("offers.price * accepted_offers.qte").to_f =number_to_currency customer.accepted_offers.joins(:offer).where(:state => "documents_completed").sum("offers.price * accepted_offers.qte").to_f
%td %td
-g = customer.accepted_offers.joins(:offer).where(:state => "documents_completed").sum("offers.gain * accepted_offers.qte").to_f -g = customer.accepted_offers.joins(:offer).where(:state => "documents_completed").sum("offers.gain * accepted_offers.qte").to_f
=number_to_currency g =number_to_currency g
-gain += g -gain += g
%td=time_ago_in_words(customer.last_activity) if customer.last_activity %td=time_ago_in_words(customer.last_activity) if customer.last_activity
@ -101,10 +101,11 @@
=link_to i(:eye), public_customer_path(customer) =link_to i(:eye), public_customer_path(customer)
=link_to i(:envelope), new_public_customer_message_path(:thing_type => "Customer", :thing_id => customer.id) =link_to i(:envelope), new_public_customer_message_path(:thing_type => "Customer", :thing_id => customer.id)
-if !@vouistar
%div{:style => "position:absolute;top:-30px;right:10px;"}
Gains : %div{:style => "position:absolute;top:-30px;right:10px;"}
=number_to_currency gain Gains :
=number_to_currency gain
-if @reseaux.id != 2 and @reseaux.parent_id != 2 -if @reseaux.id != 2 and @reseaux.parent_id != 2
%h3 Les besoins de mon réseau %h3 Les besoins de mon réseau