Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

54 lines
2.3KB

  1. <?php
  2. use common\helpers\Price;
  3. use common\logic\Product\Product\Model\Product;
  4. use yii\helpers\Html;
  5. $documentModule = $this->getDocumentModule();
  6. $productModule = $this->getProductModule();
  7. ?>
  8. <tr class="<?php if(isset($displayOrders) && $displayOrders): ?>order<?php endif; ?>">
  9. <td class="align-left">
  10. <?php if($productOrder->product): ?>
  11. <?= Html::encode($productOrder->product->name) ?>
  12. <?php endif; ?>
  13. <?php if($productOrder->unit == 'piece' && isset($productOrder->product->weight) && $productOrder->product->weight): ?>
  14. <span class="weight"> / <?= $productOrder->product->weight ?> g</span>
  15. <?php endif; ?>
  16. <?php if($productOrder->product && strlen($productOrder->product->description) && $displayProductDescription): ?>
  17. <br /><small><?= Html::encode($productOrder->product->description) ?></small>
  18. <?php endif; ?>
  19. </td>
  20. <?php
  21. $price = $productOrder->getPrice() ;
  22. if($documentModule->isInvoicePrice($document) && $productOrder->getInvoicePrice()) {
  23. $price = $productOrder->getInvoicePrice() ;
  24. }
  25. ?>
  26. <?php if($displayPrices): ?>
  27. <td class="align-center">
  28. <?= Price::format($price, $documentPriceDecimals) ?>
  29. </td>
  30. <?php endif; ?>
  31. <td class="align-center">
  32. <?= $productOrder->quantity * Product::$unitsArray[$productOrder->unit]['coefficient'] ?>
  33. </td>
  34. <td class="align-center"><?= $productModule->strUnit($productOrder->unit, 'wording') ?></td>
  35. <?php if($displayPrices): ?>
  36. <?php if($producer->taxRate->value != 0): ?>
  37. <td class="align-center"><?= $productOrder->taxRate->value * 100 ?> %</td>
  38. <?php endif; ?>
  39. <td class="align-center">
  40. <?php if($documentModule->getClass($document) == ''): ?>
  41. <?= Price::format($price * $productOrder->quantity) ?>
  42. <?php else: ?>
  43. <?= Price::format($price * $productOrder->quantity) ?>
  44. <?php endif; ?>
  45. </td>
  46. <?php endif; ?>
  47. </tr>