|
|
@@ -434,9 +434,8 @@ class Document extends ActiveRecordCommon |
|
|
|
$productOrderMatch = false; |
|
|
|
foreach ($productsOrdersArray[$indexProductOrder] as &$theProductOrder) { |
|
|
|
if ($theProductOrder->unit == $productOrder->unit |
|
|
|
&& ((!$this->isInvoicePrice() && $theProductOrder->price == $productOrder->price) |
|
|
|
|| ($this->isInvoicePrice() && $theProductOrder->invoice_price == $productOrder->invoice_price) |
|
|
|
)) { |
|
|
|
&& $theProductOrder->price == $productOrder->price |
|
|
|
&& $theProductOrder->invoice_price == $productOrder->invoice_price) { |
|
|
|
|
|
|
|
$theProductOrder->quantity += $productOrder->quantity; |
|
|
|
$productOrderMatch = true; |