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

@@ -195,11 +195,11 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
}

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('deliveryAvailabilityZone.deliverySlot', 'deliverySlotZone');


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

@@ -0,0 +1,7 @@
{% 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