eancom 1.4.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -3
  3. data/.gitlab-ci.yml +11 -13
  4. data/.ruby-version +1 -1
  5. data/Gemfile +2 -4
  6. data/Gemfile.lock +23 -103
  7. data/README.md +46 -0
  8. data/definitions/desadv/d01b.rb +139 -93
  9. data/definitions/desadv/d96a.rb +187 -101
  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 +128 -36
  24. data/definitions/segments/bgm.rb +128 -0
  25. data/definitions/segments/cdi.rb +39 -0
  26. data/definitions/segments/cnt.rb +4 -0
  27. data/definitions/segments/cta.rb +89 -0
  28. data/definitions/segments/cux.rb +9 -2
  29. data/definitions/segments/dgs.rb +34 -0
  30. data/definitions/segments/doc.rb +45 -0
  31. data/definitions/segments/dtm.rb +85 -1
  32. data/definitions/segments/efi.rb +67 -0
  33. data/definitions/segments/eqd.rb +37 -0
  34. data/definitions/segments/ftx.rb +24 -2
  35. data/definitions/segments/gin.rb +113 -0
  36. data/definitions/segments/imd.rb +5 -1
  37. data/definitions/segments/inv.rb +94 -0
  38. data/definitions/segments/lin.rb +23 -3
  39. data/definitions/segments/loc.rb +52 -4
  40. data/definitions/segments/moa.rb +86 -2
  41. data/definitions/segments/nad.rb +69 -9
  42. data/definitions/segments/pac.rb +12 -0
  43. data/definitions/segments/pat.rb +171 -0
  44. data/definitions/segments/pcd.rb +72 -0
  45. data/definitions/segments/pci.rb +110 -0
  46. data/definitions/segments/pgi.rb +6 -2
  47. data/definitions/segments/pia.rb +21 -21
  48. data/definitions/segments/pri.rb +21 -1
  49. data/definitions/segments/qty.rb +219 -5
  50. data/definitions/segments/rff.rb +51 -7
  51. data/definitions/segments/rte.rb +52 -0
  52. data/definitions/segments/tax.rb +17 -10
  53. data/definitions/segments/tdt.rb +24 -0
  54. data/definitions/segments/tod.rb +64 -0
  55. data/definitions/segments/tru.rb +34 -0
  56. data/definitions/segments/una.rb +7 -7
  57. data/definitions/segments/unb.rb +4 -4
  58. data/definitions/segments/unh.rb +70 -5
  59. data/definitions/segments/uns.rb +2 -2
  60. data/definitions/segments/unt.rb +2 -2
  61. data/definitions/slsrpt/d01b.rb +104 -100
  62. data/definitions/slsrpt/d96a.rb +104 -99
  63. data/eancom.gemspec +5 -8
  64. data/lib/eancom/edifact/document.rb +2 -2
  65. data/lib/eancom/edifact/footer.rb +1 -0
  66. data/lib/eancom/edifact/segment.rb +2 -2
  67. data/lib/eancom/edifact/segments/ajt.rb +32 -0
  68. data/lib/eancom/edifact/segments/ali.rb +2 -4
  69. data/lib/eancom/edifact/segments/bgm.rb +4 -3
  70. data/lib/eancom/edifact/segments/cdi.rb +30 -0
  71. data/lib/eancom/edifact/segments/cnt.rb +8 -1
  72. data/lib/eancom/edifact/segments/cps.rb +4 -1
  73. data/lib/eancom/edifact/segments/cta.rb +30 -0
  74. data/lib/eancom/edifact/segments/cux.rb +1 -1
  75. data/lib/eancom/edifact/segments/dgs.rb +31 -0
  76. data/lib/eancom/edifact/segments/doc.rb +30 -0
  77. data/lib/eancom/edifact/segments/dtm.rb +10 -6
  78. data/lib/eancom/edifact/segments/efi.rb +38 -0
  79. data/lib/eancom/edifact/segments/eqd.rb +30 -0
  80. data/lib/eancom/edifact/segments/ftx.rb +2 -2
  81. data/lib/eancom/edifact/segments/gin.rb +45 -0
  82. data/lib/eancom/edifact/segments/imd.rb +1 -1
  83. data/lib/eancom/edifact/segments/inv.rb +43 -0
  84. data/lib/eancom/edifact/segments/lin.rb +7 -3
  85. data/lib/eancom/edifact/segments/loc.rb +8 -5
  86. data/lib/eancom/edifact/segments/mea.rb +1 -0
  87. data/lib/eancom/edifact/segments/moa.rb +3 -3
  88. data/lib/eancom/edifact/segments/nad.rb +11 -6
  89. data/lib/eancom/edifact/segments/pac.rb +3 -1
  90. data/lib/eancom/edifact/segments/pat.rb +37 -0
  91. data/lib/eancom/edifact/segments/pcd.rb +33 -0
  92. data/lib/eancom/edifact/segments/pci.rb +40 -0
  93. data/lib/eancom/edifact/segments/pia.rb +1 -0
  94. data/lib/eancom/edifact/segments/pri.rb +0 -1
  95. data/lib/eancom/edifact/segments/qty.rb +9 -5
  96. data/lib/eancom/edifact/segments/rff.rb +8 -2
  97. data/lib/eancom/edifact/segments/rte.rb +33 -0
  98. data/lib/eancom/edifact/segments/tax.rb +7 -1
  99. data/lib/eancom/edifact/segments/tdt.rb +4 -1
  100. data/lib/eancom/edifact/segments/tod.rb +33 -0
  101. data/lib/eancom/edifact/segments/tru.rb +31 -0
  102. data/lib/eancom/edifact/segments/una.rb +2 -1
  103. data/lib/eancom/edifact/segments/unb.rb +4 -5
  104. data/lib/eancom/edifact/segments/unh.rb +6 -4
  105. data/lib/eancom/edifact/segments/uns.rb +3 -0
  106. data/lib/eancom/edifact/structure.rb +0 -1
  107. data/lib/eancom/edifact.rb +15 -1
  108. data/lib/eancom/factory.rb +1 -1
  109. data/lib/eancom/parser/document.rb +2 -10
  110. data/lib/eancom/version.rb +1 -1
  111. data/lib/eancom.rb +3 -1
  112. data/pricat.json +1 -0
  113. metadata +51 -52
  114. data/.rspec_status +0 -225
  115. data/.rubocop.yml +0 -2
@@ -0,0 +1,110 @@
1
+ tag = 'PCI'
2
+ Eancom.register_segment(tag: tag, klass: Eancom::Edifact::PCI)
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
+ # Marking instructions code #
21
+ #==============================================================================
22
+ marking_instructions_code = Eancom::Edifact::Composite.new
23
+ data = Eancom::Edifact::Data.new(
24
+ type: String,
25
+ length: 1..3,
26
+ dictionary: {
27
+ '1' => {
28
+ description: 'Do not mark suppliers company name',
29
+ identifier: 'do_not_mark_suppliers_company_name'
30
+ },
31
+ '2' => {
32
+ description: 'Mark customers company name',
33
+ identifier: 'mark_customers_company_name'
34
+ },
35
+ '3' => {
36
+ description: 'Mark customers references',
37
+ identifier: 'mark_customers_references'
38
+ },
39
+ '6' => {
40
+ description: 'Mark packages dimensions',
41
+ identifier: 'mark_packages_dimensions'
42
+ },
43
+ '7' => {
44
+ description: 'Mark net weight',
45
+ identifier: 'mark_net_weight'
46
+ },
47
+ '8' => {
48
+ description: 'Mark gross weight',
49
+ identifier: 'mark_gross_weight'
50
+ },
51
+ '10' => {
52
+ description: 'Mark batch number',
53
+ identifier: 'mark_batch_number'
54
+ },
55
+ '14' => {
56
+ description: 'Mark expiry date',
57
+ identifier: 'mark_expiry_date'
58
+ },
59
+ '16' => {
60
+ description: 'Buyers instructions',
61
+ identifier: 'buyers_instructions'
62
+ },
63
+ '17' => {
64
+ description: "Supplier's instructions",
65
+ identifier: 'supliers_instructions'
66
+ },
67
+ '18' => {
68
+ description: "Carrier's instructions",
69
+ identifier: 'carriers_instructions'
70
+ },
71
+ '33E' => {
72
+ description: 'Marked with serial shipping container code (GS1 Temporary Code)',
73
+ identifier: 'marked_with_serial_shipping_container_code_gs1_temporary_code'
74
+ },
75
+ '34E' => {
76
+ description: 'Marked with GS1 number (GS1 Temporary Code)',
77
+ identifier: 'marked_with_gs1_number'
78
+ }
79
+ },
80
+ description: 'Marking instructions code',
81
+ required: false
82
+ )
83
+ marking_instructions_code.add(:marking_instructions_code, data)
84
+
85
+ structure << marking_instructions_code
86
+ #==============================================================================
87
+ # MARKS & LABELS #
88
+ #==============================================================================
89
+ marks_and_labels_code = Eancom::Edifact::Composite.new
90
+ data = Eancom::Edifact::Data.new(
91
+ type: String,
92
+ length: 1..35,
93
+ dictionary: nil,
94
+ description: 'Shipping marks description',
95
+ required: true
96
+ )
97
+ marks_and_labels_code.add(:shipping_marks_description, data)
98
+
99
+ data = Eancom::Edifact::Data.new(
100
+ type: String,
101
+ length: 1..3,
102
+ dictionary: nil,
103
+ description: 'Container or package contents indicator code',
104
+ required: false
105
+ )
106
+ marks_and_labels_code.add(:container_or_package_contents_indicator_mode, data)
107
+
108
+ structure << marks_and_labels_code
109
+
110
+ Eancom.register_structure(tag: 'PCI', structure: structure)
@@ -65,6 +65,10 @@ data = Eancom::Edifact::Data.new(
65
65
  description: 'Group of complementary products',
66
66
  identifier: 'group_of_complementary_products'
67
67
  },
68
+ 'BEX' => {
69
+ description: 'GTIN allocation group for special purposes (GS1 Temporary Code)',
70
+ identifier: 'gtin_allocation_group_for_special_purposes'
71
+ },
68
72
  'DEF' => {
69
73
  description: 'Definition Group',
70
74
  identifier: 'definition_group'
@@ -117,7 +121,7 @@ data = Eancom::Edifact::Data.new(
117
121
  dictionary: {
118
122
  '9' => {
119
123
  description: 'GS1',
120
- identifier: 'gsi',
124
+ identifier: 'gs1',
121
125
  },
122
126
  '91' => {
123
127
  description: 'Assigned by supplier or suppliers agent',
@@ -128,7 +132,7 @@ data = Eancom::Edifact::Data.new(
128
132
  identifier: 'assigned_by_buyer_or_buyers_agent'
129
133
  }
130
134
  },
131
- description: 'Code list responsible agancy code',
135
+ description: 'Code list responsible agency code',
132
136
  required: false
133
137
  )
134
138
  product_group.add(:code_list_responsibility_agency_code, data)
@@ -5,11 +5,11 @@ structure = Eancom::Edifact::Structure.new(tag: tag)
5
5
  #==============================================================================
6
6
  # Tag #
7
7
  #==============================================================================
8
- tag = Eancom::Edifact::Composite.new()
8
+ tag = Eancom::Edifact::Composite.new
9
9
  data = Eancom::Edifact::Data.new(
10
10
  type: String,
11
- length: 3,
12
- description: "Message Header",
11
+ length: 1..3,
12
+ description: 'Message Header',
13
13
  required: true
14
14
  )
15
15
  tag.add(:tag, data)
@@ -18,7 +18,7 @@ structure << tag
18
18
  #==============================================================================
19
19
  # Product Identifier Code Qualifier #
20
20
  #==============================================================================
21
- product_identifier_code_qualifier = Eancom::Edifact::Composite.new()
21
+ product_identifier_code_qualifier = Eancom::Edifact::Composite.new
22
22
 
23
23
  data = Eancom::Edifact::Data.new(
24
24
  type: String,
@@ -50,7 +50,7 @@ structure << product_identifier_code_qualifier
50
50
  #==============================================================================
51
51
  # Item Number Identification 1 #
52
52
  #==============================================================================
53
- item_number_identification_1 = Eancom::Edifact::Composite.new()
53
+ item_number_identification_1 = Eancom::Edifact::Composite.new
54
54
 
55
55
  data = Eancom::Edifact::Data.new(
56
56
  type: String,
@@ -81,11 +81,11 @@ data = Eancom::Edifact::Data.new(
81
81
  identifier: 'buyers_item_number'
82
82
  },
83
83
  'HS' => {
84
- description: "Harmonised system",
84
+ description: 'Harmonised system',
85
85
  identifier: 'harmonised_system'
86
86
  },
87
87
  'GD' => {
88
- description: "Industry sector article group number/product classification code (GS1 Code)",
88
+ description: 'Industry sector article group number/product classification code (GS1 Code)',
89
89
  identifier: 'industry_sector_article_group_number_product_classification_code'
90
90
  },
91
91
  'GU' => {
@@ -121,7 +121,7 @@ item_number_identification_1.add(:item_type_identification_code_1, data)
121
121
  data = Eancom::Edifact::Data.new(
122
122
  type: String,
123
123
  length: 0..17,
124
- description: "Code list identification code",
124
+ description: 'Code list identification code',
125
125
  required: false
126
126
  )
127
127
  item_number_identification_1.add(:code_list_identification_code_1, data)
@@ -143,7 +143,7 @@ data = Eancom::Edifact::Data.new(
143
143
  identifier: 'assigned_by_buyer_or_buyers_agent'
144
144
  }
145
145
  },
146
- description: "Code list responsible agency code",
146
+ description: 'Code list responsible agency code',
147
147
  required: false
148
148
  )
149
149
  item_number_identification_1.add(:code_list_responsible_agency_code_1, data)
@@ -152,7 +152,7 @@ structure << item_number_identification_1
152
152
  #==============================================================================
153
153
  # Item Number Identification 2 #
154
154
  #==============================================================================
155
- item_number_identification_2 = Eancom::Edifact::Composite.new()
155
+ item_number_identification_2 = Eancom::Edifact::Composite.new
156
156
 
157
157
  data = Eancom::Edifact::Data.new(
158
158
  type: String,
@@ -211,7 +211,7 @@ item_number_identification_2.add(:item_type_identification_code_2, data)
211
211
  data = Eancom::Edifact::Data.new(
212
212
  type: String,
213
213
  length: 0..17,
214
- description: "Code list identification code",
214
+ description: 'Code list identification code',
215
215
  required: false
216
216
  )
217
217
  item_number_identification_2.add(:code_list_identification_code_2, data)
@@ -233,7 +233,7 @@ data = Eancom::Edifact::Data.new(
233
233
  identification: 'assigned_by_buyer_or_buyers_agent'
234
234
  }
235
235
  },
236
- description: "Code list responsible agency code",
236
+ description: 'Code list responsible agency code',
237
237
  required: false
238
238
  )
239
239
  item_number_identification_2.add(:code_list_responsible_agency_code_2, data)
@@ -242,7 +242,7 @@ structure << item_number_identification_2
242
242
  #==============================================================================
243
243
  # Item Number Identification 3 #
244
244
  #==============================================================================
245
- item_number_identification_3 = Eancom::Edifact::Composite.new()
245
+ item_number_identification_3 = Eancom::Edifact::Composite.new
246
246
 
247
247
  data = Eancom::Edifact::Data.new(
248
248
  type: String,
@@ -297,7 +297,7 @@ item_number_identification_3.add(:item_type_identification_code_3, data)
297
297
  data = Eancom::Edifact::Data.new(
298
298
  type: String,
299
299
  length: 0..17,
300
- description: "Code list identification code",
300
+ description: 'Code list identification code',
301
301
  required: false
302
302
  )
303
303
  item_number_identification_3.add(:code_list_identification_code_3, data)
@@ -319,7 +319,7 @@ data = Eancom::Edifact::Data.new(
319
319
  identification: 'assigned_by_buyer_or_buyers_agent'
320
320
  }
321
321
  },
322
- description: "Code list responsible agency code",
322
+ description: 'Code list responsible agency code',
323
323
  required: false
324
324
  )
325
325
  item_number_identification_3.add(:code_list_responsible_agency_code_3, data)
@@ -328,7 +328,7 @@ structure << item_number_identification_3
328
328
  #==============================================================================
329
329
  # Item Number Identification 4 #
330
330
  #==============================================================================
331
- item_number_identification_4 = Eancom::Edifact::Composite.new()
331
+ item_number_identification_4 = Eancom::Edifact::Composite.new
332
332
 
333
333
  data = Eancom::Edifact::Data.new(
334
334
  type: String,
@@ -383,7 +383,7 @@ item_number_identification_4.add(:item_type_identification_code_4, data)
383
383
  data = Eancom::Edifact::Data.new(
384
384
  type: String,
385
385
  length: 0..17,
386
- description: "Code list identification code",
386
+ description: 'Code list identification code',
387
387
  required: false
388
388
  )
389
389
  item_number_identification_4.add(:code_list_identification_code_4, data)
@@ -405,7 +405,7 @@ data = Eancom::Edifact::Data.new(
405
405
  identifier: 'assigned_by_buyer_or_buyers_agent'
406
406
  }
407
407
  },
408
- description: "Code list responsible agency code",
408
+ description: 'Code list responsible agency code',
409
409
  required: false
410
410
  )
411
411
  item_number_identification_4.add(:code_list_responsible_agency_code_4, data)
@@ -414,7 +414,7 @@ structure << item_number_identification_4
414
414
  #==============================================================================
415
415
  # Item Number Identification 5 #
416
416
  #==============================================================================
417
- item_number_identification_5 = Eancom::Edifact::Composite.new()
417
+ item_number_identification_5 = Eancom::Edifact::Composite.new
418
418
 
419
419
  data = Eancom::Edifact::Data.new(
420
420
  type: String,
@@ -469,7 +469,7 @@ item_number_identification_5.add(:item_type_identification_code_5, data)
469
469
  data = Eancom::Edifact::Data.new(
470
470
  type: String,
471
471
  length: 0..17,
472
- description: "Code list identification code",
472
+ description: 'Code list identification code',
473
473
  required: false
474
474
  )
475
475
  item_number_identification_5.add(:code_list_identification_code_5, data)
@@ -491,7 +491,7 @@ data = Eancom::Edifact::Data.new(
491
491
  identification: 'assigned_by_buyer_or_buyers_agent'
492
492
  }
493
493
  },
494
- description: "Code list responsible agency code",
494
+ description: 'Code list responsible agency code',
495
495
  required: false
496
496
  )
497
497
  item_number_identification_5.add(:code_list_responsible_agency_code_5, data)
@@ -27,7 +27,7 @@ data = Eancom::Edifact::Data.new(
27
27
  dictionary: {
28
28
  'AAA' => {
29
29
  description: 'Calculation net',
30
- identifier: 'calculation_net',
30
+ identifier: 'calculation_net'
31
31
  },
32
32
  'AAB' => {
33
33
  description: 'Calculation gross',
@@ -85,6 +85,10 @@ data = Eancom::Edifact::Data.new(
85
85
  type: String,
86
86
  length: 0..3,
87
87
  dictionary: {
88
+ 'AE' => {
89
+ description: 'Range dependent price',
90
+ identifier: 'range_dependent_price'
91
+ },
88
92
  'CA' => {
89
93
  description: 'Catalogue',
90
94
  identifier: 'cataloque',
@@ -115,6 +119,22 @@ data = Eancom::Edifact::Data.new(
115
119
  description: 'Discount price',
116
120
  identifier: 'discount_price',
117
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
+ },
118
138
  'MRP' => {
119
139
  description: 'Market retail price',
120
140
  identifier: 'market_retail_price',
@@ -8,7 +8,7 @@ structure = Eancom::Edifact::Structure.new(tag: tag)
8
8
  tag = Eancom::Edifact::Composite.new
9
9
  data = Eancom::Edifact::Data.new(
10
10
  type: String,
11
- length: 3,
11
+ length: 1..3,
12
12
  description: 'QUANTITY DETAILS',
13
13
  required: true
14
14
  )
@@ -24,9 +24,13 @@ data = Eancom::Edifact::Data.new(
24
24
  type: String,
25
25
  length: 1..3,
26
26
  dictionary: {
27
+ '1' => {
28
+ description: 'Discrete quantity',
29
+ identifier: 'discrete_quantity'
30
+ },
27
31
  '11' => {
28
32
  description: 'Split quantity',
29
- identifier: 'split_quantity',
33
+ identifier: 'split_quantity'
30
34
  },
31
35
  '12' => {
32
36
  description: 'Despatch quantity',
@@ -36,22 +40,210 @@ data = Eancom::Edifact::Data.new(
36
40
  description: 'Ordered quantity',
37
41
  identifier: 'ordered_quantity'
38
42
  },
43
+ '26' => {
44
+ description: 'Promotion Quantity',
45
+ identifier: 'promotion_quantity'
46
+ },
47
+ '46' => {
48
+ description: 'Delivered quantity',
49
+ identifier: 'delivered_quantity'
50
+ },
39
51
  '47' => {
40
52
  description: 'Invoiced quantity',
41
53
  identifier: 'invoiced_quantity'
42
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
+ },
43
67
  '59' => {
44
68
  description: 'Numbers of consumer units in the traded unit',
45
69
  identifier: 'numbers_or_consumer_units_in_the_traded_unit'
46
- },
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
+ },
47
123
  '153' => {
48
124
  description: 'Statistical sales quantity',
49
125
  identifier: 'statistical_sales_quantitiy'
50
- },
126
+ },
51
127
  '160' => {
52
128
  description: 'Minimum production batch',
53
129
  identifier: 'minimum_production_batch'
54
- }
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
+ }
55
247
  },
56
248
  description: 'Quantity type code qualifier',
57
249
  required: true
@@ -69,6 +261,28 @@ quantity_details.add(:quantity, data)
69
261
  data = Eancom::Edifact::Data.new(
70
262
  type: String,
71
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
+ },
72
286
  description: 'Measurement unit code',
73
287
  required: false
74
288
  )