diff --git a/features/refunding_all_order_units.feature b/features/refunding_all_order_units.feature index fa184bab..29a42841 100644 --- a/features/refunding_all_order_units.feature +++ b/features/refunding_all_order_units.feature @@ -20,6 +20,7 @@ Feature: Refunding all order units When I want to refund some units of order "#00000022" And I decide to refund all units of this order with "Space money" payment Then I should be notified that selected order units have been successfully refunded + And I should not be able to refund anything And this order refunded total should be "$40.00" But I should not be able to refund 1st unit with product "Mr. Meeseeks T-Shirt" And I should not be able to refund 2nd unit with product "Mr. Meeseeks T-Shirt" diff --git a/src/Resources/views/orderRefunds.html.twig b/src/Resources/views/orderRefunds.html.twig index 7a079053..a71e2556 100644 --- a/src/Resources/views/orderRefunds.html.twig +++ b/src/Resources/views/orderRefunds.html.twig @@ -5,6 +5,7 @@ {% block title %}{{ 'sylius.ui.order'|trans ~' #'~ order.number }} {{ 'sylius_refund.ui.refunds'|trans }} {{ parent() }}{% endblock %} {% set customer = order.customer %} +{% set disableButton = order.paymentState == constant('Sylius\\Component\\Core\\OrderPaymentStates::STATE_REFUNDED') ? 'disabled' : '' %} {% block content %} {% include '@SyliusRefundPlugin/_header.html.twig' %} @@ -15,8 +16,8 @@