|
- <?php
-
- use common\helpers\Price;
- use common\logic\Product\Product\Model\Product;
- use yii\helpers\Html;
-
- $documentModule = $this->getDocumentModule();
- $productModule = $this->getProductModule();
-
- ?>
-
- <tr class="<?php if(isset($displayOrders) && $displayOrders): ?>order<?php endif; ?>">
- <td class="align-left">
- <?php if($productOrder->product): ?>
- <?= Html::encode($productOrder->product->name) ?>
- <?php endif; ?>
- <?php if($productOrder->unit == 'piece' && isset($productOrder->product->weight) && $productOrder->product->weight): ?>
- <span class="weight"> / <?= $productOrder->product->weight ?> g</span>
- <?php endif; ?>
- <?php if($productOrder->product && strlen($productOrder->product->description) && $displayProductDescription): ?>
- <br /><small><?= Html::encode($productOrder->product->description) ?></small>
- <?php endif; ?>
- </td>
-
- <?php
- $price = $productOrder->getPrice() ;
- if($documentModule->isInvoicePrice($document) && $productOrder->getInvoicePrice()) {
- $price = $productOrder->getInvoicePrice() ;
- }
- ?>
-
- <?php if($displayPrices): ?>
- <td class="align-center">
- <?= Price::format($price, $documentPriceDecimals) ?>
- </td>
- <?php endif; ?>
- <td class="align-center">
- <?= $productOrder->quantity * Product::$unitsArray[$productOrder->unit]['coefficient'] ?>
- </td>
- <td class="align-center"><?= $productModule->strUnit($productOrder->unit, 'wording') ?></td>
- <?php if($displayPrices): ?>
- <?php if($producer->taxRate->value != 0): ?>
- <td class="align-center"><?= $productOrder->taxRate->value * 100 ?> %</td>
- <?php endif; ?>
- <td class="align-center">
- <?php if($documentModule->getClass($document) == ''): ?>
- <?= Price::format($price * $productOrder->quantity) ?>
- <?php else: ?>
- <?= Price::format($price * $productOrder->quantity) ?>
- <?php endif; ?>
- </td>
- <?php endif; ?>
- </tr>
|