diff --git a/app/views/split_checkout/_voucher_section.cable_ready.haml b/app/views/split_checkout/_voucher_section.cable_ready.haml index aaaac04e3e..a989f14af5 100644 --- a/app/views/split_checkout/_voucher_section.cable_ready.haml +++ b/app/views/split_checkout/_voucher_section.cable_ready.haml @@ -9,7 +9,7 @@ - if voucher_adjustment.present? %span.button.voucher-added %i.ofn-i_051-check-big - = "#{voucher_adjustment.originator.display_value} #{t("split_checkout.step2.voucher.voucher")}" + = t("split_checkout.step2.voucher.voucher", voucher_amount: voucher_adjustment.originator.display_value) = link_to t("split_checkout.step2.voucher.remove_code"), voucher_adjustment_path(id: voucher_adjustment.id), method: "delete", data: { confirm: t("split_checkout.step2.voucher.confirm_delete") } - # TODO: this might not be true, ie payment method include fee which wouldn't be covered by voucher, tax implication raise total to be bigger than voucher other ? - if voucher_adjustment.originator.value > order.total diff --git a/config/locales/en.yml b/config/locales/en.yml index 0dcfdd7585..889ffa5836 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2056,12 +2056,12 @@ en: submit: Next - Order summary cancel: Back to Your details voucher: - voucher: Voucher + voucher: "%{voucher_amount} Voucher" apply_voucher: Apply voucher apply: Apply placeholder: Enter voucher code remove_code: Remove code - confirm_delete: Are you sure you want to remove the voucher ? + confirm_delete: Are you sure you want to remove the voucher? warning_forfeit_remaining_amount: Your voucher value is more than your order. By using this voucher you are forfeiting the remaining value. step3: delivery_details: diff --git a/spec/system/consumer/split_checkout_spec.rb b/spec/system/consumer/split_checkout_spec.rb index d487365786..420389b087 100644 --- a/spec/system/consumer/split_checkout_spec.rb +++ b/spec/system/consumer/split_checkout_spec.rb @@ -782,7 +782,7 @@ describe "As a consumer, I want to checkout my order" do end it "removes voucher" do - accept_confirm "Are you sure you want to remove the voucher ?" do + accept_confirm "Are you sure you want to remove the voucher?" do click_on "Remove code" end