Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

/ 10000 so that there aren't tiny decimals in the admin panel that ge…

…t truncated.
  • Loading branch information...
commit 3fdcbf4d316aa816119c19dcedcf6ba9c09348d5 1 parent c7e4bb5
@sfcgeorge authored
View
3  app/models/spree/calculator/curtain_area.rb
@@ -49,6 +49,9 @@ def compute(product_customization, variant=nil)
[preferred_pinch_multiplier, preferred_pinch_fabric_multiplier]
end
+ multiplier = multiplier / 10000
+ fabric_multiplier = fabric_multiplier / 10000
+
(area * multiplier) + (area * fabric_multiplier * variant.price)
end
View
5 app/views/spree/products/customizations/calculator/_curtain_area.html.erb
@@ -41,7 +41,10 @@
fabric_multiplier = 0;
break;
}
-
+
+ multiplier = multiplier / 10000;
+ fabric_multiplier = fabric_multiplier / 10000;
+
return (area * multiplier) + (area * fabric_multiplier * base_price);
}
<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.