My favorites
▼
|
Sign in
substruct
Open-source Ruby on Rails E-Commerce
Project Home
Downloads
Wiki
Issues
Source
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
169
attachment: truncate_cost.diff
(630 bytes)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Index: substruct/app/models/order.rb
===================================================================
--- substruct/app/models/order.rb (revision 163)
+++ substruct/app/models/order.rb (working copy)
@@ -449,7 +449,8 @@
logger.info "LINE ITEMS TOTAL: #{self.line_items_total}"
logger.info "SHIPPING COST: #{self.shipping_cost}"
logger.info "TAX COST: #{self.tax_cost}"
- self.line_items_total + self.shipping_cost + self.tax_cost
+ total = self.line_items_total + self.shipping_cost + self.tax_cost
+ ("%.02f" % (total)).to_f # truncate at two decimals
end
# The tax of items if applied.
Powered by
Google Project Hosting