caboose-cms 0.8.10 → 0.8.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c9634c46690b5c4bc5137344dfd466e183bc620
4
- data.tar.gz: fddf702fa8d24cf49dbdadd308aef2e060944dc9
3
+ metadata.gz: 9c1a38c7958001c122e61895b2f7d359b74bf2f6
4
+ data.tar.gz: 31caf3a735aa7303f2a8231eea25125268701fe2
5
5
  SHA512:
6
- metadata.gz: 64d087ac2a8fb52977dc2ed22c1aeab5393140f239e9792c74699eb5f8a740d853c3b43627bd50e0c1bd3ecf0f71966fb966b3e5ac7e8de2144f6fa2b757e65a
7
- data.tar.gz: 5557ee652c97763cfbd1711519cf4dad40a1eeb0f98d7cc26d6c264c77cfe001e50e4548dd27da31ab861952ce4a0dda34139be7565f2e6ebac31f1c7708adbf
6
+ metadata.gz: 22d9e3eecde0cca94372615827879641ecf9c26b6e193ae3a6cfcc9bc02a14d17de4fe2ac2ca78d520246a41429b33d3d0b7ff2503465e5200628a32452dba79
7
+ data.tar.gz: cfcecd2436bd34a232099612a7d406b167d409c0807622b74dadc70552ec8eff4321c5b1cbe1bc9e9d6ef7ba64293b33555eca289a6e890ce965093e48efab7a
@@ -160,11 +160,14 @@ module Caboose
160
160
  self.update_column(:gift_wrap , self.calculate_gift_wrap )
161
161
 
162
162
  # Calculate the total without the discounts first
163
- self.discounts.each{ |d| d.update_column(:amount, 0.0) } if self.discounts
163
+ self.discounts.each{ |d| d.update_column(:amount, 0.0) } if self.discounts
164
+ self.update_column(:discount , 0.00)
164
165
  self.update_column(:total , self.calculate_total )
165
-
166
+
167
+ # Now calculate the discounts and re-calculate the total
166
168
  self.update_column(:discount , self.calculate_discount )
167
169
  self.update_column(:total , self.calculate_total )
170
+
168
171
  self.update_column(:cost , self.calculate_cost )
169
172
  self.update_column(:profit , self.calculate_profit )
170
173
  end
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.8.10'
2
+ VERSION = '0.8.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.10
4
+ version: 0.8.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry