mail DE: There are no letters in Germany > 1kg anymore

This commit is contained in:
Harald Welte 2019-02-05 15:55:46 +01:00
parent a5dc694967
commit 404c16657e
1 changed files with 15 additions and 8 deletions

View File

@ -32,8 +32,6 @@ module Spree
# Maxibrief Einschreiben: 5.10
if weight < 1000
return 5.10
elsif weight < 2000
return 7.30
else
return 99999
end
@ -53,13 +51,22 @@ module Spree
end
def self.available?(object)
# Letters have a maximum weight of 2kg
iso_code = extract_iso_code(object)
weight = total_weight(object)
if weight < 2000
true
else
false
end
if iso_code == 'DE'
if weight < 1000
return true
else
return false
end
else
# Letters have a maximum weight of 2kg
if weight < 2000
return true
else
return false
end
end
end
def compute(object)