From 45b9a705e2b1026c2f992c61301b80c8bc30cc36 Mon Sep 17 00:00:00 2001 From: Martin Gross Date: Thu, 7 Sep 2023 17:55:43 +0200 Subject: [PATCH] Allow to refund currencies with zero decimals (#3583) --- .../templates/pretixcontrol/order/index.html | 2 +- .../pretixcontrol/order/refund_choose.html | 18 +++++++++--------- src/pretix/control/views/orders.py | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pretix/control/templates/pretixcontrol/order/index.html b/src/pretix/control/templates/pretixcontrol/order/index.html index 7050cd23b7..19cac2f022 100644 --- a/src/pretix/control/templates/pretixcontrol/order/index.html +++ b/src/pretix/control/templates/pretixcontrol/order/index.html @@ -110,7 +110,7 @@ {% localize off %} - + {% endlocalize %}
diff --git a/src/pretix/control/templates/pretixcontrol/order/refund_choose.html b/src/pretix/control/templates/pretixcontrol/order/refund_choose.html index d10485eb54..fe9ee5cec6 100644 --- a/src/pretix/control/templates/pretixcontrol/order/refund_choose.html +++ b/src/pretix/control/templates/pretixcontrol/order/refund_choose.html @@ -51,9 +51,9 @@
@@ -63,7 +63,7 @@ {% elif p.full_refund_possible %} @@ -101,7 +101,7 @@
{{ request.event.currency }} @@ -119,7 +119,7 @@
+ title="" class="form-control" placeholder="{{ 0|money_numberfield:request.event.currency }}"> {{ request.event.currency }} @@ -144,9 +144,9 @@ @@ -172,9 +172,9 @@
diff --git a/src/pretix/control/views/orders.py b/src/pretix/control/views/orders.py index 8eb840906c..56d4c445eb 100644 --- a/src/pretix/control/views/orders.py +++ b/src/pretix/control/views/orders.py @@ -1472,7 +1472,7 @@ class OrderTransition(OrderView): 'organizer': self.request.event.organizer.slug, 'code': self.order.code }) + '?start-action=do_nothing&start-mode=partial&start-partial_amount={}&giftcard={}&comment={}'.format( - round_decimal(self.order.pending_sum * -1), + round_decimal(self.order.pending_sum * -1, self.order.event.currency), 'true' if self.req and self.req.refund_as_giftcard else 'false', quote(gettext('Order canceled')) ))