Sha256: b9c8d2d9dd36a78e045a4157ec2d4bec104943351a65ab506c9c828a69f9afd2

Contents?: true

Size: 1.35 KB

Versions: 32

Compression:

Stored size: 1.35 KB

Contents

module Toolhound

  # Class to parse GitHub repository owner and name from
  # URLs and to generate URLs
  class Vendor < Base


    # self.table_name   = :rental
    # self.primary_key  = :int_rental_id

    def default_selects
      #{ }"SELECT tblEntity.intEntityID, tblEntity.varEntityID AS job_no, tblLocation.intLocationID, tblLocationText.varLocationName  FROM tblEntity INNER JOIN tblLocation ON tblLocation.intEntityID = tblEntity.intEntityID INNER JOIN tblLocationText ON tblLocationText.intLocationID = tblLocation.intLocationID WHERE varEntityID LIKE '%10526.00%'"
      {
        vendor: [:int_vendor_id, {var_vendor_id: :vendor_no}, :dte_created_date, :dte_modified_date, :bol_active, :int_payment_term_id, :int_state_id, :int_country_id],
        vendor_text: [:var_organization, :var_address, :var_city, :var_state, :var_postal_code, :var_contact, :var_title, :var_email, :var_telephone, :var_home_phone]
      }
    end

    def default_joins
      arr = []
      arr << "INNER JOIN tblVendorText ON (tblVendorText.intvendorID = tblVendor.intvendorID) AND varLocaleID = '#{locale}'"
      # arr << "INNER JOIN tblLocationText ON (tblLocationText.intLocationID = tblLocation.intLocationID)"

      arr
    end

    def find_by_entity_id(id)
      all(limit: 1, where: [{int_entity_id: id}]).first
    end

    # rename_attributes intLocationID: 'location_id'

  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
toolhound-ruby-1.0.37 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.36 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.35 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.34 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.33 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.32 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.31 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.30 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.29 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.28 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.27 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.26 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.25 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.24 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.23 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.22 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.21 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.20 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.19 lib/toolhound-ruby/vendor.rb
toolhound-ruby-1.0.18 lib/toolhound-ruby/vendor.rb