Browse Source

[Backend] Documents : problème montant facture #559

refactoring
Guillaume Bourgeois 2 years ago
parent
commit
cbab674a86
2 changed files with 3 additions and 4 deletions
  1. +1
    -1
      backend/views/document/_download_product_line.php
  2. +2
    -3
      common/models/Document.php

+ 1
- 1
backend/views/document/_download_product_line.php View File

@@ -20,7 +20,7 @@

<?php if($displayPrices): ?>
<td class="align-center">
<?= Price::format($price) ?>
<?= Price::format($price) ?>
</td>
<?php endif; ?>
<td class="align-center">

+ 2
- 3
common/models/Document.php View File

@@ -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;

Loading…
Cancel
Save