eancom 0.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +190 -5
- data/.gitlab-ci.yml +25 -0
- data/.ruby-version +1 -0
- data/Gemfile.lock +22 -18
- data/README.md +46 -0
- data/bin/console +3 -2
- data/definitions/desadv/d01b.rb +251 -0
- data/definitions/desadv/d96a.rb +208 -87
- data/definitions/invoic/d01b.rb +559 -0
- data/definitions/invoic/d96a.rb +389 -0
- data/definitions/invrpt/d01b.rb +134 -0
- data/definitions/invrpt/d96a.rb +125 -0
- data/definitions/orders/d01b.rb +182 -0
- data/definitions/orders/d96b.rb +198 -0
- data/definitions/ordrsp/d01b.rb +251 -0
- data/definitions/ordrsp/d96b.rb +226 -0
- data/definitions/pricat/d01b.rb +225 -0
- data/definitions/pricat/d96b.rb +207 -0
- data/definitions/retann/d01b.rb +172 -0
- data/definitions/retann/d96b.rb +221 -0
- data/definitions/segments/ajt.rb +47 -0
- data/definitions/segments/alc.rb +328 -0
- data/definitions/segments/ali.rb +93 -0
- data/definitions/segments/bgm.rb +395 -0
- data/definitions/segments/cav.rb +122 -0
- data/definitions/segments/cci.rb +136 -0
- data/definitions/segments/cdi.rb +39 -0
- data/definitions/segments/cnt.rb +82 -0
- data/definitions/segments/cps.rb +76 -0
- data/definitions/segments/cta.rb +89 -0
- data/definitions/segments/cux.rb +174 -0
- data/definitions/segments/dgs.rb +34 -0
- data/definitions/segments/doc.rb +45 -0
- data/definitions/segments/dtm.rb +243 -0
- data/definitions/segments/efi.rb +67 -0
- data/definitions/segments/eqd.rb +37 -0
- data/definitions/segments/ftx.rb +165 -0
- data/definitions/segments/gin.rb +113 -0
- data/definitions/segments/imd.rb +360 -0
- data/definitions/segments/inv.rb +94 -0
- data/definitions/segments/lin.rb +133 -0
- data/definitions/segments/loc.rb +137 -0
- data/definitions/segments/mea.rb +189 -0
- data/definitions/segments/moa.rb +228 -0
- data/definitions/segments/nad.rb +314 -0
- data/definitions/segments/pac.rb +262 -0
- data/definitions/segments/pat.rb +171 -0
- data/definitions/segments/pcd.rb +72 -0
- data/definitions/segments/pci.rb +110 -0
- data/definitions/segments/pgi.rb +152 -0
- data/definitions/segments/pia.rb +501 -0
- data/definitions/segments/pri.rb +208 -0
- data/definitions/segments/qty.rb +293 -0
- data/definitions/segments/rff.rb +210 -0
- data/definitions/segments/rte.rb +52 -0
- data/definitions/segments/tax.rb +266 -0
- data/definitions/segments/tdt.rb +278 -0
- data/definitions/segments/tod.rb +64 -0
- data/definitions/segments/tru.rb +34 -0
- data/definitions/segments/una.rb +85 -0
- data/definitions/segments/unb.rb +284 -0
- data/definitions/segments/unh.rb +183 -0
- data/definitions/segments/uns.rb +40 -0
- data/definitions/segments/unt.rb +48 -0
- data/definitions/segments/unz.rb +48 -0
- data/definitions/slsrpt/d01b.rb +206 -0
- data/definitions/slsrpt/d96a.rb +199 -0
- data/eancom.gemspec +2 -1
- data/lib/eancom.rb +61 -16
- data/lib/eancom/definition.rb +1 -1
- data/lib/eancom/edifact.rb +60 -13
- data/lib/eancom/edifact/body.rb +63 -0
- data/lib/eancom/edifact/composite.rb +38 -0
- data/lib/eancom/edifact/data.rb +108 -0
- data/lib/eancom/edifact/document.rb +43 -11
- data/lib/eancom/edifact/document_element.rb +26 -0
- data/lib/eancom/edifact/footer.rb +7 -0
- data/lib/eancom/edifact/header.rb +15 -0
- data/lib/eancom/edifact/item.rb +40 -0
- data/lib/eancom/edifact/message.rb +24 -16
- data/lib/eancom/edifact/segment.rb +131 -12
- data/lib/eancom/edifact/segments/ajt.rb +32 -0
- data/lib/eancom/edifact/segments/alc.rb +61 -0
- data/lib/eancom/edifact/segments/ali.rb +50 -0
- data/lib/eancom/edifact/segments/bgm.rb +46 -0
- data/lib/eancom/edifact/segments/cav.rb +47 -0
- data/lib/eancom/edifact/segments/cci.rb +53 -0
- data/lib/eancom/edifact/segments/cdi.rb +30 -0
- data/lib/eancom/edifact/segments/cnt.rb +40 -0
- data/lib/eancom/edifact/segments/cps.rb +33 -0
- data/lib/eancom/edifact/segments/cta.rb +30 -0
- data/lib/eancom/edifact/segments/cux.rb +60 -0
- data/lib/eancom/edifact/segments/dgs.rb +31 -0
- data/lib/eancom/edifact/segments/doc.rb +30 -0
- data/lib/eancom/edifact/segments/dtm.rb +47 -0
- data/lib/eancom/edifact/segments/efi.rb +38 -0
- data/lib/eancom/edifact/segments/eqd.rb +30 -0
- data/lib/eancom/edifact/segments/ftx.rb +63 -0
- data/lib/eancom/edifact/segments/gin.rb +45 -0
- data/lib/eancom/edifact/segments/imd.rb +69 -0
- data/lib/eancom/edifact/segments/inv.rb +43 -0
- data/lib/eancom/edifact/segments/lin.rb +47 -0
- data/lib/eancom/edifact/segments/loc.rb +46 -0
- data/lib/eancom/edifact/segments/mea.rb +54 -0
- data/lib/eancom/edifact/segments/moa.rb +45 -0
- data/lib/eancom/edifact/segments/nad.rb +112 -0
- data/lib/eancom/edifact/segments/pac.rb +56 -0
- data/lib/eancom/edifact/segments/pat.rb +37 -0
- data/lib/eancom/edifact/segments/pcd.rb +33 -0
- data/lib/eancom/edifact/segments/pci.rb +40 -0
- data/lib/eancom/edifact/segments/pgi.rb +45 -0
- data/lib/eancom/edifact/segments/pia.rb +108 -0
- data/lib/eancom/edifact/segments/pri.rb +53 -0
- data/lib/eancom/edifact/segments/qty.rb +44 -0
- data/lib/eancom/edifact/segments/rff.rb +47 -0
- data/lib/eancom/edifact/segments/rte.rb +33 -0
- data/lib/eancom/edifact/segments/tax.rb +78 -0
- data/lib/eancom/edifact/segments/tdt.rb +57 -0
- data/lib/eancom/edifact/segments/tod.rb +33 -0
- data/lib/eancom/edifact/segments/tru.rb +31 -0
- data/lib/eancom/edifact/segments/una.rb +52 -0
- data/lib/eancom/edifact/segments/unb.rb +68 -0
- data/lib/eancom/edifact/segments/unh.rb +50 -0
- data/lib/eancom/edifact/segments/uns.rb +32 -0
- data/lib/eancom/edifact/segments/unt.rb +28 -0
- data/lib/eancom/edifact/segments/unz.rb +28 -0
- data/lib/eancom/edifact/structure.rb +90 -0
- data/lib/eancom/factory.rb +9 -8
- data/lib/eancom/parser.rb +7 -0
- data/lib/eancom/parser/document.rb +60 -0
- data/lib/eancom/parser/segment.rb +71 -0
- data/lib/eancom/version.rb +1 -1
- data/pricat.json +1 -0
- metadata +141 -9
- data/lib/eancom/edifact/element.rb +0 -16
- data/lib/eancom/edifact/envelope.rb +0 -24
@@ -0,0 +1,210 @@
|
|
1
|
+
tag = 'RFF'
|
2
|
+
Eancom.register_segment(tag: tag, klass: Eancom::Edifact::RFF)
|
3
|
+
|
4
|
+
structure = Eancom::Edifact::Structure.new(tag: tag)
|
5
|
+
#==============================================================================
|
6
|
+
# Tag #
|
7
|
+
#==============================================================================
|
8
|
+
tag = Eancom::Edifact::Composite.new()
|
9
|
+
data = Eancom::Edifact::Data.new(
|
10
|
+
type: String,
|
11
|
+
length: 1..3,
|
12
|
+
dictionary: nil,
|
13
|
+
description: "Message Header",
|
14
|
+
required: true
|
15
|
+
)
|
16
|
+
tag.add(:tag, data)
|
17
|
+
|
18
|
+
structure << tag
|
19
|
+
#==============================================================================
|
20
|
+
# Reference #
|
21
|
+
#==============================================================================
|
22
|
+
reference = Eancom::Edifact::Composite.new()
|
23
|
+
|
24
|
+
data = Eancom::Edifact::Data.new(
|
25
|
+
type: String,
|
26
|
+
length: 1..3,
|
27
|
+
dictionary: {
|
28
|
+
'AAB' => {
|
29
|
+
description: 'Proforma Invoice number',
|
30
|
+
identifier: 'proforma_invoice_number'
|
31
|
+
},
|
32
|
+
'AAJ' => {
|
33
|
+
description: 'Delivery order number',
|
34
|
+
identifier: 'delivery_order_number'
|
35
|
+
},
|
36
|
+
'AAK' => {
|
37
|
+
description: 'Despache advice number',
|
38
|
+
identifier: 'despatch_advice_number'
|
39
|
+
},
|
40
|
+
'AAN' => {
|
41
|
+
description: 'Delivery schedule number',
|
42
|
+
identifier: 'delivery_schedule_number'
|
43
|
+
},
|
44
|
+
'AAU' => {
|
45
|
+
description: 'Despatch note number',
|
46
|
+
identifier: 'despatch_note_number'
|
47
|
+
},
|
48
|
+
'AFO' => {
|
49
|
+
description: 'Beneficiarys reference',
|
50
|
+
identifier: 'beneficiarys_reference'
|
51
|
+
},
|
52
|
+
'ALL' => {
|
53
|
+
description: 'Message Batch number',
|
54
|
+
identifier: 'message_batch_number'
|
55
|
+
},
|
56
|
+
'ALO' => {
|
57
|
+
description: 'Receiving advice number',
|
58
|
+
identifier: 'receiving_advice_number'
|
59
|
+
},
|
60
|
+
'AIZ' => {
|
61
|
+
description: 'Consolidated Invoice number',
|
62
|
+
identifier: 'consolidated_invoice_number'
|
63
|
+
},
|
64
|
+
'AMT' => {
|
65
|
+
description: 'Goods and Service Tax identifier number',
|
66
|
+
identifier: 'goods_and_service_tax_identifier_number'
|
67
|
+
},
|
68
|
+
'APQ' => {
|
69
|
+
description: 'Commercial account summary',
|
70
|
+
identifier: 'commercial_account_summary'
|
71
|
+
},
|
72
|
+
'AWT' => {
|
73
|
+
description: 'Administrative reference Code',
|
74
|
+
identifier: 'administrative_reference_code'
|
75
|
+
},
|
76
|
+
'AVD' => {
|
77
|
+
description: 'Inventory report request number',
|
78
|
+
identifier: 'inventory_report_request_number'
|
79
|
+
},
|
80
|
+
'AVG' => {
|
81
|
+
description: 'Slaughterhouse approval number',
|
82
|
+
identifier: 'slaughterhouse_approval_number'
|
83
|
+
},
|
84
|
+
'AVH' => {
|
85
|
+
description: 'Meat cutting plant approval number',
|
86
|
+
identifier: 'meat_cutting_plant_approval_number'
|
87
|
+
},
|
88
|
+
'AVQ' => {
|
89
|
+
description: 'Place of packaging approval number',
|
90
|
+
identifier: 'place_of_packaging_approval_number'
|
91
|
+
},
|
92
|
+
'AQQ' => {
|
93
|
+
description: 'Active Principale Exercee (APE) identifier',
|
94
|
+
identifier: 'active_principale_exercee_identifier'
|
95
|
+
},
|
96
|
+
'CD' => {
|
97
|
+
description: 'Credit note number',
|
98
|
+
identifier: 'credit_note_number'
|
99
|
+
},
|
100
|
+
'CR' => {
|
101
|
+
description: 'Customer reference number',
|
102
|
+
identifier: 'customer_reference_number'
|
103
|
+
},
|
104
|
+
'CT' => {
|
105
|
+
description: 'Contact number',
|
106
|
+
identifier: 'contact_number'
|
107
|
+
},
|
108
|
+
'DQ' => {
|
109
|
+
description: 'Delivery note number',
|
110
|
+
identifier: 'deliver_note_number'
|
111
|
+
},
|
112
|
+
'GN' => {
|
113
|
+
description: 'Government reference number',
|
114
|
+
identifier: 'government_reference_number'
|
115
|
+
},
|
116
|
+
'FC' => {
|
117
|
+
description: 'Fiscal number',
|
118
|
+
identifier: 'fiscal_number'
|
119
|
+
},
|
120
|
+
'IP' => {
|
121
|
+
description: 'Import licence number',
|
122
|
+
identifier: 'import_licence_number'
|
123
|
+
},
|
124
|
+
'IV' => {
|
125
|
+
description: 'Invoice number',
|
126
|
+
identifier: 'invoice_number'
|
127
|
+
},
|
128
|
+
'ON' => {
|
129
|
+
description: 'Order number (buyer)',
|
130
|
+
identifier: 'order_number_buyer'
|
131
|
+
},
|
132
|
+
'PL' => {
|
133
|
+
description: 'Price list number',
|
134
|
+
identifier: 'price_list_numebr'
|
135
|
+
},
|
136
|
+
'PK' => {
|
137
|
+
description: 'Packing list number',
|
138
|
+
identifier: 'packing_list_number'
|
139
|
+
},
|
140
|
+
'POR' => {
|
141
|
+
description: 'Purchase order response number',
|
142
|
+
identifier: 'purchase_order_response_number'
|
143
|
+
},
|
144
|
+
'PP' => {
|
145
|
+
description: 'Purchase order change number',
|
146
|
+
identifier: 'purchase_order_change_number'
|
147
|
+
},
|
148
|
+
'PQ' => {
|
149
|
+
description: 'Payment reference',
|
150
|
+
identifier: 'payment_reference'
|
151
|
+
},
|
152
|
+
'RF' => {
|
153
|
+
description: 'Export reference number',
|
154
|
+
identifier: 'export_reference_number'
|
155
|
+
},
|
156
|
+
'TN' => {
|
157
|
+
description: 'Transaction reference number',
|
158
|
+
identifier: 'transaction_reference_number'
|
159
|
+
},
|
160
|
+
'UC' => {
|
161
|
+
description: 'Ultimate consignee',
|
162
|
+
identifier: 'ultimate_consignee'
|
163
|
+
},
|
164
|
+
'VN' => {
|
165
|
+
description: 'Order number (supplier)',
|
166
|
+
identifier: 'order_number_supplier'
|
167
|
+
},
|
168
|
+
'VA' => {
|
169
|
+
description: 'VAT registration number',
|
170
|
+
identifier: 'vat_registration_number'
|
171
|
+
},
|
172
|
+
'XA' => {
|
173
|
+
description: 'Company/place registration number',
|
174
|
+
identifier: 'company_place_registration_number'
|
175
|
+
},
|
176
|
+
'YC1' => {
|
177
|
+
description: 'Additional party identification (GS1 Temporary Code)',
|
178
|
+
identifier: 'additional_party_identification'
|
179
|
+
},
|
180
|
+
'YC3' => {
|
181
|
+
description: 'Farm approval number (GS1 Temporary Code)',
|
182
|
+
identifier: 'farm_approval_number'
|
183
|
+
}
|
184
|
+
},
|
185
|
+
description: "Reference code quailifier",
|
186
|
+
required: true
|
187
|
+
)
|
188
|
+
reference.add(:reference_code_qualifier, data)
|
189
|
+
|
190
|
+
data = Eancom::Edifact::Data.new(
|
191
|
+
type: String,
|
192
|
+
length: 1..70,
|
193
|
+
dictionary: nil,
|
194
|
+
description: "Reference identifier",
|
195
|
+
required: true
|
196
|
+
)
|
197
|
+
reference.add(:reference_identifier, data)
|
198
|
+
|
199
|
+
data = Eancom::Edifact::Data.new(
|
200
|
+
type: String,
|
201
|
+
length: 1..6,
|
202
|
+
dictionary: nil,
|
203
|
+
description: "Document line identifier",
|
204
|
+
required: false
|
205
|
+
)
|
206
|
+
reference.add(:document_line_identifier, data)
|
207
|
+
|
208
|
+
structure << reference
|
209
|
+
#==============================================================================
|
210
|
+
Eancom.register_structure(tag: 'RFF', structure: structure)
|
@@ -0,0 +1,52 @@
|
|
1
|
+
tag = 'RTE'
|
2
|
+
Eancom.register_segment(tag: tag, klass: Eancom::Edifact::RTE)
|
3
|
+
|
4
|
+
structure = Eancom::Edifact::Structure.new(tag: tag)
|
5
|
+
#==============================================================================
|
6
|
+
# Tag #
|
7
|
+
#==============================================================================
|
8
|
+
tag = Eancom::Edifact::Composite.new
|
9
|
+
data = Eancom::Edifact::Data.new(
|
10
|
+
type: String,
|
11
|
+
length: 1..3,
|
12
|
+
dictionary: nil,
|
13
|
+
description: 'Message Header',
|
14
|
+
required: true
|
15
|
+
)
|
16
|
+
tag.add(:tag, data)
|
17
|
+
|
18
|
+
structure << tag
|
19
|
+
#==============================================================================
|
20
|
+
# RATE DETAILS #
|
21
|
+
#==============================================================================
|
22
|
+
rate_details = Eancom::Edifact::Composite.new
|
23
|
+
data = Eancom::Edifact::Data.new(
|
24
|
+
type: String,
|
25
|
+
length: 1..3,
|
26
|
+
dictionary: {
|
27
|
+
'1' => {
|
28
|
+
description: 'Allowance rate',
|
29
|
+
identifier: 'allowance_rate'
|
30
|
+
},
|
31
|
+
'2' => {
|
32
|
+
description: 'Charge rate',
|
33
|
+
identifier: 'charge_rate'
|
34
|
+
}
|
35
|
+
},
|
36
|
+
description: 'Rate type code qualifier',
|
37
|
+
required: true
|
38
|
+
)
|
39
|
+
rate_details.add(:rate_type_code_qualifier, data)
|
40
|
+
|
41
|
+
data = Eancom::Edifact::Data.new(
|
42
|
+
type: String,
|
43
|
+
length: 1..15,
|
44
|
+
dictionary: nil,
|
45
|
+
description: 'Unit price basis rate',
|
46
|
+
required: true
|
47
|
+
)
|
48
|
+
rate_details.add(:unit_price_basis_rate, data)
|
49
|
+
|
50
|
+
structure << rate_details
|
51
|
+
#===============================================================================#
|
52
|
+
Eancom.register_structure(tag: 'RTE', structure: structure)
|
@@ -0,0 +1,266 @@
|
|
1
|
+
tag = 'TAX'
|
2
|
+
Eancom.register_segment(tag: tag, klass: Eancom::Edifact::TAX)
|
3
|
+
|
4
|
+
structure = Eancom::Edifact::Structure.new(tag: tag)
|
5
|
+
#==============================================================================
|
6
|
+
# Tag #
|
7
|
+
#==============================================================================
|
8
|
+
tag = Eancom::Edifact::Composite.new()
|
9
|
+
data = Eancom::Edifact::Data.new(
|
10
|
+
type: String,
|
11
|
+
length: 3,
|
12
|
+
dictionary: nil,
|
13
|
+
description: "Message Header",
|
14
|
+
required: true
|
15
|
+
)
|
16
|
+
tag.add(:tag, data)
|
17
|
+
|
18
|
+
structure << tag
|
19
|
+
#==============================================================================
|
20
|
+
# Duty or tax or fee function code qualifier #
|
21
|
+
#==============================================================================
|
22
|
+
duty_or_tax_or_fee_function_code_qualifier = Eancom::Edifact::Composite.new()
|
23
|
+
|
24
|
+
data = Eancom::Edifact::Data.new(
|
25
|
+
type: String,
|
26
|
+
length: 1..3,
|
27
|
+
dictionary: {
|
28
|
+
'5' => {
|
29
|
+
description: 'Custom duty',
|
30
|
+
identifier: 'custom_duty'
|
31
|
+
},
|
32
|
+
'7' => {
|
33
|
+
description: 'Tax',
|
34
|
+
identifier: 'tax'
|
35
|
+
}
|
36
|
+
},
|
37
|
+
description: 'Duty or tax or fee function code qualifier',
|
38
|
+
required: true
|
39
|
+
)
|
40
|
+
duty_or_tax_or_fee_function_code_qualifier.add(:duty_or_tax_or_fee_function_code_qualifier, data)
|
41
|
+
|
42
|
+
structure << duty_or_tax_or_fee_function_code_qualifier
|
43
|
+
#==============================================================================
|
44
|
+
# Duty/Tax/Fee Type #
|
45
|
+
#==============================================================================
|
46
|
+
duty_tax_fee_type = Eancom::Edifact::Composite.new()
|
47
|
+
|
48
|
+
data = Eancom::Edifact::Data.new(
|
49
|
+
type: String,
|
50
|
+
length: 1..3,
|
51
|
+
dictionary: {
|
52
|
+
'ENV' => {
|
53
|
+
description: 'Environmental tax',
|
54
|
+
identifier: 'environmental_tax'
|
55
|
+
},
|
56
|
+
'GST' => {
|
57
|
+
description: 'Goods and services tax',
|
58
|
+
identifier: 'goods_and_services_tax'
|
59
|
+
},
|
60
|
+
'AAD' => {
|
61
|
+
description: 'Tabacco tax',
|
62
|
+
identifier: 'tabacco_tax'
|
63
|
+
},
|
64
|
+
'VAT' => {
|
65
|
+
description: 'Value added tax',
|
66
|
+
identifier: 'vat'
|
67
|
+
},
|
68
|
+
'IMP' => {
|
69
|
+
description: 'Import tax',
|
70
|
+
identifier: 'import_tax'
|
71
|
+
},
|
72
|
+
},
|
73
|
+
description: 'Duty or tax or fee type name code',
|
74
|
+
required: true
|
75
|
+
)
|
76
|
+
duty_tax_fee_type.add(:duty_or_tax_or_fee_name_code, data)
|
77
|
+
|
78
|
+
data = Eancom::Edifact::Data.new(
|
79
|
+
type: String,
|
80
|
+
length: 0..17,
|
81
|
+
dictionary: nil,
|
82
|
+
description: 'Code list identification code',
|
83
|
+
required: false
|
84
|
+
)
|
85
|
+
duty_tax_fee_type.add(:code_list_identification_code_1, data)
|
86
|
+
|
87
|
+
data = Eancom::Edifact::Data.new(
|
88
|
+
type: String,
|
89
|
+
length: 0..3,
|
90
|
+
dictionary: {
|
91
|
+
'9' => {
|
92
|
+
description: 'EAN',
|
93
|
+
identifier: 'ean',
|
94
|
+
}
|
95
|
+
},
|
96
|
+
description: 'Code list responsible agency code',
|
97
|
+
required: false
|
98
|
+
)
|
99
|
+
duty_tax_fee_type.add(:code_list_responsibility_agency_code_1, data)
|
100
|
+
|
101
|
+
data = Eancom::Edifact::Data.new(
|
102
|
+
type: String,
|
103
|
+
length: 0..35,
|
104
|
+
dictionary: nil,
|
105
|
+
description: 'Duty or tax or fee type_name',
|
106
|
+
required: false
|
107
|
+
)
|
108
|
+
duty_tax_fee_type.add(:duty_or_tax_or_fee_type_name, data)
|
109
|
+
|
110
|
+
structure << duty_tax_fee_type
|
111
|
+
#==============================================================================
|
112
|
+
# Duty/Tax/Fee Account Detail #
|
113
|
+
#==============================================================================
|
114
|
+
duty_tax_fee_account_detail = Eancom::Edifact::Composite.new()
|
115
|
+
|
116
|
+
data = Eancom::Edifact::Data.new(
|
117
|
+
type: String,
|
118
|
+
length: 0..6,
|
119
|
+
dictionary: nil,
|
120
|
+
description: 'Duty or tax or fee account code',
|
121
|
+
required: true
|
122
|
+
)
|
123
|
+
duty_tax_fee_account_detail.add(:duty_or_tax_or_fee_account_code, data)
|
124
|
+
|
125
|
+
data = Eancom::Edifact::Data.new(
|
126
|
+
type: String,
|
127
|
+
length: 0..17,
|
128
|
+
dictionary: nil,
|
129
|
+
description: 'Code List identifiaction code',
|
130
|
+
required: false
|
131
|
+
)
|
132
|
+
duty_tax_fee_account_detail.add(:code_list_identification_code_2, data)
|
133
|
+
|
134
|
+
data = Eancom::Edifact::Data.new(
|
135
|
+
type: String,
|
136
|
+
length: 0..3,
|
137
|
+
dictionary: nil,
|
138
|
+
description: 'Code list responsible agency code',
|
139
|
+
required: false
|
140
|
+
)
|
141
|
+
duty_tax_fee_account_detail.add(:code_list_responsibility_agency_code_2, data)
|
142
|
+
|
143
|
+
structure << duty_tax_fee_account_detail
|
144
|
+
#==============================================================================
|
145
|
+
# Duty or Tax or fee assessment basis value #
|
146
|
+
#==============================================================================
|
147
|
+
duty_or_tax_of_fee_assessment_basis_value = Eancom::Edifact::Composite.new()
|
148
|
+
data = Eancom::Edifact::Data.new(
|
149
|
+
type: String,
|
150
|
+
length: 1..15,
|
151
|
+
dictionary: nil,
|
152
|
+
description: 'Duty or Tax or fee assessment basis value',
|
153
|
+
required: false
|
154
|
+
)
|
155
|
+
duty_or_tax_of_fee_assessment_basis_value.add(:duty_or_tax_of_fee_assessment_basis_value, data)
|
156
|
+
|
157
|
+
structure << duty_or_tax_of_fee_assessment_basis_value
|
158
|
+
#==============================================================================
|
159
|
+
# Duty/Tax/Fee Detail #
|
160
|
+
#==============================================================================
|
161
|
+
duty_tax_fee_detail = Eancom::Edifact::Composite.new()
|
162
|
+
|
163
|
+
data = Eancom::Edifact::Data.new(
|
164
|
+
type: String,
|
165
|
+
length: 0..7,
|
166
|
+
dictionary: nil,
|
167
|
+
description: 'Duty or Tax or Fee rate code',
|
168
|
+
required: false
|
169
|
+
)
|
170
|
+
duty_tax_fee_detail.add(:duty_tax_fee_rate_code, data)
|
171
|
+
|
172
|
+
data = Eancom::Edifact::Data.new(
|
173
|
+
type: String,
|
174
|
+
length: 0..17,
|
175
|
+
dictionary: nil,
|
176
|
+
description: 'Code List identifiaction code',
|
177
|
+
required: false
|
178
|
+
)
|
179
|
+
duty_tax_fee_detail.add(:code_list_identification_code_3, data)
|
180
|
+
|
181
|
+
data = Eancom::Edifact::Data.new(
|
182
|
+
type: String,
|
183
|
+
length: 0..3,
|
184
|
+
dictionary: nil,
|
185
|
+
description: 'Code list responsible agency code',
|
186
|
+
required: false
|
187
|
+
)
|
188
|
+
duty_tax_fee_detail.add(:code_list_responsibility_agency_code_3, data)
|
189
|
+
|
190
|
+
data = Eancom::Edifact::Data.new(
|
191
|
+
type: String,
|
192
|
+
length: 0..17,
|
193
|
+
dictionary: nil,
|
194
|
+
description: 'Duty or Tax or fee rate',
|
195
|
+
required: true
|
196
|
+
)
|
197
|
+
|
198
|
+
duty_tax_fee_detail.add(:duty_or_tax_or_fee_rate, data)
|
199
|
+
|
200
|
+
data = Eancom::Edifact::Data.new(
|
201
|
+
type: String,
|
202
|
+
length: 0..17,
|
203
|
+
dictionary: nil,
|
204
|
+
description: 'Duty or Tax or fee basis code',
|
205
|
+
required: false
|
206
|
+
)
|
207
|
+
duty_tax_fee_detail.add(:duty_or_tax_or_fee_basis_code, data)
|
208
|
+
|
209
|
+
data = Eancom::Edifact::Data.new(
|
210
|
+
type: String,
|
211
|
+
length: 0..17,
|
212
|
+
dictionary: nil,
|
213
|
+
description: 'Duty or Tax or fee basis code',
|
214
|
+
required: false
|
215
|
+
)
|
216
|
+
duty_tax_fee_detail.add(:duty_or_tax_or_fee_basis_code, data)
|
217
|
+
|
218
|
+
data = Eancom::Edifact::Data.new(
|
219
|
+
type: String,
|
220
|
+
length: 0..17,
|
221
|
+
dictionary: nil,
|
222
|
+
description: 'Code List identifiaction code',
|
223
|
+
required: false
|
224
|
+
)
|
225
|
+
duty_tax_fee_detail.add(:code_list_identification_code_4, data)
|
226
|
+
|
227
|
+
data = Eancom::Edifact::Data.new(
|
228
|
+
type: String,
|
229
|
+
length: 0..3,
|
230
|
+
dictionary: nil,
|
231
|
+
description: 'Code list responsible agency code',
|
232
|
+
required: false
|
233
|
+
)
|
234
|
+
duty_tax_fee_detail.add(:code_list_responsibility_agency_code_4, data)
|
235
|
+
|
236
|
+
structure << duty_tax_fee_detail
|
237
|
+
#==============================================================================
|
238
|
+
# Duty or tax or fee category code
|
239
|
+
#==============================================================================
|
240
|
+
duty_or_tax_or_fee_category_code = Eancom::Edifact::Composite.new()
|
241
|
+
|
242
|
+
data = Eancom::Edifact::Data.new(
|
243
|
+
type: String,
|
244
|
+
length: 0..3,
|
245
|
+
dictionary: {
|
246
|
+
'A' => {
|
247
|
+
description: 'Mixed tax rate',
|
248
|
+
identifier: 'mixed_tax_rage',
|
249
|
+
},
|
250
|
+
'E' => {
|
251
|
+
description: 'Exempt from tax',
|
252
|
+
identifier: 'exempt_from_tax',
|
253
|
+
},
|
254
|
+
'S' => {
|
255
|
+
description: 'Standard rate',
|
256
|
+
identifier: 'standard_rate',
|
257
|
+
},
|
258
|
+
},
|
259
|
+
description: 'Duty or tax or fee category code',
|
260
|
+
required: false
|
261
|
+
)
|
262
|
+
duty_or_tax_or_fee_category_code.add(:duty_or_tax_or_fee_category_code, data)
|
263
|
+
|
264
|
+
structure << duty_or_tax_or_fee_category_code
|
265
|
+
#==============================================================================
|
266
|
+
Eancom.register_structure(tag: 'TAX', structure: structure)
|