Class: OLE_QA::Framework::OLEFS::New_Receiving_Line

Inherits:
Line_Object show all
Defined in:
lib/olefs/objects/new_receiving_line.rb

Overview

A new Receiving Line on an OLE Financial System Receiving Document.

Instance Attribute Summary

Attributes inherited from Line_Object

#line_id, #line_number

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Line_Object

#create_subline, #remove_subline

Methods inherited from Common_Object

#set_functions

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

#initialize(ole_session, which) ⇒ New_Receiving_Line

Initialize as a subclass of Line_Object with a line_number of 0.



19
20
21
# File 'lib/olefs/objects/new_receiving_line.rb', line 19

def initialize(ole_session, which)
  super(ole_session, 0)
end

Instance Method Details

#set_elementsObject

Note:

No line number substitution will be involved as there is only ever one new line item on an OLEFS Receiving Document.

Set elements on a new receiving line.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/olefs/objects/new_receiving_line.rb', line 26

def set_elements
  super
  element(:vendor_item_identifier_field)                {b.text_field(:id => "newLineItemReceivingItemLine.itemCatalogNumber")}
  element(:format_selector)                             {b.select_list(:id => "newLineItemReceivingItemLine.oleFormatId")}
  element(:item_received_quantity_field)                {b.text_field(:id => "newLineItemReceivingItemLine.oleItemReceivedTotalQuantity")}
  element(:item_received_parts_field)                   {b.text_field(:id => "newLineItemReceivingItemLine.oleItemReceivedTotalParts")}
  element(:item_returned_quantity_field)                {b.text_field(:id => "newLineItemReceivingItemLine.oleItemReturnedTotalQuantity")}
  element(:item_returned_parts_field)                   {b.text_field(:id => "newLineItemReceivingItemLine.oleItemReturnedTotalParts")}
  element(:item_damaged_quantity_field)                 {b.text_field(:id => "newLineItemReceivingItemLine.oleItemDamagedTotalQuantity")}
  element(:item_damaged_parts_field)                    {b.text_field(:id => "newLineItemReceivingItemLine.oleItemDamagedTotalParts")}
  element(:addition_reason_selector)                    {b.select_list(:id => "newLineItemReceivingItemLine.itemReasonAddedCode")}
  element(:available_to_public_checkbox)                {b.checkbox(:id => "newLineItemReceivingItemLine.availableToPublic")}
  element(:public_view_checkbox)                        {b.checkbox(:id => "newLineItemReceivingItemLine.availableToPublic")}
  element(:new_bib_button)                              {b.input(:id => "bibCreateCurrentItemButton")}
end