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

[backend] Correctif bug factures

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

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

@@ -348,7 +348,10 @@ class Document extends ActiveRecordCommon
} else {
$productOrderMatch = false;
foreach ($productsOrdersArray[$productOrder->id_product] as &$theProductOrder) {
if ($theProductOrder->unit == $productOrder->unit && $theProductOrder->price == $productOrder->price) {
if ($theProductOrder->unit == $productOrder->unit
&& ($theProductOrder->price == $productOrder->price
|| ($this->isInvoicePrice()
&& $theProductOrder->invoice_price == $productOrder->invoice_price))) {
$theProductOrder->quantity += $productOrder->quantity;
$productOrderMatch = true;
}

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