[TELE-694] no postage fees if send by mail fix
This commit is contained in:
parent
606a88e649
commit
7d970bf325
|
@ -63,10 +63,10 @@ class ExtraFees(BaseResource):
|
|||
for basket_item in data['data']:
|
||||
try:
|
||||
nb_documents += int(basket_item['request_data']['nb_documents'])
|
||||
# Check if the item in send by mail and if so there is no postage_fee
|
||||
destination = basket_item["request_data"]["form_var_destinations_raw"]
|
||||
if destination and "mail" in destination:
|
||||
postage_fee = 0
|
||||
destination = basket_item['request_data']['destination'] # Passed in the workflow webservice
|
||||
# No postage fees if send by mail
|
||||
if destination and 'mail' in destination:
|
||||
postage_fee = Decimal(0)
|
||||
if Decimal(basket_item['request_data']['postage_fee']) > postage_fee:
|
||||
postage_fee = Decimal(basket_item['request_data']['postage_fee'])
|
||||
except KeyError:
|
||||
|
|
Loading…
Reference in New Issue