Bläddra i källkod

countValidOrderShopsByDeliveryAvailability

feature/export_comptable
Guillaume 4 år sedan
förälder
incheckning
6b6e276b17
3 ändrade filer med 19 tillägg och 2 borttagningar
  1. +17
    -0
      ShopBundle/Repository/OrderShopRepository.php
  2. +1
    -1
      ShopBundle/Resources/views/backend/default/list-fields/field_price.html.twig
  3. +1
    -1
      ShopBundle/Resources/views/backend/default/list-fields/field_total.html.twig

+ 17
- 0
ShopBundle/Repository/OrderShopRepository.php Visa fil

@@ -2,6 +2,8 @@

namespace Lc\ShopBundle\Repository;

use App\Entity\DeliveryAvailabilityPointSale;
use App\Entity\DeliveryAvailabilityZone;
use Doctrine\ORM\QueryBuilder;
use Lc\ShopBundle\Context\DefaultRepositoryInterface;
use Lc\ShopBundle\Context\OrderShopInterface;
@@ -181,6 +183,21 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
$query->andWhere('pointSale.isDepository = 1');
}

if (isset($params['deliveryAvailability'])) {
$deliveryAvailability = $params['deliveryAvailability'] ;

$isDeliveryAvailabilityZone = ($deliveryAvailability instanceof DeliveryAvailabilityZone) ? true : false;
$isDeliveryAvailabilityPointSale = ($deliveryAvailability instanceof DeliveryAvailabilityPointSale) ? true : false;

if($isDeliveryAvailabilityZone) {
$query->innerJoin('e.deliveryAvailabilityZone','deliveryAvailabilityZone') ;
}

if($isDeliveryAvailabilityPointSale) {
$query->innerJoin('e.deliveryAvailabilityPointSale','deliveryAvailabilityPointSale') ;
}
}

if (isset($params['orderBy'])) {
$query->orderBy('e.' . $params['orderBy'], isset($params['orderByDirection']) ? $params['orderByDirection'] : 'DESC');
} else {

+ 1
- 1
ShopBundle/Resources/views/backend/default/list-fields/field_price.html.twig Visa fil

@@ -1 +1 @@
{{ priceUtils.getPriceWithTax(item) }}
{{ priceUtils.getPriceWithTax(item)|format_price|raw }}

+ 1
- 1
ShopBundle/Resources/views/backend/default/list-fields/field_total.html.twig Visa fil

@@ -1 +1 @@
{{ priceUtils.getTotalWithTax(item) }}
{{ priceUtils.getTotalWithTax(item)|format_price|raw }}

Laddar…
Avbryt
Spara