From 80ac82acc05f177598f1e1b0b4ec8d253c0d8e1b Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 25 Jan 2023 19:16:22 +0530 Subject: [PATCH 1/2] Improve order refund flow --- .../controllers/orders/helpers/view/view.tpl | 9 ++--- controllers/admin/AdminOrdersController.php | 31 +++++++++++++++++ .../AdminOrderRefundRequestsController.php | 31 ++++++++++------- .../helpers/view/view.tpl | 34 +++++++++++-------- 4 files changed, 72 insertions(+), 33 deletions(-) diff --git a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl index b84467ddd..4ba118091 100644 --- a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -160,7 +160,7 @@ {if $refund_allowed && !$hasCompletelyRefunded} - {if $order->hasBeenPaid()} + {if $order->getTotalPaid()|floatval} {l s='Initiate refund'} {else} {l s='Cancel bookings'} @@ -517,12 +517,7 @@ {$payment_types[$payment['payment_type']]['name']|escape:'html':'UTF-8'} {$payment['transaction_id']|escape:'html':'UTF-8'} {displayPrice price=$payment['real_paid_amount'] currency=$payment['id_currency']} - - {if $payment['invoice_number']} - {$payment['invoice_number']} - {else} - {/if} - + {if isset($payment['invoice_number'])}{$payment['invoice_number']}{else}--{/if}