eancom 1.6.2 → 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.
- checksums.yaml +4 -4
- data/.gitignore +7 -4
- data/.gitlab-ci.yml +11 -13
- data/.ruby-version +1 -1
- data/Gemfile +2 -4
- data/Gemfile.lock +21 -103
- data/README.md +46 -0
- data/definitions/desadv/d01b.rb +134 -87
- data/definitions/desadv/d96a.rb +145 -82
- 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 +128 -36
- data/definitions/segments/bgm.rb +122 -2
- data/definitions/segments/cdi.rb +39 -0
- data/definitions/segments/cnt.rb +4 -0
- data/definitions/segments/cta.rb +89 -0
- data/definitions/segments/cux.rb +9 -2
- data/definitions/segments/dgs.rb +34 -0
- data/definitions/segments/doc.rb +45 -0
- data/definitions/segments/dtm.rb +75 -20
- data/definitions/segments/efi.rb +67 -0
- data/definitions/segments/eqd.rb +37 -0
- data/definitions/segments/ftx.rb +22 -8
- data/definitions/segments/gin.rb +113 -0
- data/definitions/segments/imd.rb +9 -13
- data/definitions/segments/inv.rb +94 -0
- data/definitions/segments/lin.rb +24 -4
- data/definitions/segments/loc.rb +52 -4
- data/definitions/segments/moa.rb +86 -2
- data/definitions/segments/nad.rb +69 -9
- data/definitions/segments/pac.rb +12 -0
- data/definitions/segments/pat.rb +171 -0
- data/definitions/segments/pcd.rb +9 -92
- data/definitions/segments/pci.rb +110 -0
- data/definitions/segments/pgi.rb +7 -3
- data/definitions/segments/pia.rb +21 -29
- data/definitions/segments/pri.rb +25 -13
- data/definitions/segments/qty.rb +208 -2
- data/definitions/segments/rff.rb +49 -13
- data/definitions/segments/rte.rb +52 -0
- data/definitions/segments/tax.rb +17 -10
- data/definitions/segments/tdt.rb +24 -0
- data/definitions/segments/tod.rb +64 -0
- data/definitions/segments/tru.rb +34 -0
- data/definitions/segments/una.rb +8 -8
- data/definitions/segments/unb.rb +4 -4
- data/definitions/segments/unh.rb +70 -5
- data/definitions/segments/uns.rb +2 -2
- data/definitions/segments/unt.rb +2 -2
- data/definitions/slsrpt/d01b.rb +132 -128
- data/definitions/slsrpt/d96a.rb +132 -129
- data/eancom.gemspec +5 -8
- data/lib/eancom/edifact/body.rb +37 -18
- data/lib/eancom/edifact/document.rb +20 -16
- data/lib/eancom/edifact/footer.rb +1 -0
- data/lib/eancom/edifact/item.rb +1 -1
- data/lib/eancom/edifact/message.rb +7 -39
- data/lib/eancom/edifact/segment.rb +9 -11
- data/lib/eancom/edifact/segments/ajt.rb +32 -0
- data/lib/eancom/edifact/segments/ali.rb +2 -4
- data/lib/eancom/edifact/segments/bgm.rb +4 -3
- data/lib/eancom/edifact/segments/cdi.rb +30 -0
- data/lib/eancom/edifact/segments/cnt.rb +8 -1
- data/lib/eancom/edifact/segments/cps.rb +4 -1
- data/lib/eancom/edifact/segments/cta.rb +30 -0
- data/lib/eancom/edifact/segments/cux.rb +1 -1
- 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 +10 -6
- 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 +2 -2
- data/lib/eancom/edifact/segments/gin.rb +45 -0
- data/lib/eancom/edifact/segments/imd.rb +1 -1
- data/lib/eancom/edifact/segments/inv.rb +43 -0
- data/lib/eancom/edifact/segments/lin.rb +7 -4
- data/lib/eancom/edifact/segments/loc.rb +8 -9
- data/lib/eancom/edifact/segments/mea.rb +1 -0
- data/lib/eancom/edifact/segments/moa.rb +3 -3
- data/lib/eancom/edifact/segments/nad.rb +11 -6
- data/lib/eancom/edifact/segments/pac.rb +3 -1
- data/lib/eancom/edifact/segments/pat.rb +37 -0
- data/lib/eancom/edifact/segments/pcd.rb +6 -17
- data/lib/eancom/edifact/segments/pci.rb +40 -0
- data/lib/eancom/edifact/segments/pia.rb +1 -0
- data/lib/eancom/edifact/segments/pri.rb +0 -1
- data/lib/eancom/edifact/segments/qty.rb +9 -5
- data/lib/eancom/edifact/segments/rff.rb +8 -2
- data/lib/eancom/edifact/segments/rte.rb +33 -0
- data/lib/eancom/edifact/segments/tax.rb +7 -1
- data/lib/eancom/edifact/segments/tdt.rb +4 -1
- 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 +2 -1
- data/lib/eancom/edifact/segments/unb.rb +4 -5
- data/lib/eancom/edifact/segments/unh.rb +6 -4
- data/lib/eancom/edifact/segments/uns.rb +4 -1
- data/lib/eancom/edifact/structure.rb +0 -1
- data/lib/eancom/edifact.rb +15 -4
- data/lib/eancom/factory.rb +1 -1
- data/lib/eancom/parser/document.rb +3 -16
- data/lib/eancom/parser/segment.rb +9 -10
- data/lib/eancom/version.rb +1 -3
- data/lib/eancom.rb +3 -1
- data/pricat.json +1 -0
- metadata +45 -51
- data/.rubocop.yml +0 -2
- data/.tool-versions +0 -1
- data/definitions/segments/qvr.rb +0 -140
- data/lib/eancom/edifact/location.rb +0 -56
- data/lib/eancom/edifact/segments/qvr.rb +0 -50
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
tag = 'INV'
|
|
2
|
+
Eancom.register_segment(tag: tag, klass: Eancom::Edifact::INV)
|
|
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
|
+
# Inventory movement direction code #
|
|
21
|
+
#==============================================================================
|
|
22
|
+
inventory_movement_direction_code = Eancom::Edifact::Composite.new
|
|
23
|
+
data = Eancom::Edifact::Data.new(
|
|
24
|
+
type: String,
|
|
25
|
+
length: 1..3,
|
|
26
|
+
dictionary: {
|
|
27
|
+
'1' => {
|
|
28
|
+
description: 'Movement out of inventory',
|
|
29
|
+
identifier: 'movement_out_of_inventory'
|
|
30
|
+
},
|
|
31
|
+
'2' => {
|
|
32
|
+
description: 'Movement into inventory',
|
|
33
|
+
identifier: 'movement_into_inventory'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
description: 'Inventory movement direction code',
|
|
37
|
+
required: false
|
|
38
|
+
)
|
|
39
|
+
inventory_movement_direction_code.add(:inventory_movement_direction_code, data)
|
|
40
|
+
structure << inventory_movement_direction_code
|
|
41
|
+
#==============================================================================
|
|
42
|
+
# Inventory type code #
|
|
43
|
+
#==============================================================================
|
|
44
|
+
inventory_type_code = Eancom::Edifact::Composite.new
|
|
45
|
+
data = Eancom::Edifact::Data.new(
|
|
46
|
+
type: String,
|
|
47
|
+
length: 1..3,
|
|
48
|
+
dictionary: nil,
|
|
49
|
+
description: 'Inventory type code',
|
|
50
|
+
required: false
|
|
51
|
+
)
|
|
52
|
+
inventory_type_code.add(:inventory_type_code, data)
|
|
53
|
+
structure << inventory_type_code
|
|
54
|
+
#==============================================================================
|
|
55
|
+
# Inventory movement reason code #
|
|
56
|
+
#==============================================================================
|
|
57
|
+
inventory_movement_reason_code = Eancom::Edifact::Composite.new
|
|
58
|
+
data = Eancom::Edifact::Data.new(
|
|
59
|
+
type: String,
|
|
60
|
+
length: 1..3,
|
|
61
|
+
dictionary: nil,
|
|
62
|
+
description: 'Inventory movement reason code',
|
|
63
|
+
required: false
|
|
64
|
+
)
|
|
65
|
+
inventory_movement_reason_code.add(:inventory_movement_reason_code, data)
|
|
66
|
+
structure << inventory_movement_reason_code
|
|
67
|
+
#==============================================================================
|
|
68
|
+
# Inventory balance method code #
|
|
69
|
+
#==============================================================================
|
|
70
|
+
inventory_balance_method_code = Eancom::Edifact::Composite.new
|
|
71
|
+
data = Eancom::Edifact::Data.new(
|
|
72
|
+
type: String,
|
|
73
|
+
length: 1..3,
|
|
74
|
+
dictionary: {
|
|
75
|
+
'1' => {
|
|
76
|
+
description: 'Book-keeping inventory balance',
|
|
77
|
+
identifier: 'book_keeping_inventory_balance'
|
|
78
|
+
},
|
|
79
|
+
'2' => {
|
|
80
|
+
description: 'Formal inventory balance',
|
|
81
|
+
identifier: 'formal_inventory_balance'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
description: 'Inventory balance method code',
|
|
85
|
+
required: false
|
|
86
|
+
)
|
|
87
|
+
inventory_balance_method_code.add(:inventory_balance_method_code, data)
|
|
88
|
+
structure << inventory_balance_method_code
|
|
89
|
+
#==============================================================================
|
|
90
|
+
# INSTRUCTION #
|
|
91
|
+
#==============================================================================
|
|
92
|
+
# TODO
|
|
93
|
+
|
|
94
|
+
Eancom.register_structure(tag: 'INV', structure: structure)
|
data/definitions/segments/lin.rb
CHANGED
|
@@ -39,7 +39,28 @@ action_request_notification_description_code = Eancom::Edifact::Composite.new()
|
|
|
39
39
|
data = Eancom::Edifact::Data.new(
|
|
40
40
|
type: String,
|
|
41
41
|
length: 0..3,
|
|
42
|
-
dictionary:
|
|
42
|
+
dictionary: {
|
|
43
|
+
'1' => {
|
|
44
|
+
description: 'Added',
|
|
45
|
+
identifier: 'added'
|
|
46
|
+
},
|
|
47
|
+
'3' => {
|
|
48
|
+
description: 'Changed',
|
|
49
|
+
identifier: 'changed'
|
|
50
|
+
},
|
|
51
|
+
'4' => {
|
|
52
|
+
description: 'No action',
|
|
53
|
+
identifier: 'no_action'
|
|
54
|
+
},
|
|
55
|
+
'5' => {
|
|
56
|
+
description: 'Accepted without amendment',
|
|
57
|
+
identifier: 'accepted_without_amendment'
|
|
58
|
+
},
|
|
59
|
+
'7' => {
|
|
60
|
+
description: 'Not accepted',
|
|
61
|
+
identifier: 'not_accepted'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
43
64
|
description: 'Action request/notification description code',
|
|
44
65
|
required: false
|
|
45
66
|
)
|
|
@@ -73,7 +94,7 @@ data = Eancom::Edifact::Data.new(
|
|
|
73
94
|
identifier: 'ean'
|
|
74
95
|
}
|
|
75
96
|
},
|
|
76
|
-
description: 'Item
|
|
97
|
+
description: 'Item identifier',
|
|
77
98
|
required: true
|
|
78
99
|
)
|
|
79
100
|
item_number_identification.add(:item_type_identification_code, data)
|
|
@@ -90,7 +111,7 @@ data = Eancom::Edifact::Data.new(
|
|
|
90
111
|
dictionary: {
|
|
91
112
|
'1' => {
|
|
92
113
|
description: 'Sub-line information',
|
|
93
|
-
identifier: 'sub_line_information'
|
|
114
|
+
identifier: 'sub_line_information'
|
|
94
115
|
}
|
|
95
116
|
},
|
|
96
117
|
description: 'Sub-line indicator code',
|
|
@@ -107,7 +128,6 @@ data = Eancom::Edifact::Data.new(
|
|
|
107
128
|
)
|
|
108
129
|
sub_line_information.add(:line_item_identifier_2, data)
|
|
109
130
|
|
|
110
|
-
|
|
111
131
|
structure << sub_line_information
|
|
112
132
|
#==============================================================================
|
|
113
133
|
Eancom.register_structure(tag: 'LIN', structure: structure)
|
data/definitions/segments/loc.rb
CHANGED
|
@@ -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
|
dictionary: nil,
|
|
13
13
|
description: "Message Header",
|
|
14
14
|
required: true
|
|
@@ -23,12 +23,32 @@ location_function_qualifier = Eancom::Edifact::Composite.new()
|
|
|
23
23
|
|
|
24
24
|
data = Eancom::Edifact::Data.new(
|
|
25
25
|
type: String,
|
|
26
|
-
length: 3,
|
|
26
|
+
length: 1..3,
|
|
27
27
|
dictionary: {
|
|
28
|
+
'1' => {
|
|
29
|
+
description: 'Place of terms of delivery',
|
|
30
|
+
identifier: 'place_of_terms_of_delivery'
|
|
31
|
+
},
|
|
32
|
+
'5' => {
|
|
33
|
+
description: 'Place of departure',
|
|
34
|
+
identifier: 'place_of_departure'
|
|
35
|
+
},
|
|
28
36
|
'7' => {
|
|
29
37
|
description: 'Place of Delivery',
|
|
30
38
|
identifier: 'place_of_delivery'
|
|
31
39
|
},
|
|
40
|
+
'14' => {
|
|
41
|
+
description: 'Location of goods',
|
|
42
|
+
identifier: 'location_of_goods'
|
|
43
|
+
},
|
|
44
|
+
'18' => {
|
|
45
|
+
description: 'Warehouse',
|
|
46
|
+
identifier: 'warehouse'
|
|
47
|
+
},
|
|
48
|
+
'19' => {
|
|
49
|
+
description: 'Factory/plant',
|
|
50
|
+
identifier: 'factory_plant'
|
|
51
|
+
},
|
|
32
52
|
'150' => {
|
|
33
53
|
description: 'Container stack position',
|
|
34
54
|
identifier: 'container_stack_position'
|
|
@@ -44,7 +64,7 @@ data = Eancom::Edifact::Data.new(
|
|
|
44
64
|
location_function_qualifier.add(:location_function_qualifier, data)
|
|
45
65
|
structure << location_function_qualifier
|
|
46
66
|
#==============================================================================
|
|
47
|
-
# Location Identification #
|
|
67
|
+
# First Location Identification #
|
|
48
68
|
#==============================================================================
|
|
49
69
|
location_identification = Eancom::Edifact::Composite.new()
|
|
50
70
|
|
|
@@ -70,6 +90,10 @@ data = Eancom::Edifact::Data.new(
|
|
|
70
90
|
type: String,
|
|
71
91
|
length: 0..3,
|
|
72
92
|
dictionary: {
|
|
93
|
+
'3' => {
|
|
94
|
+
description: 'IATA (International Air Transport Association',
|
|
95
|
+
identifier: 'iata'
|
|
96
|
+
},
|
|
73
97
|
'9' => {
|
|
74
98
|
description: 'GS1',
|
|
75
99
|
identifier: 'gs1'
|
|
@@ -82,8 +106,32 @@ data = Eancom::Edifact::Data.new(
|
|
|
82
106
|
description: "Code list responsible agency code",
|
|
83
107
|
required: false
|
|
84
108
|
)
|
|
85
|
-
location_identification.add(:
|
|
109
|
+
location_identification.add(:code_list_responsible_agency_code, data)
|
|
110
|
+
|
|
111
|
+
data = Eancom::Edifact::Data.new(
|
|
112
|
+
type: String,
|
|
113
|
+
length: 1..25,
|
|
114
|
+
dictionary: nil,
|
|
115
|
+
description: 'First related location name code',
|
|
116
|
+
required: false
|
|
117
|
+
)
|
|
118
|
+
location_identification.add(:first_related_name_code, data)
|
|
86
119
|
|
|
87
120
|
structure << location_identification
|
|
88
121
|
#==============================================================================
|
|
122
|
+
# Second Location Identification #
|
|
123
|
+
#==============================================================================
|
|
124
|
+
second_location_identification = Eancom::Edifact::Composite.new
|
|
125
|
+
|
|
126
|
+
data = Eancom::Edifact::Data.new(
|
|
127
|
+
type: String,
|
|
128
|
+
length: 1..25,
|
|
129
|
+
dictionary: nil,
|
|
130
|
+
description: 'Second related location name code',
|
|
131
|
+
required: false
|
|
132
|
+
)
|
|
133
|
+
second_location_identification.add(:second_location_identification, data)
|
|
134
|
+
|
|
135
|
+
structure << second_location_identification
|
|
136
|
+
#==============================================================================
|
|
89
137
|
Eancom.register_structure(tag: 'LOC', structure: structure)
|
data/definitions/segments/moa.rb
CHANGED
|
@@ -33,6 +33,22 @@ data = Eancom::Edifact::Data.new(
|
|
|
33
33
|
description: 'Amount due/amount payable',
|
|
34
34
|
identifier: 'amount_due_amount_payable'
|
|
35
35
|
},
|
|
36
|
+
'21' => {
|
|
37
|
+
description: 'Cash discount',
|
|
38
|
+
identifier: 'cash_discount'
|
|
39
|
+
},
|
|
40
|
+
'23' => {
|
|
41
|
+
description: 'Charge amount',
|
|
42
|
+
identifier: 'charge_amount'
|
|
43
|
+
},
|
|
44
|
+
'25' => {
|
|
45
|
+
description: 'Charge/allowance bias',
|
|
46
|
+
identifier: 'charge_allowance_bias'
|
|
47
|
+
},
|
|
48
|
+
'52' => {
|
|
49
|
+
description: 'Discount amount',
|
|
50
|
+
identifier: 'discount_amount'
|
|
51
|
+
},
|
|
36
52
|
'53' => {
|
|
37
53
|
description: 'Discount amount due',
|
|
38
54
|
identifier: 'discount_amount_due'
|
|
@@ -77,18 +93,58 @@ data = Eancom::Edifact::Data.new(
|
|
|
77
93
|
description: 'Message total duty/tax/fee amount',
|
|
78
94
|
identifier: 'message_total_duty_tax_fee_amount'
|
|
79
95
|
},
|
|
96
|
+
'201' => {
|
|
97
|
+
description: 'Penalty amount',
|
|
98
|
+
identifier: 'penalty_amount'
|
|
99
|
+
},
|
|
80
100
|
'203' => {
|
|
81
101
|
description: 'Line item amount',
|
|
82
102
|
identifier: 'line_item_amount'
|
|
83
103
|
},
|
|
104
|
+
'204' => {
|
|
105
|
+
description: 'Allowance amount',
|
|
106
|
+
identifier: 'allowance_amount'
|
|
107
|
+
},
|
|
108
|
+
'210' => {
|
|
109
|
+
description: 'Credit note amount',
|
|
110
|
+
identifier: 'credit_note_amount'
|
|
111
|
+
},
|
|
112
|
+
'227' => {
|
|
113
|
+
description: 'Deposit',
|
|
114
|
+
identifier: 'deposit'
|
|
115
|
+
},
|
|
116
|
+
'236' => {
|
|
117
|
+
description: 'Amount subject to price adjustment',
|
|
118
|
+
identifier: 'amount_subject_to_price_adjustment'
|
|
119
|
+
},
|
|
120
|
+
'286' => {
|
|
121
|
+
description: 'Administration charge',
|
|
122
|
+
identifier: 'administration_charge'
|
|
123
|
+
},
|
|
124
|
+
'369' => {
|
|
125
|
+
description: 'Goods and services tax',
|
|
126
|
+
identifier: 'goods_and_services_tax'
|
|
127
|
+
},
|
|
128
|
+
'388' => {
|
|
129
|
+
description: 'Total amount including Value Added Tax (VAT)',
|
|
130
|
+
identifier: 'total_amount_including_value_added_tax_vat'
|
|
131
|
+
},
|
|
84
132
|
'396' => {
|
|
85
133
|
description: 'Total price subsidy value',
|
|
86
134
|
identifier: 'total_price_subsidy_value'
|
|
87
135
|
},
|
|
136
|
+
'400' => {
|
|
137
|
+
description: 'Rebate amount',
|
|
138
|
+
identifier: 'rebate_amount'
|
|
139
|
+
},
|
|
88
140
|
'402' => {
|
|
89
141
|
description: 'Total retail value',
|
|
90
142
|
identifier: 'total_retail_value'
|
|
91
143
|
},
|
|
144
|
+
'496' => {
|
|
145
|
+
description: 'Total returnable packages deposit amount',
|
|
146
|
+
identifier: 'total_returnable_packages_deposit_amount'
|
|
147
|
+
},
|
|
92
148
|
'507' => {
|
|
93
149
|
description: 'Net-progress payment amount',
|
|
94
150
|
identifier: 'net_progress_payment_amount'
|
|
@@ -97,8 +153,20 @@ data = Eancom::Edifact::Data.new(
|
|
|
97
153
|
description: 'Calculation basis excluding all taxes',
|
|
98
154
|
identifier: 'calculation_basis_excluding_all_taxes'
|
|
99
155
|
},
|
|
156
|
+
'529' => {
|
|
157
|
+
description: 'Calculation basis which includes all taxes except VAT',
|
|
158
|
+
identifier: 'calculation_basis_which_includes_all_taxes_except_vat'
|
|
159
|
+
},
|
|
160
|
+
'X41' => {
|
|
161
|
+
description: 'Total returnable items rental fee amount',
|
|
162
|
+
identifier: 'total_returnable_items_rental_fee_amount'
|
|
163
|
+
},
|
|
164
|
+
'X42' => {
|
|
165
|
+
description: 'Rental fee (GS1 Temporary Code)',
|
|
166
|
+
identifier: 'rental_fee_gs1_temporary_code'
|
|
167
|
+
}
|
|
100
168
|
},
|
|
101
|
-
description: "Monetary amount type code qualifier
|
|
169
|
+
description: "Monetary amount type code qualifier",
|
|
102
170
|
required: true
|
|
103
171
|
)
|
|
104
172
|
monetary_amount.add(:monetary_amount_type_code_qualifier, data)
|
|
@@ -125,6 +193,18 @@ data = Eancom::Edifact::Data.new(
|
|
|
125
193
|
type: String,
|
|
126
194
|
length: 0..3,
|
|
127
195
|
dictionary: {
|
|
196
|
+
'4' => {
|
|
197
|
+
description: 'Invoicing currency',
|
|
198
|
+
identifier: 'invoicing_currency'
|
|
199
|
+
},
|
|
200
|
+
'10' => {
|
|
201
|
+
description: 'Pricing currency',
|
|
202
|
+
identifier: 'pricing_currency'
|
|
203
|
+
},
|
|
204
|
+
'11' => {
|
|
205
|
+
description: 'Payment currency',
|
|
206
|
+
identifier: 'payment_currency'
|
|
207
|
+
},
|
|
128
208
|
'13' => {
|
|
129
209
|
description: 'Recipient local currency',
|
|
130
210
|
identifier: 'recipient_local_currency'
|
|
@@ -132,6 +212,10 @@ data = Eancom::Edifact::Data.new(
|
|
|
132
212
|
'15' => {
|
|
133
213
|
description: 'Sender local currency',
|
|
134
214
|
identifier: 'sender_local_currency'
|
|
215
|
+
},
|
|
216
|
+
'18' => {
|
|
217
|
+
description: 'Tax currency',
|
|
218
|
+
identifier: 'tax_currency'
|
|
135
219
|
}
|
|
136
220
|
},
|
|
137
221
|
description: "Currency type code qualifier",
|
|
@@ -141,4 +225,4 @@ monetary_amount.add(:currency_type_code_qualifier, data)
|
|
|
141
225
|
|
|
142
226
|
structure << monetary_amount
|
|
143
227
|
#==============================================================================
|
|
144
|
-
Eancom.register_structure(tag: 'MOA', structure: structure)
|
|
228
|
+
Eancom.register_structure(tag: 'MOA', structure: structure)
|
data/definitions/segments/nad.rb
CHANGED
|
@@ -29,6 +29,14 @@ data = Eancom::Edifact::Data.new(
|
|
|
29
29
|
description: 'Buyer',
|
|
30
30
|
identifier: 'buyer'
|
|
31
31
|
},
|
|
32
|
+
'BO' => {
|
|
33
|
+
description: 'Broker or sales office',
|
|
34
|
+
identifier: 'broker_or_sales_office'
|
|
35
|
+
},
|
|
36
|
+
'BS' => {
|
|
37
|
+
description: 'Bill and ship to',
|
|
38
|
+
identifier: 'bill_and_ship_to'
|
|
39
|
+
},
|
|
32
40
|
'DP' => {
|
|
33
41
|
description: 'Delivery party',
|
|
34
42
|
identifier: 'delivery_party'
|
|
@@ -41,10 +49,30 @@ data = Eancom::Edifact::Data.new(
|
|
|
41
49
|
description: 'Supplier',
|
|
42
50
|
identifier: 'supplier'
|
|
43
51
|
},
|
|
52
|
+
'SN' => {
|
|
53
|
+
description: 'Store number',
|
|
54
|
+
identifier: 'store_number'
|
|
55
|
+
},
|
|
56
|
+
'SE' => {
|
|
57
|
+
description: 'Seller',
|
|
58
|
+
identifier: 'seller'
|
|
59
|
+
},
|
|
60
|
+
'SR' => {
|
|
61
|
+
description: "Supplier's agent/representative",
|
|
62
|
+
identifier: 'suppliers_agent_representative'
|
|
63
|
+
},
|
|
64
|
+
'RB' => {
|
|
65
|
+
description: 'Receiving financial institution',
|
|
66
|
+
identifier: 'receiving_financial_institution'
|
|
67
|
+
},
|
|
44
68
|
'UC' => {
|
|
45
69
|
description: 'Ultimate consignee',
|
|
46
70
|
identifier: 'ultimate_consignee'
|
|
47
71
|
},
|
|
72
|
+
'UD' => {
|
|
73
|
+
description: 'UD',
|
|
74
|
+
identifier: 'Ultimate customer'
|
|
75
|
+
},
|
|
48
76
|
'MF' => {
|
|
49
77
|
description: 'Manufacturer',
|
|
50
78
|
identifier: 'manufacturer'
|
|
@@ -53,9 +81,45 @@ data = Eancom::Edifact::Data.new(
|
|
|
53
81
|
description: 'Message recipient',
|
|
54
82
|
identifier: 'message_recipient'
|
|
55
83
|
},
|
|
84
|
+
'II' => {
|
|
85
|
+
desription: 'Issuer of invoice',
|
|
86
|
+
identifier: 'issuer_of_invoice'
|
|
87
|
+
},
|
|
56
88
|
'IV' => {
|
|
57
89
|
description: 'Invoicee',
|
|
58
90
|
identifier: 'invoicee'
|
|
91
|
+
},
|
|
92
|
+
'CO' => {
|
|
93
|
+
description: 'Corporate officer',
|
|
94
|
+
identifier: 'corporate_officer'
|
|
95
|
+
},
|
|
96
|
+
'GY' => {
|
|
97
|
+
description: 'Inventory reporting party',
|
|
98
|
+
identifier: 'inventory_reporting_party'
|
|
99
|
+
},
|
|
100
|
+
'WH' => {
|
|
101
|
+
description: 'Warehouse keeper',
|
|
102
|
+
identifier: 'warehouse_keeper'
|
|
103
|
+
},
|
|
104
|
+
'GO' => {
|
|
105
|
+
description: 'Goods owner',
|
|
106
|
+
identifier: 'goods_owner'
|
|
107
|
+
},
|
|
108
|
+
'PO' => {
|
|
109
|
+
description: 'Ordering party',
|
|
110
|
+
identifier: 'ordering_party'
|
|
111
|
+
},
|
|
112
|
+
'PE' => {
|
|
113
|
+
description: 'Payee',
|
|
114
|
+
identifier: 'payee'
|
|
115
|
+
},
|
|
116
|
+
'CN' => {
|
|
117
|
+
description: 'Consignee',
|
|
118
|
+
identifier: 'consignee'
|
|
119
|
+
},
|
|
120
|
+
'X52' => {
|
|
121
|
+
description: 'Breeder (GS1 Temporary Code)',
|
|
122
|
+
identifier: 'breeder'
|
|
59
123
|
}
|
|
60
124
|
},
|
|
61
125
|
description: "Party function code qualifier",
|
|
@@ -94,16 +158,12 @@ data = Eancom::Edifact::Data.new(
|
|
|
94
158
|
'9' => {
|
|
95
159
|
description: 'GS1',
|
|
96
160
|
identifier: 'gs1'
|
|
97
|
-
}
|
|
98
|
-
'92' => {
|
|
99
|
-
description: 'Assigned by buyer or buyers agent',
|
|
100
|
-
identifier: 'assigned_by_buyer_or_buyers_agent',
|
|
101
|
-
},
|
|
161
|
+
}
|
|
102
162
|
},
|
|
103
163
|
description: 'Code list responsible agency code (9 = GS1)',
|
|
104
164
|
required: true
|
|
105
165
|
)
|
|
106
|
-
party_identification_details.add(:
|
|
166
|
+
party_identification_details.add(:code_list_responsible_agency_code_1, data)
|
|
107
167
|
|
|
108
168
|
structure << party_identification_details
|
|
109
169
|
#==============================================================================
|
|
@@ -116,7 +176,7 @@ data = Eancom::Edifact::Data.new(
|
|
|
116
176
|
length: 1..35,
|
|
117
177
|
dictionary: nil,
|
|
118
178
|
description: 'Name and address description',
|
|
119
|
-
required:
|
|
179
|
+
required: true
|
|
120
180
|
)
|
|
121
181
|
name_address.add(:name_and_address_description_1, data)
|
|
122
182
|
name_address.add(:name_and_address_description_2, data)
|
|
@@ -135,7 +195,7 @@ data = Eancom::Edifact::Data.new(
|
|
|
135
195
|
length: 1..35,
|
|
136
196
|
dictionary: nil,
|
|
137
197
|
description: 'Party Name',
|
|
138
|
-
required:
|
|
198
|
+
required: true
|
|
139
199
|
)
|
|
140
200
|
party_name.add(:party_name_1, data)
|
|
141
201
|
party_name.add(:party_name_2, data)
|
|
@@ -154,7 +214,7 @@ data = Eancom::Edifact::Data.new(
|
|
|
154
214
|
length: 1..35,
|
|
155
215
|
dictionary: nil,
|
|
156
216
|
description: 'Street and number or post office box identifier',
|
|
157
|
-
required:
|
|
217
|
+
required: true
|
|
158
218
|
)
|
|
159
219
|
street.add(:street_and_number_1, data)
|
|
160
220
|
street.add(:street_and_number_2, data)
|
data/definitions/segments/pac.rb
CHANGED
|
@@ -38,6 +38,16 @@ packaging_details = Eancom::Edifact::Composite.new()
|
|
|
38
38
|
packaging_level_code = Eancom::Edifact::Data.new(
|
|
39
39
|
type: String,
|
|
40
40
|
length: 1..3,
|
|
41
|
+
dictionary: {
|
|
42
|
+
'1' => {
|
|
43
|
+
description: 'Inner',
|
|
44
|
+
identifier: 'inner'
|
|
45
|
+
},
|
|
46
|
+
'3' => {
|
|
47
|
+
description: 'Outer',
|
|
48
|
+
identifier: 'outer'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
41
51
|
description: "Packaging level code",
|
|
42
52
|
required: false
|
|
43
53
|
)
|
|
@@ -132,11 +142,13 @@ package_type_description_code = Eancom::Edifact::Data.new(
|
|
|
132
142
|
},
|
|
133
143
|
'PK' => {
|
|
134
144
|
# TODO: Find out what this is used for
|
|
145
|
+
# PK means package. This should explain its use.
|
|
135
146
|
description: 'PK: Function Unknown',
|
|
136
147
|
identifier: 'pk_function_unknown'
|
|
137
148
|
},
|
|
138
149
|
'SL' => {
|
|
139
150
|
# TODO: Find out what this is used for
|
|
151
|
+
# SL means slipsheet. This should explain its use.
|
|
140
152
|
description: 'SL: Function Unknown',
|
|
141
153
|
identifier: 'sl_function_unknown'
|
|
142
154
|
},
|