dte: Add TipoDte 110, 111, 112#1040
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1040 +/- ##
===========================================
+ Coverage 88.65% 88.81% +0.15%
===========================================
Files 42 42
Lines 4108 4122 +14
Branches 441 445 +4
===========================================
+ Hits 3642 3661 +19
+ Misses 288 284 -4
+ Partials 178 177 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f4f0f12 to
476da62
Compare
jtrobles-cdd
left a comment
There was a problem hiding this comment.
Reviewed the addition of TipoDte 110/111/112. The PR is well-scoped and high quality.
Verified against the in-file spec comments:
DTE_REFERENCIA_RUTOTR_TIPO_DOC_SETnow equals{46, 56, 61, 110, 111, 112}— matches the documented subset.DTE_REFERENCIA_CODREF_TIPO_DOC_MANDATORY_SETadds 111/112 — matches "Requerido para 56, 61, 111, 112".- Notas 111/112 ->
is_nota=True, consistent with domestic notas 56/61. TIPO_DTE_CEDIBLEScorrectly left unchanged (export invoices aren't inDTEFacturasType).- Tests follow the existing per-member style; the constants test modules pass.
Left two minor, non-blocking comments inline. No bugs or blocking issues found.
- add TipoDte 110/111/112 and update reference mappings for export documents - update test for TipoDte 110/111/112 Ref: https://app.shortcut.com/cordada/story/20626/
476da62 to
8ad7c95
Compare
|
There was a problem hiding this comment.
Pull request overview
This PR adds three new export document types (TipoDte 110/111/112) to the Chilean SII DTE constants, completing support for electronic export documents that were previously marked as TODO. These types — Factura de Exportación Electrónica (110), Nota de Débito de Exportación Electrónica (111), and Nota de Crédito de Exportación Electrónica (112) — are already defined in the broader TipoDocumento and RcvTipoDocto enums, and this change brings TipoDte into alignment, enabling proper type conversion via RcvTipoDocto.as_tipo_dte().
Changes:
- Add three new
TipoDteenum members (110, 111, 112) with appropriate property classifications (is_factura,is_factura_venta,is_nota) and update reference sets (DTE_REFERENCIA_RUTOTR_TIPO_DOC_SET,DTE_REFERENCIA_CODREF_TIPO_DOC_MANDATORY_SET) - Add comprehensive tests for the new enum members' properties and for the
RcvTipoDocto.as_tipo_dte()mapping - Add a test case for export document references in
RvDetalleEntry.get_documento_referencia_dte_natural_keys()
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/cl_sii/dte/constants.py | Adds TipoDte 110/111/112 members, updates is_factura, is_factura_venta, is_nota properties and reference frozensets |
| src/tests/test_dte_constants.py | Tests all property values for the three new TipoDte members |
| src/tests/test_rcv_constants.py | Tests as_tipo_dte() conversion for the three export RcvTipoDocto members |
| src/tests/test_rcv_data_models.py | Tests document reference natural key resolution for export DTE types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



Ref: https://app.shortcut.com/cordada/story/20626/