Skip to content

dte: Add TipoDte 110, 111, 112#1040

Merged
gcandia-co merged 1 commit into
developfrom
task/sc-20626--lib-cl-sii-python-add-tipodte-110-111-and-112
Jun 5, 2026
Merged

dte: Add TipoDte 110, 111, 112#1040
gcandia-co merged 1 commit into
developfrom
task/sc-20626--lib-cl-sii-python-add-tipodte-110-111-and-112

Conversation

@gcandia-co

@gcandia-co gcandia-co commented Jun 3, 2026

Copy link
Copy Markdown
Contributor
  • 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/

@gcandia-co gcandia-co self-assigned this Jun 3, 2026
@gcandia-co gcandia-co requested a review from a team as a code owner June 3, 2026 16:58
@gcandia-co gcandia-co added the enhancement New feature or request label Jun 3, 2026
@gcandia-co gcandia-co marked this pull request as draft June 3, 2026 16:59
Comment thread src/tests/test_dte_constants.py Dismissed
Comment thread src/tests/test_dte_constants.py Dismissed
Comment thread src/tests/test_dte_constants.py Dismissed
@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.81%. Comparing base (b430243) to head (8ad7c95).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gcandia-co gcandia-co force-pushed the task/sc-20626--lib-cl-sii-python-add-tipodte-110-111-and-112 branch from f4f0f12 to 476da62 Compare June 3, 2026 17:03
@gcandia-co gcandia-co changed the title Task/sc 20626 lib cl sii python add tipodte 110 111 and 112 feat: Added TipoDte 110/111/112 Jun 3, 2026
@gcandia-co gcandia-co marked this pull request as ready for review June 3, 2026 17:08
@gcandia-co gcandia-co requested a review from jtrobles-cdd June 3, 2026 17:08

@jtrobles-cdd jtrobles-cdd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_SET now equals {46, 56, 61, 110, 111, 112} — matches the documented subset.
  • DTE_REFERENCIA_CODREF_TIPO_DOC_MANDATORY_SET adds 111/112 — matches "Requerido para 56, 61, 111, 112".
  • Notas 111/112 -> is_nota=True, consistent with domestic notas 56/61.
  • TIPO_DTE_CEDIBLES correctly left unchanged (export invoices aren't in DTEFacturasType).
  • 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.

Comment thread src/cl_sii/dte/constants.py
Comment thread src/cl_sii/dte/constants.py
@jtrobles-cdd jtrobles-cdd changed the title feat: Added TipoDte 110/111/112 dte: Add TipoDte 110/111/112 Jun 4, 2026

@jtrobles-cdd jtrobles-cdd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- 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/
@gcandia-co gcandia-co force-pushed the task/sc-20626--lib-cl-sii-python-add-tipodte-110-111-and-112 branch from 476da62 to 8ad7c95 Compare June 5, 2026 16:33
@sonarqubecloud

sonarqubecloud Bot commented Jun 5, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TipoDte enum 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.

@jtrobles-cdd jtrobles-cdd changed the title dte: Add TipoDte 110/111/112 dte: Add TipoDte 110, 111, 112 Jun 5, 2026
@gcandia-co gcandia-co merged commit 4ea7417 into develop Jun 5, 2026
30 checks passed
@gcandia-co gcandia-co deleted the task/sc-20626--lib-cl-sii-python-add-tipodte-110-111-and-112 branch June 5, 2026 19:20
@gcandia-co gcandia-co mentioned this pull request Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: dte enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants