Sha256: 339905dbf50109a887d5287837af35077be946b9a07443044b864183f3cbe320

Contents?: true

Size: 752 Bytes

Versions: 47

Compression:

Stored size: 752 Bytes

Contents

# frozen_string_literal: true

module Spree
  module Admin
    module StockMovementsHelper
      def pretty_originator(stock_movement)
        if stock_movement.originator.respond_to?(:number)
          if stock_movement.originator.respond_to?(:order)
            link_to stock_movement.originator.number, [:edit, :admin, stock_movement.originator.order]
          else
            stock_movement.originator.number
          end
        else
          ""
        end
      end

      def display_variant(stock_movement)
        variant = stock_movement.stock_item.variant
        output = [variant.name]
        output << variant.options_text unless variant.options_text.blank?
        safe_join(output, "<br />".html_safe)
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
solidus_backend-2.10.5 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.10.3 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.10.2 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.9.6 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.8.6 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.10.1 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.9.5 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.10.0 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.9.4 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.6.6 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.7.4 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.8.5 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.9.3 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.9.2 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.10.0.beta1 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.7.3 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.6.5 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.9.1 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.9.0 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-2.9.0.rc.1 app/helpers/spree/admin/stock_movements_helper.rb