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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWE5ZDkzMzI3NTZkNGQ3ZGIwYjJmOGQzM2ZjYTE4Y2QxMTdhMTk2ZQ==
4
+ YTlkMjdmZmNhMzA4OTE4MDUwMjBkNTRiMTVlYmM0YWM4MjM1ODBjZg==
5
5
  data.tar.gz: !binary |-
6
- ODQ3Y2NmZDA1NWE1Y2UxOTg2Zjg5NjZmMWM5NDdmNTBhZWZiZTFhZA==
6
+ Mzk4N2ViMTVkYTA1ZjBiZmE5OTU1NDY0ODg4NGYyYWZhMGZjOGU0Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTAxMTA5NzkyYjY5ZTZjZWUzNWY0MDhjYTU3ZGFlMzQzODg0ZDdjMWZlMDdk
10
- N2VlY2FjOGUxODA4NjM1ZmMyMmExYTZlMTQwYTgyMTQzMDgwMTFjOGI3NzMy
11
- ZjE1YWI5YzllZTUzZWMxYWQ2ZjgyNDhmNGU1ZjlhNjE5ZTk1Zjk=
9
+ OTFkZDM3ZDFmNGNjZTA3MTM1NGJjYzg0YzI2YzNiYTgyZjBhMzIxZTI4MTEz
10
+ YTM1NWRlYTFmMWRiZDUwMGM0MWU4NTk1NzhkMGM3N2ZhZDZiOGFjMzBkMGNl
11
+ MzU3MTg5NDc5NjViMzk4YzYzOWMyZmU2NDNlNjdmYTAwY2M2Zjk=
12
12
  data.tar.gz: !binary |-
13
- M2Y5YjhkMzg5MzEwOGFhN2I1ZTllN2VjMjNmM2QzZTMxZmVkMjI4NDc4YTkz
14
- YTZlYjRjM2MwZTE1Zjg4ZTUzNzI3ZGFiZTM3M2JmNzdkNGIwY2Q1ZGE1NjZm
15
- OWI0YTE4ODMxOWIzNDNhNTA2OTYxYzczMTMxNDkyNDM4OGRlMjI=
13
+ NzI2OWU3MDFiY2ExMzU1ZDVkMjg4YzYyMGMyMTRmZmNjNzYyNmJkOGExODVm
14
+ OGExMTFlNzJhODVhMWQ1OWYzYmY3OGJhNGE2ZTAyNjNjN2UyMDQ3MTQ1NGZh
15
+ YjJiMTcyNWQ0MTI1YTA4N2QwNWU5ZDQzODNkMDI3OWQ1YzlkNjA=
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.105'
2
+ VERSION = '0.5.106'
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.5.105
4
+ version: 0.5.106
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry