Procházet zdrojové kódy

[Backend] Produits : quantités dans liste

feature/export_comptable
Guillaume před 4 roky
rodič
revize
a25e5204c2
2 změnil soubory, kde provedl 11 přidání a 4 odebrání
  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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 %}

Načítá se…
Zrušit
Uložit