suite
This commit is contained in:
parent
ad61aee2dc
commit
1aa0f90198
@ -132,7 +132,7 @@ class ProductOrder < ActiveRecord::Base
|
|||||||
def archived_total_articles_tva
|
def archived_total_articles_tva
|
||||||
total = 0.0
|
total = 0.0
|
||||||
product_order_products.each do |p|
|
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
|
end
|
||||||
total
|
total
|
||||||
end
|
end
|
||||||
@ -143,7 +143,7 @@ class ProductOrder < ActiveRecord::Base
|
|||||||
def archived_total_articles
|
def archived_total_articles
|
||||||
archived_total = 0.0
|
archived_total = 0.0
|
||||||
product_order_products.each do |p|
|
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
|
end
|
||||||
archived_total
|
archived_total
|
||||||
end
|
end
|
||||||
@ -304,7 +304,7 @@ class ProductOrder < ActiveRecord::Base
|
|||||||
def total_articles
|
def total_articles
|
||||||
total = 0.0
|
total = 0.0
|
||||||
product_order_products.each do |p|
|
product_order_products.each do |p|
|
||||||
total += p.final_price_ttc_with_qty
|
total += p.final_price_ht_with_qty
|
||||||
end
|
end
|
||||||
total
|
total
|
||||||
end
|
end
|
||||||
@ -317,7 +317,7 @@ class ProductOrder < ActiveRecord::Base
|
|||||||
def total_articles_tva
|
def total_articles_tva
|
||||||
total = 0.0
|
total = 0.0
|
||||||
product_order_products.each do |p|
|
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
|
end
|
||||||
total
|
total
|
||||||
end
|
end
|
||||||
|
@ -27,6 +27,10 @@ class ProductOrderProduct < ActiveRecord::Base
|
|||||||
qty.to_f * product.final_price_ttc.to_f
|
qty.to_f * product.final_price_ttc.to_f
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def final_price_ht_with_qty
|
||||||
|
qty.to_f * product.final_price_ht.to_f
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def archived_price_ttc_with_qty
|
def archived_price_ttc_with_qty
|
||||||
@ -46,6 +50,14 @@ class ProductOrderProduct < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
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
|
def verify_qty
|
||||||
|
|
||||||
|
@ -178,11 +178,11 @@
|
|||||||
=# product_order_product.archived_product_option.lang(I18n.locale).name if product_order_product.archived_product_option
|
=# product_order_product.archived_product_option.lang(I18n.locale).name if product_order_product.archived_product_option
|
||||||
|
|
||||||
%td{:style => "text-align:right;"}
|
%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;"}
|
%td{:style => "text-align:right;"}
|
||||||
=product_order_product.qty
|
=product_order_product.qty
|
||||||
%td{:style => "text-align:right;"}
|
%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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
=#render :partial => "public/shared/ga"
|
=#render :partial => "public/shared/ga"
|
||||||
|
|
||||||
|
|
||||||
<link href='https://fonts.googleapis.com/css?family=Lobster|Open+Sans' rel='stylesheet' type='text/css'>
|
<link href="https://fonts.googleapis.com/css?family=Lobster|Open+Sans:400,800" rel="stylesheet">
|
||||||
|
|
||||||
=javascript_include_tag "https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"
|
=javascript_include_tag "https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"
|
||||||
|
|
||||||
@ -44,22 +44,22 @@
|
|||||||
%br
|
%br
|
||||||
.inner
|
.inner
|
||||||
|
|
||||||
%p
|
%p{:style => "text-align:center;font-weight:800 !important;font-size:1.3em;"}
|
||||||
Ou trouver mon Pack ?
|
%strong Ou trouver mon Pack ?
|
||||||
|
|
||||||
%p
|
%p
|
||||||
=image_tag( "/declic.png", :style => "display:block;margin:20px auto;max-width:100%;")
|
=image_tag( "/declic.png", :style => "display:block;margin:20px auto;max-width:100%;")
|
||||||
.columns
|
.columns
|
||||||
%h2
|
%h2
|
||||||
Entreprises – Commerçants
|
Entreprises – Commerçants
|
||||||
Profession Libérales – Collectivités
|
Professions Libérales – Collectivités
|
||||||
Associations
|
Associations
|
||||||
.inner
|
.inner
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%center
|
%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"
|
=link_to image_tag( "/logo2.png", :style => "display:block;margin:20px auto;width:160px;"), "http://negos.pro", :target => "_blank"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%td.boutique-right
|
%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;"}
|
%td{:style => "width:150px;text-align:center;"}
|
||||||
-if !@recap
|
-if !@recap
|
||||||
.qty_form
|
.qty_form
|
||||||
@ -29,4 +29,4 @@
|
|||||||
-else
|
-else
|
||||||
=product_order_product.qty
|
=product_order_product.qty
|
||||||
%td.boutique-right
|
%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)
|
||||||
|
@ -6,15 +6,16 @@
|
|||||||
.description
|
.description
|
||||||
%h3.product-title
|
%h3.product-title
|
||||||
=product.lang(I18n.locale).title
|
=product.lang(I18n.locale).title
|
||||||
%div.product-price
|
-if false
|
||||||
-if !product.price_reduced_ht
|
%div.product-price
|
||||||
= number_to_currency(product.price_ttc, locale: :fr)
|
-if !product.price_reduced_ht
|
||||||
-else
|
|
||||||
= number_to_currency(product.price_reduced_ttc, locale: :fr)
|
|
||||||
%del.strip
|
|
||||||
= number_to_currency(product.price_ttc, locale: :fr)
|
= number_to_currency(product.price_ttc, locale: :fr)
|
||||||
-if product.in_stock > 0
|
-else
|
||||||
.stock
|
= 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user