瀏覽代碼

[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…
取消
儲存