Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate sumDsctoGlobal diff 0.00 and mtoOtrosTributos diff 0.00 #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/xml/src/Xml/Templates/invoice2.0.xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,12 @@
</cac:TaxTotal>
{% endif %}
<cac:LegalMonetaryTotal>
{% if doc.sumDsctoGlobal != 0.00 %}
Copy link
Member

Choose a reason for hiding this comment

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

Tal vez debería utilizarse como la validación de abajo, de modo que si no se settea el campo, no estará en el XML

{% if doc.sumDsctoGlobal is not null %}

Copy link
Contributor

Choose a reason for hiding this comment

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

Hola Gian podrias añadir esa validacion tambien para los montos de operacion_gravadas

<cbc:AllowanceTotalAmount currencyID="{{ doc.tipoMoneda }}">{{ doc.sumDsctoGlobal|default(0)|n_format }}</cbc:AllowanceTotalAmount>
{% endif %}
{% if doc.mtoOtrosTributos != 0.00 %}
<cbc:ChargeTotalAmount currencyID="{{ doc.tipoMoneda }}">{{ doc.mtoOtrosTributos|default(0)|n_format }}</cbc:ChargeTotalAmount>
{% endif %}
{% if doc.totalAnticipos is not null %}<cbc:PrepaidAmount currencyID="{{ doc.tipoMoneda }}">{{ doc.totalAnticipos|n_format }}</cbc:PrepaidAmount>{% endif %}
<cbc:PayableAmount currencyID="{{ doc.tipoMoneda }}">{{ doc.mtoImpVenta|n_format }}</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
Expand Down