facturx 0.1.0 → 0.2.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/CHANGELOG.md +10 -1
- data/NOTICE.md +2 -0
- data/README.md +27 -1
- data/lib/facturx/coerce.rb +74 -0
- data/lib/facturx/diagnostic.rb +20 -0
- data/lib/facturx/document.rb +45 -0
- data/lib/facturx/group.rb +5 -0
- data/lib/facturx/model/common.rb +8 -0
- data/lib/facturx/model/immutable.rb +75 -0
- data/lib/facturx/model/line.rb +14 -0
- data/lib/facturx/model/party.rb +10 -0
- data/lib/facturx/model/payment.rb +9 -0
- data/lib/facturx/model/reference.rb +7 -0
- data/lib/facturx/model/trade.rb +9 -0
- data/lib/facturx/model.rb +9 -0
- data/lib/facturx/pdf/extractor.rb +7 -4
- data/lib/facturx/reader/semantic_mapper/delivery_mapping.rb +43 -0
- data/lib/facturx/reader/semantic_mapper/document_mapping.rb +109 -0
- data/lib/facturx/reader/semantic_mapper/helpers.rb +114 -0
- data/lib/facturx/reader/semantic_mapper/line_mapping.rb +120 -0
- data/lib/facturx/reader/semantic_mapper/party_mapping.rb +90 -0
- data/lib/facturx/reader/semantic_mapper/payment_mapping.rb +71 -0
- data/lib/facturx/reader/semantic_mapper/trade_mapping.rb +83 -0
- data/lib/facturx/reader/semantic_mapper.rb +67 -0
- data/lib/facturx/reader/term_reader/coercion.rb +69 -0
- data/lib/facturx/reader/term_reader/unmapped.rb +37 -0
- data/lib/facturx/reader/term_reader.rb +124 -0
- data/lib/facturx/reader.rb +101 -0
- data/lib/facturx/reading.rb +23 -0
- data/lib/facturx/source_reader.rb +30 -0
- data/lib/facturx/term.rb +5 -0
- data/lib/facturx/terms/declaration.rb +20 -0
- data/lib/facturx/terms/declarations/adjustments.rb +230 -0
- data/lib/facturx/terms/declarations/delivery.rb +83 -0
- data/lib/facturx/terms/declarations/document.rb +223 -0
- data/lib/facturx/terms/declarations/groups.rb +356 -0
- data/lib/facturx/terms/declarations/lines.rb +166 -0
- data/lib/facturx/terms/declarations/parties.rb +609 -0
- data/lib/facturx/terms/declarations/payment.rb +106 -0
- data/lib/facturx/terms/declarations/products.rb +103 -0
- data/lib/facturx/terms/declarations/references.rb +72 -0
- data/lib/facturx/terms/declarations/taxes.rb +92 -0
- data/lib/facturx/terms/declarations/totals.rb +107 -0
- data/lib/facturx/terms/reference.rb +21 -0
- data/lib/facturx/terms.rb +109 -0
- data/lib/facturx/version.rb +1 -1
- data/lib/facturx.rb +14 -0
- metadata +45 -4
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
Facturx::TermDeclarations::DOCUMENT = [
|
|
4
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
5
|
+
'BT-23', :document, :business_process, 'BG-2',
|
|
6
|
+
'/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext' \
|
|
7
|
+
'/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID',
|
|
8
|
+
:string, nil,
|
|
9
|
+
minimum: '0..1',
|
|
10
|
+
basic_wl: '0..1',
|
|
11
|
+
basic: '0..1',
|
|
12
|
+
en16931: '0..1',
|
|
13
|
+
extended: '0..1'
|
|
14
|
+
),
|
|
15
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
16
|
+
'BT-24', :document, :guideline_urn, 'BG-2',
|
|
17
|
+
'/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext' \
|
|
18
|
+
'/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID',
|
|
19
|
+
:string, nil,
|
|
20
|
+
minimum: '1..1',
|
|
21
|
+
basic_wl: '1..1',
|
|
22
|
+
basic: '1..1',
|
|
23
|
+
en16931: '1..1',
|
|
24
|
+
extended: '1..1'
|
|
25
|
+
),
|
|
26
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
27
|
+
'BT-1', :document, :invoice_number, nil,
|
|
28
|
+
'/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:ID',
|
|
29
|
+
:string, nil,
|
|
30
|
+
minimum: '1..1',
|
|
31
|
+
basic_wl: '1..1',
|
|
32
|
+
basic: '1..1',
|
|
33
|
+
en16931: '1..1',
|
|
34
|
+
extended: '1..1'
|
|
35
|
+
),
|
|
36
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
37
|
+
'BT-3', :document, :type_code, nil,
|
|
38
|
+
'/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:TypeCode',
|
|
39
|
+
:string, nil,
|
|
40
|
+
minimum: '1..1',
|
|
41
|
+
basic_wl: '1..1',
|
|
42
|
+
basic: '1..1',
|
|
43
|
+
en16931: '1..1',
|
|
44
|
+
extended: '1..1'
|
|
45
|
+
),
|
|
46
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
47
|
+
'BT-2', :document, :issue_date, nil,
|
|
48
|
+
'/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString',
|
|
49
|
+
:date_102, nil,
|
|
50
|
+
minimum: '1..1',
|
|
51
|
+
basic_wl: '1..1',
|
|
52
|
+
basic: '1..1',
|
|
53
|
+
en16931: '1..1',
|
|
54
|
+
extended: '1..1'
|
|
55
|
+
),
|
|
56
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
57
|
+
'BT-22', :note, :content, 'BG-1',
|
|
58
|
+
'/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:Content',
|
|
59
|
+
:string, nil,
|
|
60
|
+
basic_wl: '1..1',
|
|
61
|
+
basic: '1..1',
|
|
62
|
+
en16931: '1..1',
|
|
63
|
+
extended: '1..1'
|
|
64
|
+
),
|
|
65
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
66
|
+
'BT-21', :note, :subject_code, 'BG-1',
|
|
67
|
+
'/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:SubjectCode',
|
|
68
|
+
:string, nil,
|
|
69
|
+
basic_wl: '0..1',
|
|
70
|
+
basic: '0..1',
|
|
71
|
+
en16931: '0..1',
|
|
72
|
+
extended: '0..1'
|
|
73
|
+
),
|
|
74
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
75
|
+
'BT-10', :document, :buyer_reference, nil,
|
|
76
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
77
|
+
'/ram:BuyerReference',
|
|
78
|
+
:string, nil,
|
|
79
|
+
minimum: '0..1',
|
|
80
|
+
basic_wl: '0..1',
|
|
81
|
+
basic: '0..1',
|
|
82
|
+
en16931: '0..1',
|
|
83
|
+
extended: '0..1'
|
|
84
|
+
),
|
|
85
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
86
|
+
'BT-14', :document, :sales_order_reference, nil,
|
|
87
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
88
|
+
'/ram:SellerOrderReferencedDocument/ram:IssuerAssignedID',
|
|
89
|
+
:string, nil,
|
|
90
|
+
en16931: '0..1',
|
|
91
|
+
extended: '0..1'
|
|
92
|
+
),
|
|
93
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
94
|
+
'BT-13', :document, :purchase_order_reference, nil,
|
|
95
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
96
|
+
'/ram:BuyerOrderReferencedDocument/ram:IssuerAssignedID',
|
|
97
|
+
:string, nil,
|
|
98
|
+
minimum: '0..1',
|
|
99
|
+
basic_wl: '0..1',
|
|
100
|
+
basic: '0..1',
|
|
101
|
+
en16931: '0..1',
|
|
102
|
+
extended: '0..1'
|
|
103
|
+
),
|
|
104
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
105
|
+
'BT-12', :document, :contract_reference, nil,
|
|
106
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
107
|
+
'/ram:ContractReferencedDocument/ram:IssuerAssignedID',
|
|
108
|
+
:string, nil,
|
|
109
|
+
basic_wl: '0..1',
|
|
110
|
+
basic: '0..1',
|
|
111
|
+
en16931: '0..1',
|
|
112
|
+
extended: '0..1'
|
|
113
|
+
),
|
|
114
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
115
|
+
'BT-17', :document, :tender_or_lot_reference, 'BG-24',
|
|
116
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
117
|
+
'/ram:AdditionalReferencedDocument/ram:IssuerAssignedID',
|
|
118
|
+
:string, nil,
|
|
119
|
+
en16931: '0..1',
|
|
120
|
+
extended: '0..1'
|
|
121
|
+
),
|
|
122
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
123
|
+
'BT-18', :document, :invoiced_object_identifier, 'BG-24',
|
|
124
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
125
|
+
'/ram:AdditionalReferencedDocument/ram:IssuerAssignedID',
|
|
126
|
+
:string, nil,
|
|
127
|
+
en16931: '0..1',
|
|
128
|
+
extended: '0..1'
|
|
129
|
+
),
|
|
130
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
131
|
+
'BT-18-1', :document, :invoiced_object_identifier, 'BG-24',
|
|
132
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
133
|
+
'/ram:AdditionalReferencedDocument/ram:ReferenceTypeCode',
|
|
134
|
+
:string, nil,
|
|
135
|
+
en16931: '0..1',
|
|
136
|
+
extended: '0..1'
|
|
137
|
+
),
|
|
138
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
139
|
+
'BT-11', :document, :project_reference, nil,
|
|
140
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
141
|
+
'/ram:SpecifiedProcuringProject/ram:ID',
|
|
142
|
+
:string, nil,
|
|
143
|
+
en16931: '0..1',
|
|
144
|
+
extended: '0..1'
|
|
145
|
+
),
|
|
146
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
147
|
+
'BT-16', :document, :despatch_advice_reference, 'BG-13-00',
|
|
148
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery' \
|
|
149
|
+
'/ram:DespatchAdviceReferencedDocument/ram:IssuerAssignedID',
|
|
150
|
+
:string, nil,
|
|
151
|
+
basic_wl: '0..1',
|
|
152
|
+
basic: '0..1',
|
|
153
|
+
en16931: '0..1',
|
|
154
|
+
extended: '0..1'
|
|
155
|
+
),
|
|
156
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
157
|
+
'BT-15', :document, :receiving_advice_reference, 'BG-13-00',
|
|
158
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery' \
|
|
159
|
+
'/ram:ReceivingAdviceReferencedDocument/ram:IssuerAssignedID',
|
|
160
|
+
:string, nil,
|
|
161
|
+
en16931: '0..1',
|
|
162
|
+
extended: '0..1'
|
|
163
|
+
),
|
|
164
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
165
|
+
'BT-6', :document, :tax_currency, 'BG-19',
|
|
166
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
167
|
+
'/ram:TaxCurrencyCode',
|
|
168
|
+
:string, nil,
|
|
169
|
+
basic_wl: '0..1',
|
|
170
|
+
basic: '0..1',
|
|
171
|
+
en16931: '0..1',
|
|
172
|
+
extended: '0..1'
|
|
173
|
+
),
|
|
174
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
175
|
+
'BT-5', :document, :currency, 'BG-19',
|
|
176
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
177
|
+
'/ram:InvoiceCurrencyCode',
|
|
178
|
+
:string, nil,
|
|
179
|
+
minimum: '1..1',
|
|
180
|
+
basic_wl: '1..1',
|
|
181
|
+
basic: '1..1',
|
|
182
|
+
en16931: '1..1',
|
|
183
|
+
extended: '1..1'
|
|
184
|
+
),
|
|
185
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
186
|
+
'BT-7', :document, :vat_point_date, 'BG-23',
|
|
187
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
188
|
+
'/ram:ApplicableTradeTax/ram:TaxPointDate/udt:DateString',
|
|
189
|
+
:date_102, nil,
|
|
190
|
+
en16931: '0..1',
|
|
191
|
+
extended: '0..1'
|
|
192
|
+
),
|
|
193
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
194
|
+
'BT-20', :document, :payment_terms, 'BG-19',
|
|
195
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
196
|
+
'/ram:SpecifiedTradePaymentTerms/ram:Description',
|
|
197
|
+
:string, nil,
|
|
198
|
+
basic_wl: '0..1',
|
|
199
|
+
basic: '0..1',
|
|
200
|
+
en16931: '0..1',
|
|
201
|
+
extended: '0..1'
|
|
202
|
+
),
|
|
203
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
204
|
+
'BT-9', :document, :payment_due_date, 'BG-19',
|
|
205
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
206
|
+
'/ram:SpecifiedTradePaymentTerms/ram:DueDateDateTime/udt:DateTimeString',
|
|
207
|
+
:date_102, nil,
|
|
208
|
+
basic_wl: '0..1',
|
|
209
|
+
basic: '0..1',
|
|
210
|
+
en16931: '0..1',
|
|
211
|
+
extended: '0..1'
|
|
212
|
+
),
|
|
213
|
+
Facturx::TermDeclarations::Declaration.term(
|
|
214
|
+
'BT-19', :document, :buyer_accounting_reference, 'BG-19',
|
|
215
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
216
|
+
'/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID',
|
|
217
|
+
:string, nil,
|
|
218
|
+
basic_wl: '0..1',
|
|
219
|
+
basic: '0..1',
|
|
220
|
+
en16931: '0..1',
|
|
221
|
+
extended: '0..1'
|
|
222
|
+
)
|
|
223
|
+
].freeze
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
Facturx::TermDeclarations::GROUPS = [
|
|
4
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
5
|
+
'BG-2', :document, nil, nil,
|
|
6
|
+
'/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext',
|
|
7
|
+
minimum: '1..1',
|
|
8
|
+
basic_wl: '1..1',
|
|
9
|
+
basic: '1..1',
|
|
10
|
+
en16931: '1..1',
|
|
11
|
+
extended: '1..1'
|
|
12
|
+
),
|
|
13
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
14
|
+
'BG-1', :note, :notes, nil,
|
|
15
|
+
'/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote',
|
|
16
|
+
basic_wl: '0..n',
|
|
17
|
+
basic: '0..n',
|
|
18
|
+
en16931: '0..n',
|
|
19
|
+
extended: '0..n'
|
|
20
|
+
),
|
|
21
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
22
|
+
'BG-25', :line, :lines, nil,
|
|
23
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem',
|
|
24
|
+
basic: '1..n',
|
|
25
|
+
en16931: '1..n',
|
|
26
|
+
extended: '1..n'
|
|
27
|
+
),
|
|
28
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
29
|
+
'BG-31', :product, :product, 'BG-25',
|
|
30
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
31
|
+
'/ram:SpecifiedTradeProduct',
|
|
32
|
+
basic: '1..1',
|
|
33
|
+
en16931: '1..1',
|
|
34
|
+
extended: '1..1'
|
|
35
|
+
),
|
|
36
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
37
|
+
'BG-32', :product_attribute, :attributes, 'BG-31',
|
|
38
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
39
|
+
'/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic',
|
|
40
|
+
en16931: '0..n',
|
|
41
|
+
extended: '0..n'
|
|
42
|
+
),
|
|
43
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
44
|
+
'BG-29', :line, nil, 'BG-25',
|
|
45
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
46
|
+
'/ram:SpecifiedLineTradeAgreement',
|
|
47
|
+
basic: '1..1',
|
|
48
|
+
en16931: '1..1',
|
|
49
|
+
extended: '1..1'
|
|
50
|
+
),
|
|
51
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
52
|
+
'BG-30', :tax_breakdown, :tax, 'BG-25',
|
|
53
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
54
|
+
'/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax',
|
|
55
|
+
basic: '1..1',
|
|
56
|
+
en16931: '1..1',
|
|
57
|
+
extended: '1..1'
|
|
58
|
+
),
|
|
59
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
60
|
+
'BG-26', :period, :period, 'BG-25',
|
|
61
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
62
|
+
'/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod',
|
|
63
|
+
basic: '0..1',
|
|
64
|
+
en16931: '0..1',
|
|
65
|
+
extended: '0..1'
|
|
66
|
+
),
|
|
67
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
68
|
+
'BG-27', :allowance_charge, :allowances, 'BG-25',
|
|
69
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
70
|
+
'/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge',
|
|
71
|
+
basic: '0..n',
|
|
72
|
+
en16931: '0..n',
|
|
73
|
+
extended: '0..n'
|
|
74
|
+
),
|
|
75
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
76
|
+
'BG-27-0', :allowance_charge, nil, 'BG-27',
|
|
77
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
78
|
+
'/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator',
|
|
79
|
+
basic: '0..1',
|
|
80
|
+
en16931: '0..1',
|
|
81
|
+
extended: '0..1'
|
|
82
|
+
),
|
|
83
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
84
|
+
'BG-27-1', :allowance_charge, nil, 'BG-27',
|
|
85
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
86
|
+
'/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator' \
|
|
87
|
+
'/udt:Indicator',
|
|
88
|
+
basic: '1..1',
|
|
89
|
+
en16931: '1..1',
|
|
90
|
+
extended: '1..1'
|
|
91
|
+
),
|
|
92
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
93
|
+
'BG-28', :allowance_charge, :charges, 'BG-25',
|
|
94
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
95
|
+
'/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge',
|
|
96
|
+
basic: '0..n',
|
|
97
|
+
en16931: '0..n',
|
|
98
|
+
extended: '0..n'
|
|
99
|
+
),
|
|
100
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
101
|
+
'BG-28-0', :allowance_charge, nil, 'BG-28',
|
|
102
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
103
|
+
'/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator',
|
|
104
|
+
basic: '0..1',
|
|
105
|
+
en16931: '0..1',
|
|
106
|
+
extended: '0..1'
|
|
107
|
+
),
|
|
108
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
109
|
+
'BG-28-1', :allowance_charge, nil, 'BG-28',
|
|
110
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem' \
|
|
111
|
+
'/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator' \
|
|
112
|
+
'/udt:Indicator',
|
|
113
|
+
basic: '1..1',
|
|
114
|
+
en16931: '1..1',
|
|
115
|
+
extended: '1..1'
|
|
116
|
+
),
|
|
117
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
118
|
+
'BG-4', :party, :seller, nil,
|
|
119
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
120
|
+
'/ram:SellerTradeParty',
|
|
121
|
+
minimum: '1..1',
|
|
122
|
+
basic_wl: '1..1',
|
|
123
|
+
basic: '1..1',
|
|
124
|
+
en16931: '1..1',
|
|
125
|
+
extended: '1..1'
|
|
126
|
+
),
|
|
127
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
128
|
+
'BG-6', :contact, :contact, 'BG-4',
|
|
129
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
130
|
+
'/ram:SellerTradeParty/ram:DefinedTradeContact',
|
|
131
|
+
en16931: '0..1',
|
|
132
|
+
extended: '0..1'
|
|
133
|
+
),
|
|
134
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
135
|
+
'BG-5', :address, :address, 'BG-4',
|
|
136
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
137
|
+
'/ram:SellerTradeParty/ram:PostalTradeAddress',
|
|
138
|
+
minimum: '1..1',
|
|
139
|
+
basic_wl: '1..1',
|
|
140
|
+
basic: '1..1',
|
|
141
|
+
en16931: '1..1',
|
|
142
|
+
extended: '1..1'
|
|
143
|
+
),
|
|
144
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
145
|
+
'BG-7', :party, :buyer, nil,
|
|
146
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
147
|
+
'/ram:BuyerTradeParty',
|
|
148
|
+
minimum: '1..1',
|
|
149
|
+
basic_wl: '1..1',
|
|
150
|
+
basic: '1..1',
|
|
151
|
+
en16931: '1..1',
|
|
152
|
+
extended: '1..1'
|
|
153
|
+
),
|
|
154
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
155
|
+
'BG-9', :contact, :contact, 'BG-7',
|
|
156
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
157
|
+
'/ram:BuyerTradeParty/ram:DefinedTradeContact',
|
|
158
|
+
en16931: '0..1',
|
|
159
|
+
extended: '0..1'
|
|
160
|
+
),
|
|
161
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
162
|
+
'BG-8', :address, :address, 'BG-7',
|
|
163
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
164
|
+
'/ram:BuyerTradeParty/ram:PostalTradeAddress',
|
|
165
|
+
basic_wl: '1..1',
|
|
166
|
+
basic: '1..1',
|
|
167
|
+
en16931: '1..1',
|
|
168
|
+
extended: '1..1'
|
|
169
|
+
),
|
|
170
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
171
|
+
'BG-11', :party, :tax_representative, nil,
|
|
172
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
173
|
+
'/ram:SellerTaxRepresentativeTradeParty',
|
|
174
|
+
basic_wl: '0..1',
|
|
175
|
+
basic: '0..1',
|
|
176
|
+
en16931: '0..1',
|
|
177
|
+
extended: '0..1'
|
|
178
|
+
),
|
|
179
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
180
|
+
'BG-12', :address, :address, 'BG-11',
|
|
181
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
182
|
+
'/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress',
|
|
183
|
+
basic_wl: '1..1',
|
|
184
|
+
basic: '1..1',
|
|
185
|
+
en16931: '1..1',
|
|
186
|
+
extended: '1..1'
|
|
187
|
+
),
|
|
188
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
189
|
+
'BG-24', :supporting_document, :supporting_documents, nil,
|
|
190
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement' \
|
|
191
|
+
'/ram:AdditionalReferencedDocument',
|
|
192
|
+
en16931: '0..n',
|
|
193
|
+
extended: '0..n'
|
|
194
|
+
),
|
|
195
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
196
|
+
'BG-13-00', :delivery, :delivery, nil,
|
|
197
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery',
|
|
198
|
+
minimum: '0..1',
|
|
199
|
+
basic_wl: '0..1',
|
|
200
|
+
basic: '0..1',
|
|
201
|
+
en16931: '0..1',
|
|
202
|
+
extended: '0..1'
|
|
203
|
+
),
|
|
204
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
205
|
+
'BG-13', :party, :party, 'BG-13-00',
|
|
206
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery' \
|
|
207
|
+
'/ram:ShipToTradeParty',
|
|
208
|
+
basic_wl: '0..1',
|
|
209
|
+
basic: '0..1',
|
|
210
|
+
en16931: '0..1',
|
|
211
|
+
extended: '0..1'
|
|
212
|
+
),
|
|
213
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
214
|
+
'BG-15', :address, :address, 'BG-13',
|
|
215
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery' \
|
|
216
|
+
'/ram:ShipToTradeParty/ram:PostalTradeAddress',
|
|
217
|
+
basic_wl: '0..1',
|
|
218
|
+
basic: '0..1',
|
|
219
|
+
en16931: '0..1',
|
|
220
|
+
extended: '0..1'
|
|
221
|
+
),
|
|
222
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
223
|
+
'BG-19', :document, nil, nil,
|
|
224
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement',
|
|
225
|
+
minimum: '0..1',
|
|
226
|
+
basic_wl: '0..1',
|
|
227
|
+
basic: '0..1',
|
|
228
|
+
en16931: '0..1',
|
|
229
|
+
extended: '0..1'
|
|
230
|
+
),
|
|
231
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
232
|
+
'BG-10', :party, :payee, nil,
|
|
233
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
234
|
+
'/ram:PayeeTradeParty',
|
|
235
|
+
basic_wl: '0..1',
|
|
236
|
+
basic: '0..1',
|
|
237
|
+
en16931: '0..1',
|
|
238
|
+
extended: '0..1'
|
|
239
|
+
),
|
|
240
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
241
|
+
'BG-16', :payment_instructions, :payment, nil,
|
|
242
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
243
|
+
'/ram:SpecifiedTradeSettlementPaymentMeans',
|
|
244
|
+
basic_wl: '0..1',
|
|
245
|
+
basic: '0..1',
|
|
246
|
+
en16931: '0..1',
|
|
247
|
+
extended: '0..1'
|
|
248
|
+
),
|
|
249
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
250
|
+
'BG-18', :payment_card, :payment_card, 'BG-16',
|
|
251
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
252
|
+
'/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard',
|
|
253
|
+
en16931: '0..1',
|
|
254
|
+
extended: '0..1'
|
|
255
|
+
),
|
|
256
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
257
|
+
'BG-17', :credit_transfer, :credit_transfers, 'BG-16',
|
|
258
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
259
|
+
'/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount',
|
|
260
|
+
basic_wl: '0..n',
|
|
261
|
+
basic: '0..n',
|
|
262
|
+
en16931: '0..n',
|
|
263
|
+
extended: '0..n'
|
|
264
|
+
),
|
|
265
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
266
|
+
'BG-23', :tax_breakdown, :tax_breakdowns, nil,
|
|
267
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
268
|
+
'/ram:ApplicableTradeTax',
|
|
269
|
+
basic_wl: '1..n',
|
|
270
|
+
basic: '1..n',
|
|
271
|
+
en16931: '1..n',
|
|
272
|
+
extended: '1..n'
|
|
273
|
+
),
|
|
274
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
275
|
+
'BG-14', :period, :billing_period, nil,
|
|
276
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
277
|
+
'/ram:BillingSpecifiedPeriod',
|
|
278
|
+
basic_wl: '0..1',
|
|
279
|
+
basic: '0..1',
|
|
280
|
+
en16931: '0..1',
|
|
281
|
+
extended: '0..1'
|
|
282
|
+
),
|
|
283
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
284
|
+
'BG-20', :allowance_charge, :allowances, nil,
|
|
285
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
286
|
+
'/ram:SpecifiedTradeAllowanceCharge',
|
|
287
|
+
basic_wl: '0..n',
|
|
288
|
+
basic: '0..n',
|
|
289
|
+
en16931: '0..n',
|
|
290
|
+
extended: '0..n'
|
|
291
|
+
),
|
|
292
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
293
|
+
'BG-20-0', :allowance_charge, nil, 'BG-20',
|
|
294
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
295
|
+
'/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator',
|
|
296
|
+
basic_wl: '0..1',
|
|
297
|
+
basic: '0..1',
|
|
298
|
+
en16931: '0..1',
|
|
299
|
+
extended: '0..1'
|
|
300
|
+
),
|
|
301
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
302
|
+
'BG-20-1', :allowance_charge, nil, 'BG-20',
|
|
303
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
304
|
+
'/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator/udt:Indicator',
|
|
305
|
+
basic_wl: '1..1',
|
|
306
|
+
basic: '1..1',
|
|
307
|
+
en16931: '1..1',
|
|
308
|
+
extended: '1..1'
|
|
309
|
+
),
|
|
310
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
311
|
+
'BG-21', :allowance_charge, :charges, nil,
|
|
312
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
313
|
+
'/ram:SpecifiedTradeAllowanceCharge',
|
|
314
|
+
basic_wl: '0..n',
|
|
315
|
+
basic: '0..n',
|
|
316
|
+
en16931: '0..n',
|
|
317
|
+
extended: '0..n'
|
|
318
|
+
),
|
|
319
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
320
|
+
'BG-21-0', :allowance_charge, nil, 'BG-21',
|
|
321
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
322
|
+
'/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator',
|
|
323
|
+
basic_wl: '0..1',
|
|
324
|
+
basic: '0..1',
|
|
325
|
+
en16931: '0..1',
|
|
326
|
+
extended: '0..1'
|
|
327
|
+
),
|
|
328
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
329
|
+
'BG-21-1', :allowance_charge, nil, 'BG-21',
|
|
330
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
331
|
+
'/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator/udt:Indicator',
|
|
332
|
+
basic_wl: '1..1',
|
|
333
|
+
basic: '1..1',
|
|
334
|
+
en16931: '1..1',
|
|
335
|
+
extended: '1..1'
|
|
336
|
+
),
|
|
337
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
338
|
+
'BG-22', :totals, :totals, nil,
|
|
339
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
340
|
+
'/ram:SpecifiedTradeSettlementHeaderMonetarySummation',
|
|
341
|
+
minimum: '1..1',
|
|
342
|
+
basic_wl: '1..1',
|
|
343
|
+
basic: '1..1',
|
|
344
|
+
en16931: '1..1',
|
|
345
|
+
extended: '1..1'
|
|
346
|
+
),
|
|
347
|
+
Facturx::TermDeclarations::Declaration.group(
|
|
348
|
+
'BG-3', :document_reference, :preceding_invoices, nil,
|
|
349
|
+
'/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement' \
|
|
350
|
+
'/ram:InvoiceReferencedDocument',
|
|
351
|
+
basic_wl: '0..n',
|
|
352
|
+
basic: '0..n',
|
|
353
|
+
en16931: '0..n',
|
|
354
|
+
extended: '0..n'
|
|
355
|
+
)
|
|
356
|
+
].freeze
|