Class: Eddy::TransactionSets::TS850::TS850
Overview
Transaction Set Summary:
- Id: 850
- Name: Purchase Order
- Functional Group: PO
Constant Summary
collapse
- ID =
"850".freeze
- NAME =
"Purchase Order".freeze
- FUNCTIONAL_GROUP =
"PO".freeze
Instance Attribute Summary
#components, #control_number, #store
Instance Method Summary
collapse
#add_envelope, #all_components, #functional_group, functional_group, id, #id, #name, name, #number_of_included_segments, #render
Constructor Details
#initialize(store) ⇒ void
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 18
def initialize(store)
@beg = Eddy::Segments::BEG.new(store)
@cur = Eddy::Segments::CUR.new(store)
@ref = Eddy::Segments::REF.new(store)
@fob = Eddy::Segments::FOB.new(store)
@l_sac = Eddy::TransactionSets::TS850::Loops::SAC::Base.new(store)
@itd = Eddy::Segments::ITD.new(store)
@dtm = Eddy::Segments::DTM.new(store)
@td5 = Eddy::Segments::TD5.new(store)
@txi = Eddy::Segments::TXI.new(store)
@l_n9 = Eddy::TransactionSets::TS850::Loops::N9::Base.new(store)
@l_n1 = Eddy::TransactionSets::TS850::Loops::N1::Base.new(store)
@l_po1 = Eddy::TransactionSets::TS850::Loops::PO1::Base.new(store)
@ctt = Eddy::Segments::CTT.new(store)
@amt = Eddy::Segments::AMT.new(store)
super(
store,
@beg,
@cur,
@ref,
@fob,
@l_sac,
@itd,
@dtm,
@td5,
@txi,
@l_n9,
@l_n1,
@l_po1,
@ctt,
@amt,
)
end
|
Instance Method Details
Segment Summary:
- Id: AMT
- Name: Monetary Amount Information
- Purpose: To indicate the total monetary amount.
189
190
191
192
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 189
def AMT()
yield(@amt) if block_given?
return @amt
end
|
Segment Summary:
- Id: BEG
- Name: Beginning Segment for Purchase Order
- Purpose: To indicate the beginning of the Purchase Order Transaction Set and transmit identifying numbers and dates
56
57
58
59
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 56
def BEG()
yield(@beg) if block_given?
return @beg
end
|
Segment Summary:
- Id: CTT
- Name: Transaction Totals
- Purpose: To transmit a hash total for a specific element in the transaction set
180
181
182
183
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 180
def CTT()
yield(@ctt) if block_given?
return @ctt
end
|
Segment Summary:
- Id: CUR
- Name: Currency
- Purpose: To specify the currency (dollars, pounds, francs, etc.) used in a transaction
65
66
67
68
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 65
def CUR()
yield(@cur) if block_given?
return @cur
end
|
Segment Summary:
- Id: DTM
- Name: Date/Time Reference
- Purpose: To specify pertinent dates and times.
114
115
116
117
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 114
def DTM()
yield(@dtm) if block_given?
return @dtm
end
|
Segment Summary:
- Id: FOB
- Name: F.O.B. Related Instructions
- Purpose: To specify transportation instructions relating to shipment.
83
84
85
86
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 83
def FOB()
yield(@fob) if block_given?
return @fob
end
|
Segment Summary:
- Id: ITD
- Name: Terms of Sale/Deferred Terms of Sale
- Purpose: To specify terms of sale.
105
106
107
108
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 105
def ITD()
yield(@itd) if block_given?
return @itd
end
|
#L_N1 {|| ... } ⇒ void
This method returns an undefined value.
Loop Summary:
154
155
156
157
158
159
160
161
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 154
def L_N1(&block)
if block_given?
@l_n1.repeat(&block)
else
raise Eddy::Errors::Error, "No block given in loop iteration"
end
return nil
end
|
#L_N9 {|| ... } ⇒ void
This method returns an undefined value.
Loop Summary:
141
142
143
144
145
146
147
148
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 141
def L_N9(&block)
if block_given?
@l_n9.repeat(&block)
else
raise Eddy::Errors::Error, "No block given in loop iteration"
end
return nil
end
|
#L_PO1 {|| ... } ⇒ void
This method returns an undefined value.
Loop Summary:
- Repeat: 100000
- Components:
- PO1
- CTP (loop)
- PID (loop)
- SAC (loop)
- TXI
- N9 (loop)
167
168
169
170
171
172
173
174
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 167
def L_PO1(&block)
if block_given?
@l_po1.repeat(&block)
else
raise Eddy::Errors::Error, "No block given in loop iteration"
end
return nil
end
|
#L_SAC {|| ... } ⇒ void
This method returns an undefined value.
Loop Summary:
92
93
94
95
96
97
98
99
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 92
def L_SAC(&block)
if block_given?
@l_sac.repeat(&block)
else
raise Eddy::Errors::Error, "No block given in loop iteration"
end
return nil
end
|
Segment Summary:
- Id: REF
- Name: Reference Identification
- Purpose: To specify identifying information.
74
75
76
77
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 74
def REF()
yield(@ref) if block_given?
return @ref
end
|
Segment Summary:
- Id: TD5
- Name: Carrier Details (Routing Sequence/Transit Time)
- Purpose: To specify the carrier and sequence of routing and provide transit time information.
123
124
125
126
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 123
def TD5()
yield(@td5) if block_given?
return @td5
end
|
Segment Summary:
- Id: TXI
- Name: Tax Information
- Purpose: To specify tax information.
132
133
134
135
|
# File 'lib/definitions/transaction_sets/manual/850/850.rb', line 132
def TXI()
yield(@txi) if block_given?
return @txi
end
|