Skip to content

feat: add optional porcentajeIgv (#266)#267

Merged
giansalex merged 2 commits intothegreenter:masterfrom
dlopez525:fix/266-add-percent-summarydetail
Feb 25, 2026
Merged

feat: add optional porcentajeIgv (#266)#267
giansalex merged 2 commits intothegreenter:masterfrom
dlopez525:fix/266-add-percent-summarydetail

Conversation

@dlopez525
Copy link
Member

Este PR resuelve el issue #266 agregando soporte para el campo porcentajeIgv en SummaryDetail.

Actualmente, en el detalle del Resumen Diario (SummaryDocumentsLine) se informa el monto del IGV (mtoIGV), pero no se incluye explícitamente el porcentaje aplicado (cbc:Percent).
Según las actualizaciones recientes de SUNAT, este porcentaje debe declararse en el XML para evitar el error 2992.

Cambios realizados

  • Se agregó la propiedad opcional porcentajeIgv en Greenter\Model\Summary\SummaryDetail.
  • Se implementaron los métodos:
    • getPorcentajeIgv(): ?float
    • setPorcentajeIgv(?float $porcentajeIgv)
  • Se actualizó el template summary.xml.twig para incluir el nodo:
    <cbc:Percent>{{ det.porcentajeIgv }}</cbc:Percent>
  • El campo se implementó como opcional para mantener compatibilidad hacia atrás.
  • Se verificó que todos los tests existentes pasen correctamente.

Compatibilidad

  • El cambio es retrocompatible:
  • Si no se establece porcentajeIgv, la generación del XML no falla.
  • No afecta implementaciones actuales que no utilicen este campo.

@sonarqubecloud
Copy link

@giansalex giansalex merged commit e5f93df into thegreenter:master Feb 25, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants