Parcourir la source

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

feature/export_comptable
Fab il y a 4 ans
Parent
révision
98d54e3323
6 fichiers modifiés avec 33 ajouts et 22 suppressions
  1. +15
    -18
      ShopBundle/Repository/OrderShopRepository.php
  2. +6
    -0
      ShopBundle/Resources/public/css/backend/custom.css
  3. +9
    -0
      ShopBundle/Resources/public/sass/backend/custom.scss
  4. +1
    -1
      ShopBundle/Resources/views/backend/default/block/list_tickets.html.twig
  5. +1
    -2
      ShopBundle/Services/MerchantUtils.php
  6. +1
    -1
      ShopBundle/Services/Order/OrderUtils.php

+ 15
- 18
ShopBundle/Repository/OrderShopRepository.php Voir le fichier

@@ -81,17 +81,6 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
return $query;
}

public function filterIsOffCircuit($query, $isOffCircuit)
{
if ($isOffCircuit) {
$query->andWhere('e.isOffCircuit = 1');
} else {
$query->andWhere('e.isOffCircuit IS NULL OR e.isOffCircuit = 0');
}

return $query;
}

public function findCartCurrent($params)
{
$query = $this->findByMerchantQuery();
@@ -177,20 +166,28 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
$query->andWhere('e.mainOrderShop IS NULL');
}

if (isset($params['isOffCircuit'])) {
$query = $this->filterIsOffCircuit($query, true);
}
$setParameterHorsTournee = false ;

if (isset($params['isCircuit'])) {
$query = $this->filterIsOffCircuit($query, false);
$query->leftJoin('e.deliveryPointSale', 'pointSale');
$query->andWhere('e.deliveryPointSale IS NULL OR pointSale.isDepository = 0');
$query->andWhere('e.deliveryPointSale IS NULL OR (pointSale.isDepository = 0 AND (pointSale.devAlias IS NULL OR pointSale.devAlias != :devAliasHorsTournee))');
$setParameterHorsTournee = true ;
}

if (isset($params['isDepository'])) {
$query = $this->filterIsOffCircuit($query, false);
$query->innerJoin('e.deliveryPointSale', 'pointSale');
$query->andWhere('pointSale.isDepository = 1');
$query->andWhere('pointSale IS NOT NULL AND pointSale.isDepository = 1 AND (pointSale.devAlias IS NULL OR pointSale.devAlias != :devAliasHorsTournee)');
$setParameterHorsTournee = true ;
}

if (isset($params['isOffCircuit'])) {
$query->innerJoin('e.deliveryPointSale', 'pointSale');
$query->andWhere('pointSale IS NOT NULL AND pointSale.devAlias = :devAliasHorsTournee');
$setParameterHorsTournee = true ;
}

if($setParameterHorsTournee) {
$query->setParameter('devAliasHorsTournee', 'horstournee') ;
}

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

+ 6
- 0
ShopBundle/Resources/public/css/backend/custom.css Voir le fichier

@@ -837,3 +837,9 @@ table.table-renewable-stock tr.product-family {
#dashboard .btn-statistic .value {
display: block;
}

/* Tickets */
/* line 294, ../../sass/backend/custom.scss */
#ticket-list .btn-sm {
display: block;
}

+ 9
- 0
ShopBundle/Resources/public/sass/backend/custom.scss Voir le fichier

@@ -288,3 +288,12 @@ table.table-renewable-stock tr.product-family{border-top: 2px solid #888; }
#dashboard .btn-statistic{ width: 120px; height: 70px; text-align: center; border: 1px solid black; line-height: 1rem; }
#dashboard .btn-statistic small{margin-bottom: 10px; display: block;}
#dashboard .btn-statistic .value{display: block;}


/* Tickets */

#ticket-list {
.btn-sm {
display: block ;
}
}

+ 1
- 1
ShopBundle/Resources/views/backend/default/block/list_tickets.html.twig Voir le fichier

@@ -1,4 +1,4 @@
<table class="table table-condensed">
<table class="table table-condensed" id="ticket-list">
<thead>
<tr>
<th>Sujet</th>

+ 1
- 2
ShopBundle/Services/MerchantUtils.php Voir le fichier

@@ -38,14 +38,13 @@ class MerchantUtils
$userMerchant = new $classUserMerchant ;
$userMerchant->setUser($user) ;
$userMerchant->setMerchant($merchant) ;
$userMerchant->setCreditActive(false);
}

$userMerchant->setActive($active) ;

if(isset($params['credit_active'])) {
$userMerchant->setCreditActive($params['credit_active']) ;
}else{
$userMerchant->setCreditActive(false);
}

if(isset($params['credit'])) {

+ 1
- 1
ShopBundle/Services/Order/OrderUtils.php Voir le fichier

@@ -356,7 +356,7 @@ class OrderUtils

public function isOrderShopPositiveAmount(OrderShopInterface $orderShop)
{
return $this->priceUtils->getTotalWithTax($orderShop) > 0 ;
return $this->priceUtils->getTotalWithTax($orderShop) >= 0 ;
}

public function eventOrderShopChangeQuantity(OrderShopInterface $orderShop)

Chargement…
Annuler
Enregistrer