Compare commits

...

2 Commits

1 changed files with 6 additions and 18 deletions

View File

@ -126,32 +126,20 @@ module Spree
# maximum insured value 5000 EUR # maximum insured value 5000 EUR
end end
def insurance_cost_DE(value) # we choose pricing between 2kg and 5kg; UPS Standard via shipcloud
if value <= 500
return 0
elsif value <= 2500
return 6
elsif value <= 25000
return 18
else
return 99999
end
end
# we choose pricing between 2kg and 5kg
def price_germany(value, weight) def price_germany(value, weight)
if weight < 2000 if weight < 2000
price = 4.99 price = 5.50
elsif weight < 5000 elsif weight < 5000
price = 5.99 price = 6.50
elsif weight < 10000 elsif weight < 10000
price = 8.49 price = 7.50
elsif weight < 31500 elsif weight < 31500
price = 16.49 price = 8.50
else else
price = 99999 price = 99999
end end
return price + insurance_cost_DE(value) return price
end end
# We assume a 5kg package in all zones below # We assume a 5kg package in all zones below