lib/pack_material/repositories/config_repo.rb
# Check if role link to Customer or Supplier exists for applicable Product Variant
#
# @param attrs [Hash] material_resource_product_variant_party_roles attributes for create
# @return [Boolean]
Check if role link to Customer or Supplier exists for applicable Product Variant
Check if role link to Customer or Supplier exists for applicable Product Variant
def role_type_exists(attrs)
      args = {
        material_resource_product_variant_id: attrs[:material_resource_product_variant_id],
        "#{role_type(attrs).downcase}_id": (attrs[:customer_id] || attrs[:supplier_id])
      }
      exists?(:material_resource_product_variant_party_roles, args)
    end
def role_type_exists ( attrs ) args = { material_resource_product_variant_id : attrs [ :material_resource_product_variant_id ] , "#{role_type(attrs).downcase}_id" : ( attrs [ :customer_id ] || attrs [ :supplier_id ] ) } exists? ( :material_resource_product_variant_party_roles , args ) end
Check if role link to Customer or Supplier exists for applicable Product Variant
Check if role link to Customer or Supplier exists for applicable Product Variant
None
Boolean
attrs
material_resource_product_variant_party_roles attributes for create
material_resource_product_variant_party_roles attributes for create