Class: Abacos::Stock

Inherits:
Base
  • Object
show all
Defined in:
lib/abacos/stock.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(sku) ⇒ Object



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

def self.find_by_sku(sku)
  execute("select value = sal.salp_qtf_dis from abacos..tcom_proser pro with (nolock) left join abacos..test_salpro sal with (nolock) on pro.pros_cod = sal.pros_cod where pro.pros_ext_cod = '#{sku}'").first
end