diff --git a/app/models/product_order.rb b/app/models/product_order.rb
index 7d57ef0..d52ce9d 100755
--- a/app/models/product_order.rb
+++ b/app/models/product_order.rb
@@ -132,7 +132,7 @@ class ProductOrder < ActiveRecord::Base
def archived_total_articles_tva
total = 0.0
product_order_products.each do |p|
- total += p.archived_final_price_ttc_with_qty * (p.tva_archived/100.0)
+ total += p.archived_final_price_ht_with_qty * (p.tva_archived/100.0)
end
total
end
@@ -143,7 +143,7 @@ class ProductOrder < ActiveRecord::Base
def archived_total_articles
archived_total = 0.0
product_order_products.each do |p|
- archived_total += p.archived_final_price_ttc_with_qty
+ archived_total += p.archived_final_price_ht_with_qty
end
archived_total
end
@@ -304,7 +304,7 @@ class ProductOrder < ActiveRecord::Base
def total_articles
total = 0.0
product_order_products.each do |p|
- total += p.final_price_ttc_with_qty
+ total += p.final_price_ht_with_qty
end
total
end
@@ -317,7 +317,7 @@ class ProductOrder < ActiveRecord::Base
def total_articles_tva
total = 0.0
product_order_products.each do |p|
- total += p.final_price_ttc_with_qty * (p.tva/100.0)
+ total += p.final_price_ht_with_qty * (p.tva/100.0)
end
total
end
diff --git a/app/models/product_order_product.rb b/app/models/product_order_product.rb
index 0128305..c364888 100755
--- a/app/models/product_order_product.rb
+++ b/app/models/product_order_product.rb
@@ -27,6 +27,10 @@ class ProductOrderProduct < ActiveRecord::Base
qty.to_f * product.final_price_ttc.to_f
end
+ def final_price_ht_with_qty
+ qty.to_f * product.final_price_ht.to_f
+ end
+
def archived_price_ttc_with_qty
@@ -46,6 +50,14 @@ class ProductOrderProduct < ActiveRecord::Base
end
end
+ def archived_final_price_ht_with_qty
+ if archived_product
+ qty.to_f * archived_product.final_price_ht.to_f
+ else
+ 0
+ end
+ end
+
def verify_qty
diff --git a/app/views/admin/product_orders/bl.html.haml b/app/views/admin/product_orders/bl.html.haml
index fe990ca..a2b5dcd 100644
--- a/app/views/admin/product_orders/bl.html.haml
+++ b/app/views/admin/product_orders/bl.html.haml
@@ -178,11 +178,11 @@
=# product_order_product.archived_product_option.lang(I18n.locale).name if product_order_product.archived_product_option
%td{:style => "text-align:right;"}
- = number_to_currency(product_order_product.archived_product.final_price_ttc.to_f, locale: :fr) if product_order_product.archived_product
+ = number_to_currency(product_order_product.archived_product.final_price_ht.to_f, locale: :fr) if product_order_product.archived_product
%td{:style => "text-align:right;"}
=product_order_product.qty
%td{:style => "text-align:right;"}
- = number_to_currency(product_order_product.archived_final_price_ttc_with_qty, locale: :fr) if product_order_product.archived_product
+ = number_to_currency(product_order_product.archived_final_price_ht_with_qty, locale: :fr) if product_order_product.archived_product
diff --git a/app/views/layouts/vouisstar.html.haml b/app/views/layouts/vouisstar.html.haml
index 12d1cd5..40ce629 100644
--- a/app/views/layouts/vouisstar.html.haml
+++ b/app/views/layouts/vouisstar.html.haml
@@ -20,7 +20,7 @@
=#render :partial => "public/shared/ga"
-
+
=javascript_include_tag "https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"
@@ -44,22 +44,22 @@
%br
.inner
- %p
- Ou trouver mon Pack ?
+ %p{:style => "text-align:center;font-weight:800 !important;font-size:1.3em;"}
+ %strong Ou trouver mon Pack ?
%p
=image_tag( "/declic.png", :style => "display:block;margin:20px auto;max-width:100%;")
.columns
%h2
Entreprises – Commerçants
- Profession Libérales – Collectivités
+ Professions Libérales – Collectivités
Associations
.inner
%center
- =link_to "Commander maintenant", "http://negos.pro/public/customers_auths/new?p=KJ6XC9", :target => "_blank", :style => "display:inline-block;margin:20px;padding:12px 20px;border:1px solid #f59c00;color:white;background:#f59c00;font-weight:bold;text-decoration:none;"
+ =link_to "Commander maintenant", "http://negos.pro/public/customers_auths/new?p=KJ6XC9", :target => "_blank", :style => "display:inline-block;margin:20px;padding:12px 20px;border:1px solid #f59c00;color:white;background:#f59c00;font-weight:bold;text-decoration:none;text-transform:uppercase;"
=link_to image_tag( "/logo2.png", :style => "display:block;margin:20px auto;width:160px;"), "http://negos.pro", :target => "_blank"
diff --git a/app/views/public/product_order_products/_product_order_product.html.haml b/app/views/public/product_order_products/_product_order_product.html.haml
index 7056bac..bd419e6 100755
--- a/app/views/public/product_order_products/_product_order_product.html.haml
+++ b/app/views/public/product_order_products/_product_order_product.html.haml
@@ -15,7 +15,7 @@
%td.boutique-right
- = number_to_currency(product_order_product.product.final_price_ttc.to_f, locale: :fr)
+ = number_to_currency(product_order_product.product.final_price_ht.to_f, locale: :fr)
%td{:style => "width:150px;text-align:center;"}
-if !@recap
.qty_form
@@ -29,4 +29,4 @@
-else
=product_order_product.qty
%td.boutique-right
- = number_to_currency(product_order_product.final_price_ttc_with_qty, locale: :fr)
+ = number_to_currency(product_order_product.final_price_ht_with_qty, locale: :fr)
diff --git a/app/views/public/products/_product.html.haml b/app/views/public/products/_product.html.haml
index bb91c81..e7f77b4 100755
--- a/app/views/public/products/_product.html.haml
+++ b/app/views/public/products/_product.html.haml
@@ -6,15 +6,16 @@
.description
%h3.product-title
=product.lang(I18n.locale).title
- %div.product-price
- -if !product.price_reduced_ht
- = number_to_currency(product.price_ttc, locale: :fr)
- -else
- = number_to_currency(product.price_reduced_ttc, locale: :fr)
- %del.strip
+ -if false
+ %div.product-price
+ -if !product.price_reduced_ht
= number_to_currency(product.price_ttc, locale: :fr)
- -if product.in_stock > 0
- .stock
+ -else
+ = number_to_currency(product.price_reduced_ttc, locale: :fr)
+ %del.strip
+ = number_to_currency(product.price_ttc, locale: :fr)
+ -if product.in_stock > 0
+ .stock