caboose-cms 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/caboose/discount.rb +4 -4
- data/lib/caboose/version.rb +1 -1
- data/lib/tasks/caboose.rake +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6dabc8440a00b08aee9e2ceb2ffb8e6819b158dc
|
|
4
|
+
data.tar.gz: 5e6b0d5322f4df017c088b0b6d506c4a1b40a61a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d03c1a05647cbe03f8984007c0ac8825dd2f6b40d4c9ff8819d0207ac6db200450f360ba9ceb0930796a6f62bd8a3b27827b588a1f00e9faadc2e7d97ec78e2
|
|
7
|
+
data.tar.gz: ef60e51198a90e17a537cdc3381ddb51b3463ec1495faafbd9683a5c7fb48929cc5205d80e29e33879dc70e8a0c1ed80086b86f323ee1922f0eb4b4dc45cc688
|
|
@@ -17,10 +17,10 @@ module Caboose
|
|
|
17
17
|
def calculate_amount
|
|
18
18
|
gc = self.gift_card
|
|
19
19
|
self.amount = case self.gift_card.card_type
|
|
20
|
-
when GiftCard::CARD_TYPE_AMOUNT then (self.
|
|
21
|
-
when GiftCard::CARD_TYPE_PERCENTAGE then self.
|
|
22
|
-
when GiftCard::CARD_TYPE_NO_SHIPPING then self.
|
|
23
|
-
when GiftCard::CARD_TYPE_NO_TAX then self.
|
|
20
|
+
when GiftCard::CARD_TYPE_AMOUNT then (self.invoice.total >= gc.balance ? gc.balance : self.invoice.total)
|
|
21
|
+
when GiftCard::CARD_TYPE_PERCENTAGE then self.invoice.subtotal * gc.total
|
|
22
|
+
when GiftCard::CARD_TYPE_NO_SHIPPING then self.invoice.shipping
|
|
23
|
+
when GiftCard::CARD_TYPE_NO_TAX then self.invoice.tax
|
|
24
24
|
end
|
|
25
25
|
self.save
|
|
26
26
|
end
|
data/lib/caboose/version.rb
CHANGED
data/lib/tasks/caboose.rake
CHANGED
|
@@ -15,7 +15,7 @@ namespace :caboose do
|
|
|
15
15
|
sc.custom_packages_function = order_to_invoices_in_string(sc.custom_packages_function ) if sc.custom_packages_function && sc.custom_packages_function.strip.length > 0
|
|
16
16
|
sc.custom_shipping_function = order_to_invoices_in_string(sc.custom_shipping_function ) if sc.custom_shipping_function && sc.custom_shipping_function.strip.length > 0
|
|
17
17
|
sc.custom_tax_function = order_to_invoices_in_string(sc.custom_tax_function ) if sc.custom_tax_function && sc.custom_tax_function.strip.length > 0
|
|
18
|
-
sc.starting_invoice_number = sc.starting_order_number if sc.starting_order_number
|
|
18
|
+
#sc.starting_invoice_number = sc.starting_order_number if sc.starting_order_number
|
|
19
19
|
sc.save
|
|
20
20
|
end
|
|
21
21
|
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.
|
|
4
|
+
version: 0.8.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- William Barry
|
|
@@ -1277,7 +1277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1277
1277
|
version: '0'
|
|
1278
1278
|
requirements: []
|
|
1279
1279
|
rubyforge_project:
|
|
1280
|
-
rubygems_version: 2.
|
|
1280
|
+
rubygems_version: 2.5.1
|
|
1281
1281
|
signing_key:
|
|
1282
1282
|
specification_version: 4
|
|
1283
1283
|
summary: CMS built on rails.
|