diff --git a/app/views/spree/admin/orders/_shipment.html.haml b/app/views/spree/admin/orders/_shipment.html.haml index 72ef176c85..e3455ab872 100644 --- a/app/views/spree/admin/orders/_shipment.html.haml +++ b/app/views/spree/admin/orders/_shipment.html.haml @@ -40,18 +40,6 @@ = label_tag 'selected_shipping_rate_id', Spree.t(:shipping_method) = select_tag :selected_shipping_rate_id, options_for_select(shipment.shipping_rates.backend.map { |sr| ["#{sr.name} #{sr.display_price}", sr.id] }, shipment.selected_shipping_rate_id), { :class => 'select2 fullwidth', :data => { 'shipment-number' => shipment.number } } - - if shipment.fee_adjustment&.closed? - %div.field.omega.four.columns - %label - = Spree.t(:associated_adjustment_closed) - %ul - %li - = radio_button_tag :open_adjustment, 'yes', false, :data => { 'shipment-number' => shipment.number } - = "Yes" - %li - = radio_button_tag :open_adjustment, 'no', true, :data => {'shipment-number' => shipment.number } - = "No" - %td.actions - if can? :update, shipment = link_to '', '', :class => 'save-method icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, title: I18n.t('actions.save') diff --git a/spec/views/spree/admin/orders/edit.html.haml_spec.rb b/spec/views/spree/admin/orders/edit.html.haml_spec.rb index 96c4f404af..267ab455eb 100644 --- a/spec/views/spree/admin/orders/edit.html.haml_spec.rb +++ b/spec/views/spree/admin/orders/edit.html.haml_spec.rb @@ -59,6 +59,12 @@ describe "spree/admin/orders/edit.html.haml" do text: out_of_stock_line_item.variant.display_name end end + + it "doesn't display closed associated adjustments" do + render + + expect(rendered).to_not have_content "Associated adjustment closed" + end end context "when order is incomplete" do @@ -93,5 +99,11 @@ describe "spree/admin/orders/edit.html.haml" do expect(rendered).to_not have_content "Out of Stock" end end + + it "doesn't display closed associated adjustments" do + render + + expect(rendered).to_not have_content "Associated adjustment closed" + end end end