summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Muyshond <daniel.muyshond@gmail.com>2020-10-06 13:31:44 (GMT)
committerDaniel Muyshond <daniel.muyshond@gmail.com>2020-10-06 13:31:44 (GMT)
commit606a88e649e9051b4e71280831682abc6f0eaa95 (patch)
tree0412f9685070c9fdae9e0b3e9b1497427f4cd42a
parent9d2d2594b7b07cb45b7be6429eaf1336196152bb (diff)
downloadpasserelle-imio-extra-fees-606a88e649e9051b4e71280831682abc6f0eaa95.zip
passerelle-imio-extra-fees-606a88e649e9051b4e71280831682abc6f0eaa95.tar.gz
passerelle-imio-extra-fees-606a88e649e9051b4e71280831682abc6f0eaa95.tar.bz2
[TELE-694] fix wrong copy paste (line I shouldn't cc)
-rw-r--r--passerelle_imio_extra_fees/models.py2
1 files changed, 1 insertions, 1 deletions
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):