瀏覽代碼

[Backend] Produits : quantités dans liste

feature/export_comptable
Guillaume 4 年之前
父節點
當前提交
a25e5204c2
共有 2 個檔案被更改,包括 11 行新增4 行删除
  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 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存