einvoicing 0.9.1 → 0.9.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a112029dd945f7dfbdc67dcf4ee76420d1708284a7bb18d6c04a2c32de2a7015
4
- data.tar.gz: 6f4a1302247e1b572b9713b51d4605d4e354c9000159d5755e36c1331ba70090
3
+ metadata.gz: 96c1b67f435b7ca99b2716f4aba9c8dcf631302d37db1a6fa3743d993de55334
4
+ data.tar.gz: 0c5713cbce3d1e842b64c3361957eb2764dadd89eefd5fb361816bfbd786aa3b
5
5
  SHA512:
6
- metadata.gz: ecf8f50fc15ce50e55506a7c74ab492d0a2b23987d29087a6555c229d62b9c03848d459b22da07e1428fd79ab0445da5726670f324823af36f611d61bdd0fdad
7
- data.tar.gz: e7867f59abf64d56f82fe5903d5e76994986ee3e64445a49897fd25929e19b5afc245905955b749f06ecff83e893f9bfbfa676079a5ce7622f85441106ebf4db
6
+ metadata.gz: 9c4b6d6c1907118f2743887788ac55a6b3bade8268e7ddb8ed6a78afcb735bc7581f249166501428216af1ae0ce883a6fef338c1d6eb45f473089b7f02a07924
7
+ data.tar.gz: 9c4e9728880210475896ce42280595b5eecf26514dffcbc58198d97f2f0e9dee749ab3dae3b38db7780f3ec79ae8604d93c738959f6cccfd4f7961cbfb300770
data/CHANGELOG.md CHANGED
@@ -5,7 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.9.3] - 2026-08-31
9
+
10
+ ### Fixed
11
+ - Declare `bigdecimal` and `rexml` as runtime dependencies. Both are required from `lib/` but neither was declared, so `require "einvoicing"` raised `LoadError: cannot load such file -- bigdecimal` in any consumer bundle that did not carry them, and Peppol validation failed on `rexml/document`. `rexml` is floored at 3.3.6, the release that fixed its parsing DoS.
12
+
13
+ ## [0.9.2] - 2026-08-06
14
+
15
+ ### Fixed
16
+ - CII announced a SIRET under `schemeID="0002"`, which is SIRENE — the nine-digit SIREN. A fourteen-digit SIRET now goes out as `0009`, the ISO 6523 code that actually labels it. Neither the XSD nor the EN 16931 Schematron catches the mismatch, because both values are just strings to them; a Plateforme Agréée checks it, and refuses the document. Chorus Pro keeps the literal `SIRET` scheme it predates the codelist with
9
17
 
10
18
  ## [0.9.1] - 2026-08-06
11
19
 
@@ -125,13 +125,27 @@ module Einvoicing
125
125
  end
126
126
  private_class_method :header_trade_agreement
127
127
 
128
+ # ISO 6523 identifier scheme for a French legal registration (BT-30 /
129
+ # BT-47). The code has to match the *length* of the number it labels:
130
+ # 0002 is SIRENE, which is the 9-digit SIREN, and a 14-digit SIRET
131
+ # announced as 0002 is what a Plateforme Agréée rejects the document for.
132
+ # Chorus Pro predates the codelist and wants the literal word instead.
133
+ SIREN_SCHEME = "0002"
134
+ SIRET_SCHEME = "0009"
135
+
136
+ def self.legal_id_scheme(party, profile)
137
+ return "SIRET" if profile == :chorus_pro && party.siret
138
+
139
+ party.siret ? SIRET_SCHEME : SIREN_SCHEME
140
+ end
141
+ private_class_method :legal_id_scheme
142
+
128
143
  def self.party_xml(b, party, profile)
129
144
  b.text("ram:Name", party.name)
130
145
  legal_id = party.siret || party.siren
131
146
  if legal_id
132
147
  b.tag("ram:SpecifiedLegalOrganization") do
133
- scheme = (profile == :chorus_pro && party.siret) ? "SIRET" : "0002"
134
- b.text("ram:ID", legal_id, "schemeID" => scheme)
148
+ b.text("ram:ID", legal_id, "schemeID" => legal_id_scheme(party, profile))
135
149
  end
136
150
  end
137
151
  b.tag("ram:PostalTradeAddress") do
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Einvoicing
4
- VERSION = "0.9.1"
4
+ VERSION = "0.9.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: einvoicing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Le Ray
@@ -37,6 +37,34 @@ dependencies:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '1.0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: bigdecimal
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rexml
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 3.3.6
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 3.3.6
40
68
  - !ruby/object:Gem::Dependency
41
69
  name: rspec
42
70
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +136,7 @@ dependencies:
108
136
  - !ruby/object:Gem::Version
109
137
  version: '1.16'
110
138
  - !ruby/object:Gem::Dependency
111
- name: rexml
139
+ name: prawn
112
140
  requirement: !ruby/object:Gem::Requirement
113
141
  requirements:
114
142
  - - ">="
@@ -122,33 +150,47 @@ dependencies:
122
150
  - !ruby/object:Gem::Version
123
151
  version: '0'
124
152
  - !ruby/object:Gem::Dependency
125
- name: prawn
153
+ name: webmock
126
154
  requirement: !ruby/object:Gem::Requirement
127
155
  requirements:
128
- - - ">="
156
+ - - "~>"
129
157
  - !ruby/object:Gem::Version
130
- version: '0'
158
+ version: '3.0'
131
159
  type: :development
132
160
  prerelease: false
133
161
  version_requirements: !ruby/object:Gem::Requirement
134
162
  requirements:
135
- - - ">="
163
+ - - "~>"
136
164
  - !ruby/object:Gem::Version
137
- version: '0'
165
+ version: '3.0'
138
166
  - !ruby/object:Gem::Dependency
139
- name: webmock
167
+ name: simplecov
140
168
  requirement: !ruby/object:Gem::Requirement
141
169
  requirements:
142
170
  - - "~>"
143
171
  - !ruby/object:Gem::Version
144
- version: '3.0'
172
+ version: '0.22'
145
173
  type: :development
146
174
  prerelease: false
147
175
  version_requirements: !ruby/object:Gem::Requirement
148
176
  requirements:
149
177
  - - "~>"
150
178
  - !ruby/object:Gem::Version
151
- version: '3.0'
179
+ version: '0.22'
180
+ - !ruby/object:Gem::Dependency
181
+ name: bundler-audit
182
+ requirement: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - "~>"
185
+ - !ruby/object:Gem::Version
186
+ version: '0.9'
187
+ type: :development
188
+ prerelease: false
189
+ version_requirements: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - "~>"
192
+ - !ruby/object:Gem::Version
193
+ version: '0.9'
152
194
  description: |
153
195
  EN 16931-compliant e-invoicing for Ruby. Generates Factur-X (PDF/A-3 + CII XML),
154
196
  UBL 2.1, and CII D16B. Validates French B2B requirements (SIREN, SIRET, TVA).
@@ -215,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
257
  - !ruby/object:Gem::Version
216
258
  version: '0'
217
259
  requirements: []
218
- rubygems_version: 4.0.17
260
+ rubygems_version: 4.0.19
219
261
  specification_version: 4
220
262
  summary: EU electronic invoicing for Ruby — EN 16931, Factur-X, UBL 2.1
221
263
  test_files: []