Class: Abacos::Price

Inherits:
Base
  • Object
show all
Defined in:
lib/abacos/price.rb

Instance Attribute Summary

Attributes inherited from Base

#response

Class Method Summary collapse

Methods inherited from Base

available, call, collection_name, #confirm!, create, execute, #initialize, #persisted?

Constructor Details

This class inherits a constructor from Abacos::Base

Class Method Details

.find_by_sku_and_table(sku, table) ⇒ Object



6
7
8
# File 'lib/abacos/price.rb', line 6

def self.find_by_sku_and_table(sku, table)
  execute("select list_value = prol_val_pre, sell_value = prol_val_prepro from abacos..tcom_proser pro with (nolock) join abacos..tcom_prolis lis with (nolock) on pro.pros_cod = lis.pros_cod and lis.lisp_cod = #{table} where pro.pros_ext_cod = '#{sku}'").first
end