Class: OLE_QA::Framework::OLEFS::New_Accounting_Line

Inherits:
Subline_Object show all
Defined in:
lib/olefs/subobjects/new_accounting_line.rb

Overview

A new Accounting Line on an OLE Financial System PURAP Line Object

Instance Attribute Summary

Attributes inherited from Subline_Object

#line_id, #line_number, #subline_id, #subline_number

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Common_Object

#set_functions

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

#initialize(ole_session, line_number, which) ⇒ New_Accounting_Line

Initialize as a subclass of Subline_Object with a subline_number of 0.



19
20
21
# File 'lib/olefs/subobjects/new_accounting_line.rb', line 19

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

Instance Method Details

#set_elementsObject

Note:

Line_Object @line_number and @line_id will be used to perform substitutions in identifiers.

Note:

Subline_Object @line_number and @line_id will not be need in finding element IDs, as there will only ever be one new subline object on each line object.

Set elements on a New Accounting Line object.



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/olefs/subobjects/new_accounting_line.rb', line 29

def set_elements
  super
  element(:chart_selector)                    {b.select_list(:id => "document.item[#{@line_id}].newSourceLine.chartOfAccountsCode")}
  element(:account_number_field)              {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.accountNumber")}
  element(:sub_account_number_field)          {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.subAccountNumber")}
  element(:object_field)                      {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.financialObjectCode")}
  element(:sub_object_field)                  {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.financialSubObjectCode")}
  element(:project_field)                     {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.projectCode")}
  element(:org_ref_id_field)                  {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.organizationReferenceId")}
  element(:dollar_field)                      {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.amount")}
  element(:percent_field)                     {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.accountLinePercent")}
  element(:add_button)                        {b.input(:name => "methodToCall.insertSourceLine.line#{@line_id}.anchoraccountingSourceAnchor")}
end