Class: OLE_QA::Framework::OLEFS::Invoice_Line
- Inherits:
-
Line_Object
- Object
- Common_Object
- Data_Object
- Line_Object
- OLE_QA::Framework::OLEFS::Invoice_Line
- Defined in:
- lib/olefs/objects/invoice_line.rb
Overview
A single Purchase Order line on an OLE Financial System Invoice E-Document.
-
This class represents a slight departure from the normal method for creating line objects. Instead of setting a line number only once, the line object can be redefined to point at other lines. This departure represents a more flexible approach and prevents the necessity of extra recursion to address the multiple sub-objects of an Invoice E-Document.
-
The future structure of Invoice documents is presently uncertain, so this is a temporary measure. If necessary, the framework may be restructured to follow this model.
Instance Attribute Summary collapse
-
#line_item ⇒ Object
readonly
A flexible PO line item object with dynamic ID element definitions on an Invoice document.
Attributes inherited from Line_Object
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session, line_number = 1) ⇒ Invoice_Line
constructor
Set OLE instance & line number, instantiate line item for PO line on Invoice document.
-
#set_elements ⇒ Object
Set invoice line elements.
-
#set_functions ⇒ Object
Set invoice line functions (for elements with IDs that require numerical inputs).
- #set_sublines ⇒ Object
Methods inherited from Line_Object
Methods included from Helpers
#browser, #load_yml, #set_element, #set_function
Constructor Details
#initialize(ole_session, line_number = 1) ⇒ Invoice_Line
Set OLE instance & line number, instantiate line item for PO line on Invoice document.
29 30 31 |
# File 'lib/olefs/objects/invoice_line.rb', line 29 def initialize(ole_session, line_number = 1) super(ole_session, line_number) end |
Instance Attribute Details
#line_item ⇒ Object (readonly)
A flexible PO line item object with dynamic ID element definitions on an Invoice document.
26 27 28 |
# File 'lib/olefs/objects/invoice_line.rb', line 26 def line_item @line_item end |
Instance Method Details
#set_elements ⇒ Object
Set invoice line elements.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/olefs/objects/invoice_line.rb', line 34 def set_elements super element(:po_number) {b.span(:id => "process_item_po_doc_line#{line_id}_control")} element(:po_end_date) {b.text_field(:id => "invoice-poEndDate_line#{line_id}_control")} element(:close_po_checkbox) {b.checkbox(:id => "CurrentItem_closePO_line#{line_id}_control")} element(:delete_po_button) {b.(:id => "CurrentItem_deletePurchaseOrder_line#{line_id}")} element(:requisitions_toggle) {b.a(:id => "po-requisition-view_line#{line_id}_toggle")} element(:purchase_orders_toggle) {b.a(:id => "po-po-view_line#{line_id}_toggle")} element(:line_item_receiving_toggle) {b.a(:id => "po-relatedReceiving-view_line#{line_id}_toggle")} element(:correction_receiving_toggle) {b.a(:id => "po-relatedCorrectionReceiving-view_line#{line_id}_toggle")} element(:payment_requests_toggle) {b.a(:id => "po-relatedPayment-view_line#{line_id}_toggle")} element(:credit_memos_toggle) {b.a(:id => "po-relatedCreditMemo-view_line#{line_id}_toggle")} element(:add_button) {b.(:id => "addPOItems_button_test_line#{line_id}")} end |
#set_functions ⇒ Object
Set invoice line functions (for elements with IDs that require numerical inputs).
50 51 52 |
# File 'lib/olefs/objects/invoice_line.rb', line 50 def set_functions super end |
#set_sublines ⇒ Object
54 55 56 |
# File 'lib/olefs/objects/invoice_line.rb', line 54 def set_sublines subline(:line_item, OLE_QA::Framework::OLEFS::Invoice_Line_Item) end |