return $query; | 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) | public function findCartCurrent($params) | ||||
{ | { | ||||
$query = $this->findByMerchantQuery(); | $query = $this->findByMerchantQuery(); | ||||
$query->andWhere('e.mainOrderShop IS NULL'); | $query->andWhere('e.mainOrderShop IS NULL'); | ||||
} | } | ||||
if (isset($params['isOffCircuit'])) { | |||||
$query = $this->filterIsOffCircuit($query, true); | |||||
} | |||||
$setParameterHorsTournee = false ; | |||||
if (isset($params['isCircuit'])) { | if (isset($params['isCircuit'])) { | ||||
$query = $this->filterIsOffCircuit($query, false); | |||||
$query->leftJoin('e.deliveryPointSale', 'pointSale'); | $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'])) { | if (isset($params['isDepository'])) { | ||||
$query = $this->filterIsOffCircuit($query, false); | |||||
$query->innerJoin('e.deliveryPointSale', 'pointSale'); | $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'])) { | if (isset($params['deliveryAvailability'])) { |
#dashboard .btn-statistic .value { | #dashboard .btn-statistic .value { | ||||
display: block; | display: block; | ||||
} | } | ||||
/* Tickets */ | |||||
/* line 294, ../../sass/backend/custom.scss */ | |||||
#ticket-list .btn-sm { | |||||
display: block; | |||||
} |
#dashboard .btn-statistic{ width: 120px; height: 70px; text-align: center; border: 1px solid black; line-height: 1rem; } | #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 small{margin-bottom: 10px; display: block;} | ||||
#dashboard .btn-statistic .value{display: block;} | #dashboard .btn-statistic .value{display: block;} | ||||
/* Tickets */ | |||||
#ticket-list { | |||||
.btn-sm { | |||||
display: block ; | |||||
} | |||||
} |
<table class="table table-condensed"> | |||||
<table class="table table-condensed" id="ticket-list"> | |||||
<thead> | <thead> | ||||
<tr> | <tr> | ||||
<th>Sujet</th> | <th>Sujet</th> |
$userMerchant = new $classUserMerchant ; | $userMerchant = new $classUserMerchant ; | ||||
$userMerchant->setUser($user) ; | $userMerchant->setUser($user) ; | ||||
$userMerchant->setMerchant($merchant) ; | $userMerchant->setMerchant($merchant) ; | ||||
$userMerchant->setCreditActive(false); | |||||
} | } | ||||
$userMerchant->setActive($active) ; | $userMerchant->setActive($active) ; | ||||
if(isset($params['credit_active'])) { | if(isset($params['credit_active'])) { | ||||
$userMerchant->setCreditActive($params['credit_active']) ; | $userMerchant->setCreditActive($params['credit_active']) ; | ||||
}else{ | |||||
$userMerchant->setCreditActive(false); | |||||
} | } | ||||
if(isset($params['credit'])) { | if(isset($params['credit'])) { |
public function isOrderShopPositiveAmount(OrderShopInterface $orderShop) | public function isOrderShopPositiveAmount(OrderShopInterface $orderShop) | ||||
{ | { | ||||
return $this->priceUtils->getTotalWithTax($orderShop) > 0 ; | |||||
return $this->priceUtils->getTotalWithTax($orderShop) >= 0 ; | |||||
} | } | ||||
public function eventOrderShopChangeQuantity(OrderShopInterface $orderShop) | public function eventOrderShopChangeQuantity(OrderShopInterface $orderShop) |