Browse Source

[Backend] Produits : quantités dans liste

feature/export_comptable
Guillaume 4 years ago
parent
commit
a25e5204c2
2 changed files with 11 additions and 4 deletions
  1. +4
    -4
      ShopBundle/Repository/OrderShopRepository.php
  2. +7
    -0
      ShopBundle/Resources/views/backend/default/list-fields/field_product_family_available_quantity.html.twig

+ 4
- 4
ShopBundle/Repository/OrderShopRepository.php View File

} }


if($deliveryAvailabilityPointSale) { if($deliveryAvailabilityPointSale) {
$query->andWhere('e.deliveryAvailabilityZone = :deliveryAvailabilityZone');
$query->setParameter('deliveryAvailabilityZone', $deliveryAvailabilityPointSale);
$query->andWhere('e.deliveryAvailabilityPointSale = :deliveryAvailabilityPointSale');
$query->setParameter('deliveryAvailabilityPointSale', $deliveryAvailabilityPointSale);
} }
}else{
}
else{
$query->leftJoin('e.deliveryAvailabilityZone', 'deliveryAvailabilityZone'); $query->leftJoin('e.deliveryAvailabilityZone', 'deliveryAvailabilityZone');
$query->leftJoin('deliveryAvailabilityZone.deliverySlot', 'deliverySlotZone'); $query->leftJoin('deliveryAvailabilityZone.deliverySlot', 'deliverySlotZone');



+ 7
- 0
ShopBundle/Resources/views/backend/default/list-fields/field_product_family_available_quantity.html.twig View File

{% if value is defined and value is not null %}
{% if item.getBehaviorPrice() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE") %}
{{ value }} pièce{% if value > 1 %}s{% endif %}
{% elseif item.getBehaviorPrice() == constant("Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT") %}
{{ value }} {{ item.getUnit().getUnit() }}
{% endif %}
{% endif %}

Loading…
Cancel
Save