Преглед на файлове

Merge branch 'dev'

prodstable
Guillaume преди 4 години
родител
ревизия
c68cd1073d
променени са 1 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. +5
    -3
      common/models/Document.php

+ 5
- 3
common/models/Document.php Целия файл

@@ -336,11 +336,13 @@ class Document extends ActiveRecordCommon
public function getProductsOrders()
{
$productsOrdersArray = [];
if ($this->orders && count($this->orders)) {
foreach ($this->orders as $order) {
$ordersArray = $this->orders ;
if ($ordersArray && count($ordersArray)) {
foreach ($ordersArray as $order) {
foreach ($order->productOrder as $productOrder) {
if (!isset($productsOrdersArray[$productOrder->id_product])) {
$productsOrdersArray[$productOrder->id_product] = [$productOrder];
$newProductOrder = clone $productOrder ;
$productsOrdersArray[$productOrder->id_product] = [$newProductOrder];
} else {
$productOrderMatch = false;
foreach ($productsOrdersArray[$productOrder->id_product] as &$theProductOrder) {

Loading…
Отказ
Запис