You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_download_product_line.php 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. use common\helpers\Price;
  3. use common\logic\Product\Product\Model\Product;
  4. use yii\helpers\Html;
  5. $documentManager = $this->getDocumentManager();
  6. $productManager = $this->getProductManager();
  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($documentManager->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"><?= $productManager->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($documentManager->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>