caboose-cms 0.5.105 → 0.5.106
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/caboose/order.rb +12 -0
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTlkMjdmZmNhMzA4OTE4MDUwMjBkNTRiMTVlYmM0YWM4MjM1ODBjZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Mzk4N2ViMTVkYTA1ZjBiZmE5OTU1NDY0ODg4NGYyYWZhMGZjOGU0Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTFkZDM3ZDFmNGNjZTA3MTM1NGJjYzg0YzI2YzNiYTgyZjBhMzIxZTI4MTEz
|
10
|
+
YTM1NWRlYTFmMWRiZDUwMGM0MWU4NTk1NzhkMGM3N2ZhZDZiOGFjMzBkMGNl
|
11
|
+
MzU3MTg5NDc5NjViMzk4YzYzOWMyZmU2NDNlNjdmYTAwY2M2Zjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzI2OWU3MDFiY2ExMzU1ZDVkMjg4YzYyMGMyMTRmZmNjNzYyNmJkOGExODVm
|
14
|
+
OGExMTFlNzJhODVhMWQ1OWYzYmY3OGJhNGE2ZTAyNjNjN2UyMDQ3MTQ1NGZh
|
15
|
+
YjJiMTcyNWQ0MTI1YTA4N2QwNWU5ZDQzODNkMDI3OWQ1YzlkNjA=
|
data/app/models/caboose/order.rb
CHANGED
@@ -71,6 +71,18 @@ module Caboose
|
|
71
71
|
:in => ['pending', 'authorized', 'captured', 'refunded', 'voided'],
|
72
72
|
:message => "%{value} is not a valid financial status. Must be 'authorized', 'captured', 'refunded' or 'voided'"
|
73
73
|
}
|
74
|
+
|
75
|
+
after_initialize :check_nil_fields
|
76
|
+
|
77
|
+
def check_nil_fields
|
78
|
+
self.subtotal = 0.00 if self.subtotal.nil?
|
79
|
+
self.tax = 0.00 if self.tax.nil?
|
80
|
+
self.shipping = 0.00 if self.shipping.nil?
|
81
|
+
self.handling = 0.00 if self.handling.nil?
|
82
|
+
self.custom_discount = 0.00 if self.custom_discount.nil?
|
83
|
+
self.discount = 0.00 if self.discount.nil?
|
84
|
+
self.total = 0.00 if self.total.nil?
|
85
|
+
end
|
74
86
|
|
75
87
|
def packages
|
76
88
|
self.order_packages
|
data/lib/caboose/version.rb
CHANGED