{% for discount in discounts %}
{{ discount.discounts.name }}
{% if (discount.typeDiscount.id == constant('CoreBundle\\Entity\\TypeDiscount::TYPE_DISCOUNT_AMOUNT') )%}
{{ discount.amount }}€
{% else %}
{% set articlePrice = discount.discounts.getArticlePVPForThisDiscount(stock.article.id) %}
{% if articlePrice is not null %}
{% set useThisPVP = articlePrice %}
{% else %}
{% set useThisPVP = stock.pvp %}
{% endif %}
{% set priceRound = (useThisPVP - ( (useThisPVP * discount.amount ) / 100 ) ) %}
{{ priceRound | rounded_price(discount.roundJson) | number_format(2, ',', '.') }}€
{% endif %}
Del {{ discount.discounts.dateStart | date('d-m-Y') }}
{% if discount.discounts.dateEnd %}
al {{ discount.discounts.dateEnd | date('d-m-Y') }}p
{% endif %}
{{ render (controller('CoreBundle:Discounts:_discountsRenderStatusLabel',{'discountsId':discount.discounts.getId()})) }}
{% if discount.roundJson != "" %}
{{ rounded_info(discount.roundJson)|raw }}
{% endif %}
{% endfor %}
{% if stock.typeStatusStock.id == constant('CoreBundle\\Entity\\TypeStatusStock::ID_STATUS_SOLD') %}
{{ render(controller('CoreBundle:Stock:paintStockSaleDetail' , { 'stock' : stock.id })) }}
{% endif %}
PVP {{ stock.pvp }}€
{% if roleRight == true %}
Precio Costo {{ stock.costPricePlusTaxes }}€
{% endif %}