Sha256: 38e13d6b3f4999846ef414f1d3b6b441e63d524dbf8e763b76a48a74a732d5ad

Contents?: true

Size: 795 Bytes

Versions: 30

Compression:

Stored size: 795 Bytes

Contents

# frozen_string_literal: true

module Spree
  module Admin
    module StockMovementsHelper
      def pretty_originator(stock_movement)
        originator = stock_movement.originator

        if originator.respond_to?(:number)
          if originator.respond_to?(:order)
            link_to originator.number, [:edit, :admin, originator.order]
          else
            originator.number
          end
        elsif originator.respond_to?(:email)
          originator.email
        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

30 entries across 30 versions & 1 rubygems

Version Path
solidus_backend-4.4.1 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.4.0 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.3.4 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.2.4 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.1.5 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.3.3 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.3.2 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.1.4 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.3.1 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.3.0 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.2.3 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.1.3 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.0.4 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-3.4.6 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.0.3 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.1.2 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.2.2 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-3.4.5 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.2.1 app/helpers/spree/admin/stock_movements_helper.rb
solidus_backend-4.2.0 app/helpers/spree/admin/stock_movements_helper.rb