Browse Source

[Administration] Documents PDF : correctif unité colonne quantités

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
41fb6b64ae
1 changed files with 5 additions and 7 deletions
  1. +5
    -7
      backend/views/document/_download_product_line.php

+ 5
- 7
backend/views/document/_download_product_line.php View File

@@ -1,6 +1,7 @@
<?php

use common\helpers\Price;
use common\logic\Config\Unit\Module\UnitModule;
use common\logic\Order\ProductOrder\Module\ProductOrderModule;
use common\logic\Producer\Producer\Module\ProducerModule;
use common\logic\Product\Product\Model\Product;
@@ -10,6 +11,7 @@ $documentModule = $this->getDocumentModule();
$productModule = $this->getProductModule();
$productOrderModule = ProductOrderModule::getInstance();
$producerModule = ProducerModule::getInstance();
$unitModule = UnitModule::getInstance();

?>

@@ -50,18 +52,14 @@ $producerModule = ProducerModule::getInstance();
<?php endif; ?>
<td class="align-center column-quantity">
<?= $productOrder->quantity * Product::$unitsArray[$productOrder->unit]['coefficient'] ?>
<?= $productModule->getSolver()->strUnit($productOrder->product, 'wording') ?>
<?= $unitModule->getSolver()->strUnit($productOrder->unit, 'wording') ?>
</td>
<?php if($displayPrices): ?>
<?php if($producer->taxRate->value != 0): ?>
<td class="align-center column-tax-rate"><?= $productOrder->taxRate->value * 100 ?> %</td>
<td class="align-center column-tax-rate"><?= $productOrder->taxRate->value * 100 ?> %</td>
<?php endif; ?>
<td class="align-center column-price">
<?php if($documentModule->getClass($document) == ''): ?>
<?= Price::format($price * $productOrder->quantity) ?>
<?php else: ?>
<?= Price::format($price * $productOrder->quantity) ?>
<?php endif; ?>
<?= Price::format($price * $productOrder->quantity) ?>
</td>
<?php endif; ?>
</tr>

Loading…
Cancel
Save