Ver código fonte

Merge branch 'develop'

master^2
Guillaume 3 anos atrás
pai
commit
9d4ccd69af
3 arquivos alterados com 2 adições e 17 exclusões
  1. +1
    -1
      ShopBundle/Model/OrderShop.php
  2. +0
    -15
      ShopBundle/Repository/OrderShopRepository.php
  3. +1
    -1
      ShopBundle/Resources/public/js/backend/script/order/vuejs-order.js

+ 1
- 1
ShopBundle/Model/OrderShop.php Ver arquivo

@@ -73,7 +73,7 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa
protected $orderPayments;

/**
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\OrderProductInterface", mappedBy="orderShop", cascade={"persist", "remove"}, orphanRemoval=true)
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\OrderProductInterface", mappedBy="orderShop", cascade={"persist", "remove"}, orphanRemoval=true, fetch="EAGER")
*/
protected $orderProducts;


+ 0
- 15
ShopBundle/Repository/OrderShopRepository.php Ver arquivo

@@ -313,20 +313,5 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
}


public function countValidOrderProductsOfWeekByProduct($weekNumber, $productId)
{
$query = $this->findByMerchantQuery();
$query = $this->filterOrderValid($query);
$query->andWhere('e.weekNumber = :weekNumber');
$query->setParameter('weekNumber', $weekNumber);
$query->leftJoin('e.orderProducts', 'orderProduct');
$query->andWhere('orderProduct.product = :product');
$query->setParameter('product', $productId);
$query->select('SUM(orderProduct.quantityOrder) as quantity');

$result = $query->getQuery()->getOneOrNullResult();

return $result['quantity'];

}
}

+ 1
- 1
ShopBundle/Resources/public/js/backend/script/order/vuejs-order.js Ver arquivo

@@ -115,7 +115,7 @@ appOrder = new Vue({
}
},
preventFormSubmit: function (){
$(document).keypress(function(e) {
$('#lc-order-edit').keypress(function(e) {
if (e.which == 13) {
e.preventDefault();
}

Carregando…
Cancelar
Salvar