eancom 0.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +190 -5
  3. data/.gitlab-ci.yml +25 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile.lock +22 -18
  6. data/README.md +46 -0
  7. data/bin/console +3 -2
  8. data/definitions/desadv/d01b.rb +251 -0
  9. data/definitions/desadv/d96a.rb +208 -87
  10. data/definitions/invoic/d01b.rb +559 -0
  11. data/definitions/invoic/d96a.rb +389 -0
  12. data/definitions/invrpt/d01b.rb +134 -0
  13. data/definitions/invrpt/d96a.rb +125 -0
  14. data/definitions/orders/d01b.rb +182 -0
  15. data/definitions/orders/d96b.rb +198 -0
  16. data/definitions/ordrsp/d01b.rb +251 -0
  17. data/definitions/ordrsp/d96b.rb +226 -0
  18. data/definitions/pricat/d01b.rb +225 -0
  19. data/definitions/pricat/d96b.rb +207 -0
  20. data/definitions/retann/d01b.rb +172 -0
  21. data/definitions/retann/d96b.rb +221 -0
  22. data/definitions/segments/ajt.rb +47 -0
  23. data/definitions/segments/alc.rb +328 -0
  24. data/definitions/segments/ali.rb +93 -0
  25. data/definitions/segments/bgm.rb +395 -0
  26. data/definitions/segments/cav.rb +122 -0
  27. data/definitions/segments/cci.rb +136 -0
  28. data/definitions/segments/cdi.rb +39 -0
  29. data/definitions/segments/cnt.rb +82 -0
  30. data/definitions/segments/cps.rb +76 -0
  31. data/definitions/segments/cta.rb +89 -0
  32. data/definitions/segments/cux.rb +174 -0
  33. data/definitions/segments/dgs.rb +34 -0
  34. data/definitions/segments/doc.rb +45 -0
  35. data/definitions/segments/dtm.rb +243 -0
  36. data/definitions/segments/efi.rb +67 -0
  37. data/definitions/segments/eqd.rb +37 -0
  38. data/definitions/segments/ftx.rb +165 -0
  39. data/definitions/segments/gin.rb +113 -0
  40. data/definitions/segments/imd.rb +360 -0
  41. data/definitions/segments/inv.rb +94 -0
  42. data/definitions/segments/lin.rb +133 -0
  43. data/definitions/segments/loc.rb +137 -0
  44. data/definitions/segments/mea.rb +189 -0
  45. data/definitions/segments/moa.rb +228 -0
  46. data/definitions/segments/nad.rb +314 -0
  47. data/definitions/segments/pac.rb +262 -0
  48. data/definitions/segments/pat.rb +171 -0
  49. data/definitions/segments/pcd.rb +72 -0
  50. data/definitions/segments/pci.rb +110 -0
  51. data/definitions/segments/pgi.rb +152 -0
  52. data/definitions/segments/pia.rb +501 -0
  53. data/definitions/segments/pri.rb +208 -0
  54. data/definitions/segments/qty.rb +293 -0
  55. data/definitions/segments/rff.rb +210 -0
  56. data/definitions/segments/rte.rb +52 -0
  57. data/definitions/segments/tax.rb +266 -0
  58. data/definitions/segments/tdt.rb +278 -0
  59. data/definitions/segments/tod.rb +64 -0
  60. data/definitions/segments/tru.rb +34 -0
  61. data/definitions/segments/una.rb +85 -0
  62. data/definitions/segments/unb.rb +284 -0
  63. data/definitions/segments/unh.rb +183 -0
  64. data/definitions/segments/uns.rb +40 -0
  65. data/definitions/segments/unt.rb +48 -0
  66. data/definitions/segments/unz.rb +48 -0
  67. data/definitions/slsrpt/d01b.rb +206 -0
  68. data/definitions/slsrpt/d96a.rb +199 -0
  69. data/eancom.gemspec +2 -1
  70. data/lib/eancom.rb +61 -16
  71. data/lib/eancom/definition.rb +1 -1
  72. data/lib/eancom/edifact.rb +60 -13
  73. data/lib/eancom/edifact/body.rb +63 -0
  74. data/lib/eancom/edifact/composite.rb +38 -0
  75. data/lib/eancom/edifact/data.rb +108 -0
  76. data/lib/eancom/edifact/document.rb +43 -11
  77. data/lib/eancom/edifact/document_element.rb +26 -0
  78. data/lib/eancom/edifact/footer.rb +7 -0
  79. data/lib/eancom/edifact/header.rb +15 -0
  80. data/lib/eancom/edifact/item.rb +40 -0
  81. data/lib/eancom/edifact/message.rb +24 -16
  82. data/lib/eancom/edifact/segment.rb +131 -12
  83. data/lib/eancom/edifact/segments/ajt.rb +32 -0
  84. data/lib/eancom/edifact/segments/alc.rb +61 -0
  85. data/lib/eancom/edifact/segments/ali.rb +50 -0
  86. data/lib/eancom/edifact/segments/bgm.rb +46 -0
  87. data/lib/eancom/edifact/segments/cav.rb +47 -0
  88. data/lib/eancom/edifact/segments/cci.rb +53 -0
  89. data/lib/eancom/edifact/segments/cdi.rb +30 -0
  90. data/lib/eancom/edifact/segments/cnt.rb +40 -0
  91. data/lib/eancom/edifact/segments/cps.rb +33 -0
  92. data/lib/eancom/edifact/segments/cta.rb +30 -0
  93. data/lib/eancom/edifact/segments/cux.rb +60 -0
  94. data/lib/eancom/edifact/segments/dgs.rb +31 -0
  95. data/lib/eancom/edifact/segments/doc.rb +30 -0
  96. data/lib/eancom/edifact/segments/dtm.rb +47 -0
  97. data/lib/eancom/edifact/segments/efi.rb +38 -0
  98. data/lib/eancom/edifact/segments/eqd.rb +30 -0
  99. data/lib/eancom/edifact/segments/ftx.rb +63 -0
  100. data/lib/eancom/edifact/segments/gin.rb +45 -0
  101. data/lib/eancom/edifact/segments/imd.rb +69 -0
  102. data/lib/eancom/edifact/segments/inv.rb +43 -0
  103. data/lib/eancom/edifact/segments/lin.rb +47 -0
  104. data/lib/eancom/edifact/segments/loc.rb +46 -0
  105. data/lib/eancom/edifact/segments/mea.rb +54 -0
  106. data/lib/eancom/edifact/segments/moa.rb +45 -0
  107. data/lib/eancom/edifact/segments/nad.rb +112 -0
  108. data/lib/eancom/edifact/segments/pac.rb +56 -0
  109. data/lib/eancom/edifact/segments/pat.rb +37 -0
  110. data/lib/eancom/edifact/segments/pcd.rb +33 -0
  111. data/lib/eancom/edifact/segments/pci.rb +40 -0
  112. data/lib/eancom/edifact/segments/pgi.rb +45 -0
  113. data/lib/eancom/edifact/segments/pia.rb +108 -0
  114. data/lib/eancom/edifact/segments/pri.rb +53 -0
  115. data/lib/eancom/edifact/segments/qty.rb +44 -0
  116. data/lib/eancom/edifact/segments/rff.rb +47 -0
  117. data/lib/eancom/edifact/segments/rte.rb +33 -0
  118. data/lib/eancom/edifact/segments/tax.rb +78 -0
  119. data/lib/eancom/edifact/segments/tdt.rb +57 -0
  120. data/lib/eancom/edifact/segments/tod.rb +33 -0
  121. data/lib/eancom/edifact/segments/tru.rb +31 -0
  122. data/lib/eancom/edifact/segments/una.rb +52 -0
  123. data/lib/eancom/edifact/segments/unb.rb +68 -0
  124. data/lib/eancom/edifact/segments/unh.rb +50 -0
  125. data/lib/eancom/edifact/segments/uns.rb +32 -0
  126. data/lib/eancom/edifact/segments/unt.rb +28 -0
  127. data/lib/eancom/edifact/segments/unz.rb +28 -0
  128. data/lib/eancom/edifact/structure.rb +90 -0
  129. data/lib/eancom/factory.rb +9 -8
  130. data/lib/eancom/parser.rb +7 -0
  131. data/lib/eancom/parser/document.rb +60 -0
  132. data/lib/eancom/parser/segment.rb +71 -0
  133. data/lib/eancom/version.rb +1 -1
  134. data/pricat.json +1 -0
  135. metadata +141 -9
  136. data/lib/eancom/edifact/element.rb +0 -16
  137. data/lib/eancom/edifact/envelope.rb +0 -24
@@ -0,0 +1,208 @@
1
+ tag = 'PRI'
2
+ Eancom.register_segment(tag: tag, klass: Eancom::Edifact::PRI)
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
+ # Price Information
21
+ #==============================================================================
22
+ price_information = Eancom::Edifact::Composite.new()
23
+
24
+ data = Eancom::Edifact::Data.new(
25
+ type: String,
26
+ length: 1..3,
27
+ dictionary: {
28
+ 'AAA' => {
29
+ description: 'Calculation net',
30
+ identifier: 'calculation_net'
31
+ },
32
+ 'AAB' => {
33
+ description: 'Calculation gross',
34
+ identifier: 'calculation_gross',
35
+ },
36
+ 'AAE' => {
37
+ description: 'Information Price, excluding allowances or charges, including taxes',
38
+ identifier: 'information_price_excluding_allowance_or_charches_includeing_taxes',
39
+ },
40
+ 'AAF' => {
41
+ description: 'Information Price, excluding allowances or charges or taxes',
42
+ identifier: 'information_price_excluding_allowance_or_charches_or_taxes',
43
+ },
44
+ 'INF' => {
45
+ description: 'Information',
46
+ identifier: 'information',
47
+ },
48
+ 'NTP' => {
49
+ description: 'Net unit price',
50
+ identifier: 'net_unit_price',
51
+ },
52
+ 'AAH' => {
53
+ description: 'Subject to escalation and price adjustment',
54
+ identifier: 'subject_to_escaltion_and_price_adjustment',
55
+ },
56
+ 'AAQ' => {
57
+ description: 'Firm price',
58
+ identifier: 'firm_price',
59
+ },
60
+ 'ABL' => {
61
+ description: 'Base price',
62
+ identifier: 'base_price',
63
+ },
64
+ 'ABM' => {
65
+ description: 'Base price difference',
66
+ identifier: 'base_price_difference',
67
+ },
68
+ },
69
+ description: 'Price code qualifier',
70
+ required: true
71
+ )
72
+ price_information.add(:price_code_qualifier, data)
73
+
74
+ data = Eancom::Edifact::Data.new(
75
+ type: String,
76
+ length: 0..15,
77
+ dictionary: nil,
78
+ description: 'Price amount',
79
+ required: true
80
+ )
81
+ price_information.add(:price_amount, data)
82
+
83
+
84
+ data = Eancom::Edifact::Data.new(
85
+ type: String,
86
+ length: 0..3,
87
+ dictionary: {
88
+ 'AE' => {
89
+ description: 'Range dependent price',
90
+ identifier: 'range_dependent_price'
91
+ },
92
+ 'CA' => {
93
+ description: 'Catalogue',
94
+ identifier: 'cataloque',
95
+ },
96
+ 'CT' => {
97
+ description: 'Contract',
98
+ identifier: 'contract',
99
+ },
100
+ },
101
+ description: 'Price type code',
102
+ required: false
103
+ )
104
+ price_information.add(:price_type_code, data)
105
+
106
+ data = Eancom::Edifact::Data.new(
107
+ type: String,
108
+ length: 0..3,
109
+ dictionary: {
110
+ 'AAE' => {
111
+ description: 'Not subject to fluctuation',
112
+ identifier: 'not_subject_to_fluctuation',
113
+ },
114
+ 'ALT' => {
115
+ description: 'Alternate price',
116
+ identifier: 'alternate_price',
117
+ },
118
+ 'DPR' => {
119
+ description: 'Discount price',
120
+ identifier: 'discount_price',
121
+ },
122
+ 'EUP' => {
123
+ description: 'Expected unit price',
124
+ identifier: 'expected_unit_price'
125
+ },
126
+ 'LBL' => {
127
+ description: 'Labelling price',
128
+ identifier: 'labelling_price'
129
+ },
130
+ 'PPR' => {
131
+ description: 'Provisional price',
132
+ identifier: 'provisional_price'
133
+ },
134
+ 'PRP' => {
135
+ description: 'Promotional price',
136
+ identifier: 'promotional_price'
137
+ },
138
+ 'MRP' => {
139
+ description: 'Market retail price',
140
+ identifier: 'market_retail_price',
141
+ },
142
+ 'LIU' => {
143
+ description: 'List price',
144
+ identifier: 'list_price',
145
+ },
146
+ 'SRP' => {
147
+ description: 'Suggested retail price',
148
+ identifier: 'suggested_retail_price',
149
+ },
150
+ 'RTP' => {
151
+ description: 'Retail price',
152
+ identifier: 'retail_price',
153
+ },
154
+ 'NTP' => {
155
+ description: 'Net unit price',
156
+ identifier: 'net_unit_price',
157
+ }
158
+ },
159
+ description: 'Price specification code',
160
+ required: false
161
+ )
162
+ price_information.add(:price_specification_code, data)
163
+
164
+ data = Eancom::Edifact::Data.new(
165
+ type: String,
166
+ length: 0..9,
167
+ dictionary: nil,
168
+ description: 'Unit price basis value',
169
+ required: false
170
+ )
171
+ price_information.add(:unit_price_basis_value, data)
172
+
173
+ data = Eancom::Edifact::Data.new(
174
+ type: String,
175
+ length: 0..3,
176
+ dictionary: {
177
+ 'KGM' => {
178
+ description: 'Kilogram',
179
+ identifier: 'kilogram',
180
+ },
181
+ 'PCE' => {
182
+ description: 'Pice',
183
+ identifier: 'pice',
184
+ },
185
+ },
186
+ description: 'Measurement unit code',
187
+ required: false
188
+ )
189
+ price_information.add(:measurment_unit_code, data)
190
+
191
+ structure << price_information
192
+ #==============================================================================
193
+ # Sub-line item price change operation code
194
+ #==============================================================================
195
+ subline_item_price_change_operation_code = Eancom::Edifact::Composite.new()
196
+
197
+ data = Eancom::Edifact::Data.new(
198
+ type: String,
199
+ length: 0..3,
200
+ dictionary: nil,
201
+ description: 'Sub-line item price change operation code',
202
+ required: false
203
+ )
204
+ subline_item_price_change_operation_code.add(:subline_item_price_change_operation_code, data)
205
+
206
+ structure << subline_item_price_change_operation_code
207
+ #==============================================================================
208
+ Eancom.register_structure(tag: 'PRI', structure: structure)
@@ -0,0 +1,293 @@
1
+ tag = 'QTY'
2
+ Eancom.register_segment(tag: tag, klass: Eancom::Edifact::QTY)
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
+ description: 'QUANTITY DETAILS',
13
+ required: true
14
+ )
15
+ tag.add(:tag, data)
16
+
17
+ structure << tag
18
+ #==============================================================================
19
+ # Quantity Details #
20
+ #==============================================================================
21
+ quantity_details = Eancom::Edifact::Composite.new
22
+
23
+ data = Eancom::Edifact::Data.new(
24
+ type: String,
25
+ length: 1..3,
26
+ dictionary: {
27
+ '1' => {
28
+ description: 'Discrete quantity',
29
+ identifier: 'discrete_quantity'
30
+ },
31
+ '11' => {
32
+ description: 'Split quantity',
33
+ identifier: 'split_quantity'
34
+ },
35
+ '12' => {
36
+ description: 'Despatch quantity',
37
+ identifier: 'despatch_quantity'
38
+ },
39
+ '21' => {
40
+ description: 'Ordered quantity',
41
+ identifier: 'ordered_quantity'
42
+ },
43
+ '26' => {
44
+ description: 'Promotion Quantity',
45
+ identifier: 'promotion_quantity'
46
+ },
47
+ '46' => {
48
+ description: 'Delivered quantity',
49
+ identifier: 'delivered_quantity'
50
+ },
51
+ '47' => {
52
+ description: 'Invoiced quantity',
53
+ identifier: 'invoiced_quantity'
54
+ },
55
+ '52' => {
56
+ description: 'Quantity per pack',
57
+ identifier: 'quantity_per_pack'
58
+ },
59
+ '53' => {
60
+ description: 'Minimum order quantity',
61
+ identifier: 'minimum_order_quantity'
62
+ },
63
+ '54' => {
64
+ description: 'Maximum order quantity',
65
+ identifier: 'maximum_order_quantity'
66
+ },
67
+ '59' => {
68
+ description: 'Numbers of consumer units in the traded unit',
69
+ identifier: 'numbers_or_consumer_units_in_the_traded_unit'
70
+ },
71
+ '61' => {
72
+ description: 'Return quantity',
73
+ identifier: 'return_quantity'
74
+ },
75
+ '66' => {
76
+ description: 'Committed quantity',
77
+ identifier: 'commited_quantity'
78
+ },
79
+ '81' => {
80
+ description: 'Extra unplanned delivery',
81
+ identifier: 'extra_unplanned_delivery'
82
+ },
83
+ '83' => {
84
+ description: 'Backorder quantity',
85
+ identifier: 'backorder_quantity'
86
+ },
87
+ '89' => {
88
+ description: 'Quality control held',
89
+ identifier: 'quality_control_held'
90
+ },
91
+ '96' => {
92
+ description: 'Quality control failed',
93
+ identifier: 'quality_control_failed'
94
+ },
95
+ '97' => {
96
+ description: 'Minimum inventory',
97
+ identifier: 'minimum_inventory'
98
+ },
99
+ '98' => {
100
+ description: 'Maximum inventory',
101
+ identifier: 'maximum_inventory'
102
+ },
103
+ '124' => {
104
+ description: 'Damaged goods',
105
+ identifier: 'damaged_goods'
106
+ },
107
+ '129' => {
108
+ description: 'Units per unit price',
109
+ identifier: 'units_per_unit_price'
110
+ },
111
+ '145' => {
112
+ description: 'Actual stock',
113
+ identifier: 'actual_stock'
114
+ },
115
+ '146' => {
116
+ description: 'Model or target stock',
117
+ identifier: 'model_or_target_stock'
118
+ },
119
+ '157' => {
120
+ description: 'Opening stock balance quantity',
121
+ identifier: 'opening_stock_balance_quantity'
122
+ },
123
+ '153' => {
124
+ description: 'Statistical sales quantity',
125
+ identifier: 'statistical_sales_quantitiy'
126
+ },
127
+ '160' => {
128
+ description: 'Minimum production batch',
129
+ identifier: 'minimum_production_batch'
130
+ },
131
+ '164' => {
132
+ description: 'Delivery batch',
133
+ identifier: 'delivery_batch'
134
+ },
135
+ '193' => {
136
+ description: 'Free quantity included',
137
+ identifier: 'free_quantity_included'
138
+ },
139
+ '197' => {
140
+ description: 'Reordering level',
141
+ identifier: 'reordering_level'
142
+ },
143
+ '198' => {
144
+ description: 'Quantity in transit',
145
+ identifier: 'quantity_in_transit'
146
+ },
147
+ '199' => {
148
+ description: 'Inventory withdrawal quantity',
149
+ identifier: 'inventory_withdrawal_quantity'
150
+ },
151
+ '200' => {
152
+ description: 'Free quantity not included',
153
+ identifier: 'free_quantity_not_included'
154
+ },
155
+ '212' => {
156
+ description: 'Quantity sold, net',
157
+ identifier: 'quantity_sold_net'
158
+ },
159
+ '17E' => {
160
+ description: 'Number of units in lower packaging or configuration level (GS1 Temporary Code)',
161
+ identifier: 'number_of_units_in_lower_packaging_or_configuration_level'
162
+ },
163
+ '22E' => {
164
+ description: 'Free quantity basis (GS1 Temporary Code)',
165
+ identifier: 'free_quantity_basis'
166
+ },
167
+ '32E' => {
168
+ description: 'Consolidated discount stock (GS1 Temporary Code)',
169
+ identifier: 'consolidated_discound_stock_gs1_temporary_code'
170
+ },
171
+ '45E' => {
172
+ description: 'Number of units in higher packaging or configuration level',
173
+ identifier: 'number_of_units_in_higher_packaging_or_configuration_level'
174
+ },
175
+ '249' => {
176
+ description: 'Quantity displayed not available for sale',
177
+ identifier: 'quantity_displayed_not_available_for_sale'
178
+ },
179
+ '503' => {
180
+ description: 'Quantity to be checked',
181
+ identifier: 'quantity_to_be_checked'
182
+ },
183
+ '504' => {
184
+ description: 'Number of wash loads',
185
+ identifier: 'number_of_wash_loads'
186
+ },
187
+ '93E' => {
188
+ description: 'Extraordinary sale (GS1 Temporary Code)',
189
+ identifier: 'extraordinary_sale_gs1_temporary_code'
190
+ },
191
+ '251' => {
192
+ description: 'Incremental order quantity',
193
+ identifier: 'incremental_order_quantity'
194
+ },
195
+ '257' => {
196
+ description: 'Quantity in physical inventory',
197
+ identifier: 'quantity_in_physical_inventory'
198
+ },
199
+ '399' => {
200
+ description: 'File size before compression',
201
+ identifier: 'file_size_before_compression'
202
+ },
203
+ '400' => {
204
+ description: 'File size after compression',
205
+ identifier: 'file_size_after_compression'
206
+ },
207
+ 'X20' => {
208
+ description: 'Reserved quantity, provisional (GS1 Temporary Code)',
209
+ identifier: 'reserved_quantity_provisional_gs1_temporary_code'
210
+ },
211
+ 'X22' => {
212
+ description: 'Consignment stock, available on ordering (GS1 Temporary Code)',
213
+ identifier: 'consignment_stock_available_on_ordering_gs1_temporary_code'
214
+ },
215
+ 'X23' => {
216
+ description: 'Consignment block, available at due date (GS1 Temporary Code)',
217
+ identifier: 'consignment_block_available_at_due_date_gs1_temporary_code'
218
+ },
219
+ 'X24' => {
220
+ description: 'Consignment stock, available at due date (GS1 Temporary Code)',
221
+ identifier: 'consignment_stock_available_at_due_date_gs1_temporary_code'
222
+ },
223
+ '447' => {
224
+ description: 'Quantity moved between outlets',
225
+ identifier: 'quantity_moved_between_outlets'
226
+ },
227
+ '452' => {
228
+ description: 'En route to warehouse quantity',
229
+ identifier: 'en_route:_to_warehouse_quantity'
230
+ },
231
+ '453' => {
232
+ description: 'En route from warehouse quantity',
233
+ identifier: 'en_route_from_warehouse_quantity'
234
+ },
235
+ '454' => {
236
+ description: 'Quantity ordered but not yet allocated from stock',
237
+ identifier: 'quantity_ordered_but_not_yet_allocated_from_stock'
238
+ },
239
+ '455' => {
240
+ description: 'Not yet ordered quantity',
241
+ identifier: 'not_yet_ordered_quantity'
242
+ },
243
+ '457' => {
244
+ description: 'Maximum number of units per shelf',
245
+ identifier: 'maximum_number_of_units_per_shelf'
246
+ }
247
+ },
248
+ description: 'Quantity type code qualifier',
249
+ required: true
250
+ )
251
+ quantity_details.add(:quantity_type_code_qualifier, data)
252
+
253
+ data = Eancom::Edifact::Data.new(
254
+ type: String,
255
+ length: 1..35,
256
+ description: 'Quantity',
257
+ required: true
258
+ )
259
+ quantity_details.add(:quantity, data)
260
+
261
+ data = Eancom::Edifact::Data.new(
262
+ type: String,
263
+ length: 0..3,
264
+ dictionary: {
265
+ 'EA' => {
266
+ description: 'Each',
267
+ identifier: 'each'
268
+ },
269
+ 'PCE' => {
270
+ description: 'Piece',
271
+ identifier: 'piece'
272
+ },
273
+ 'KGM' => {
274
+ description: 'kilogram',
275
+ identifier: 'kilogram'
276
+ },
277
+ 'PND' => {
278
+ description: 'Pound (GS1 Temporary Code)',
279
+ identifier: 'pound'
280
+ },
281
+ '59' => {
282
+ description: 'part per million',
283
+ identifier: 'part_per_million'
284
+ }
285
+ },
286
+ description: 'Measurement unit code',
287
+ required: false
288
+ )
289
+ quantity_details.add(:measurement_unit_code, data)
290
+
291
+ structure << quantity_details
292
+ #==============================================================================
293
+ Eancom.register_structure(tag: 'QTY', structure: structure)