Browse Source

Relivraisons

feature/export_comptable
Guillaume 4 years ago
parent
commit
14e67e4769
2 changed files with 2 additions and 6 deletions
  1. +0
    -5
      ShopBundle/Model/OrderShop.php
  2. +2
    -1
      ShopBundle/Services/Order/OrderUtils.php

+ 0
- 5
ShopBundle/Model/OrderShop.php View File

*/ */
protected $orderProducts; protected $orderProducts;


/**
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\CreditHistoryInterface", mappedBy="orderShop", orphanRemoval=true)
*/
protected $creditHistories;

/** /**
* @ORM\Column(type="text", nullable=true) * @ORM\Column(type="text", nullable=true)
*/ */

+ 2
- 1
ShopBundle/Services/Order/OrderUtils.php View File



foreach ($orderShop->getOrderProducts() as $orderProduct) { foreach ($orderShop->getOrderProducts() as $orderProduct) {
if ($orderProduct->getProduct()->getId() == $orderProductAdd->getProduct()->getId() if ($orderProduct->getProduct()->getId() == $orderProductAdd->getProduct()->getId()
&& (string)$this->priceUtils->getPrice($orderProduct) == (string)$this->priceUtils->getPrice($orderProductAdd)
&& $orderProduct->getRedelivery() == $orderProductAdd->getRedelivery()
&& (string) $this->priceUtils->getPrice($orderProduct) == (string) $this->priceUtils->getPrice($orderProductAdd)
&& $this->compareOrderProductReductionCatalog($orderProduct->getOrderProductReductionCatalog(), $orderProductAdd->getOrderProductReductionCatalog())) { && $this->compareOrderProductReductionCatalog($orderProduct->getOrderProductReductionCatalog(), $orderProductAdd->getOrderProductReductionCatalog())) {


$orderProduct->setQuantityOrder($orderProduct->getQuantityOrder() + $orderProductAdd->getQuantityOrder()); $orderProduct->setQuantityOrder($orderProduct->getQuantityOrder() + $orderProductAdd->getQuantityOrder());

Loading…
Cancel
Save