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 +4 -4
- data/app/models/caboose/invoice.rb +5 -2
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c1a38c7958001c122e61895b2f7d359b74bf2f6
|
4
|
+
data.tar.gz: 31caf3a735aa7303f2a8231eea25125268701fe2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/caboose/version.rb
CHANGED