DATOS ECONÓMICOS DE {{ shop.name | upper }} - {{ shop.address | upper }}
Importe bruto
{{ grossAmount | number_format(2, '.', '') }} €
{% set totalDiscount = 0 %}
{% if orderDiscounts %}
{% for discount in orderDiscounts %}
{% set totalDiscount = totalDiscount + (grossAmount * discount.discount.value / 100) %}
Descuento: {{ discount.discount.description }} ({{ discount.discount.value }}%)
{% if discount.discount.typeDealerDiscount.id == constant('CoreBundle\\Entity\\TypeDiscount::TYPE_DISCOUNT_PERCENTAGE') %}
-{{ (grossAmount * discount.discount.value / 100) | number_format(2, '.', '') }} €
{% elseif discount.discount.typeDealerDiscount.id == constant('CoreBundle\\Entity\\TypeDiscount::TYPE_DISCOUNT_AMOUNT') %}
-{{ discount.discount.value | number_format(2, '.', '') }} €
{% endif %}
{% endfor %}
{% endif %}
{% if customOrderDiscounts %}
{% for discount in customOrderDiscounts %}
{% set totalDiscount = totalDiscount + (grossAmount * discount.discount.value / 100) %}
Descuento: {{ discount.discount.description }} ({{ discount.discount.value }}%)
{% if discount.discount.typeDealerDiscount.id == constant('CoreBundle\\Entity\\TypeDiscount::TYPE_DISCOUNT_PERCENTAGE') %}
-{{ (grossAmount * discount.discount.value / 100) | number_format(2, '.', '') }} €
{% elseif discount.discount.typeDealerDiscount.id == constant('CoreBundle\\Entity\\TypeDiscount::TYPE_DISCOUNT_AMOUNT') %}
-{{ discount.discount.value | number_format(2, '.', '') }} €
{% endif %}
{% endfor %}
{% endif %}
Total Descuentos
-{{ totalDiscount | number_format(2, '.', '') }} €
{% set taxBase = grossAmount - totalDiscount %}
BASE IMPONIBLE
{{ taxBase | number_format(2, '.', '') }} €
{% set taxes = 0 %}
{% if not order.dealer.isIntracommunityDealer %}
{% for tax in shop.company.taxSupported %}
{{ tax.acronym }} ( {{ tax.percentage }}% )
{% set currentTax = (taxBase * tax.percentage / 100) %}
{{ currentTax | number_format(2, '.', '') }} €
{% set taxes = taxes + currentTax %}
{% endfor %}
{% endif %}
TOTAL
{% if not order.dealer.isIntracommunityDealer %}
{% set total = taxBase + taxes %}
{% else %}
{% set total = taxBase %}
{% endif %}
{{ total | number_format(2, '.', '') }} €