From 606a88e649e9051b4e71280831682abc6f0eaa95 Mon Sep 17 00:00:00 2001 From: Daniel Muyshond Date: Tue, 6 Oct 2020 15:31:44 +0200 Subject: [PATCH] [TELE-694] fix wrong copy paste (line I shouldn't cc) --- passerelle_imio_extra_fees/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passerelle_imio_extra_fees/models.py b/passerelle_imio_extra_fees/models.py index 6fb472f..a63582f 100644 --- a/passerelle_imio_extra_fees/models.py +++ b/passerelle_imio_extra_fees/models.py @@ -67,13 +67,13 @@ class ExtraFees(BaseResource): destination = basket_item["request_data"]["form_var_destinations_raw"] if destination and "mail" in destination: postage_fee = 0 - postage_fee = nb_letter * postage_fee if Decimal(basket_item['request_data']['postage_fee']) > postage_fee: postage_fee = Decimal(basket_item['request_data']['postage_fee']) except KeyError: # basket item not associated with any document, no fee pass nb_letter = int(nb_documents / int(self.max_doc_in_letter)) + (((nb_documents % int(self.max_doc_in_letter)) > 0) and 1 or 0) + postage_fee = nb_letter * postage_fee return {'data': [{'subject': force_text(_('Postage')), 'amount': str(postage_fee)}]} def namur_compute(self, request, **kwargs):