templates/ComponentInventory/itemLog.html.twig line 1

Open in your IDE?
  1. {% extends 'layout.html.twig' %}
  2. {% trans_default_domain 'ComponentInventoryItem' %}
  3. {% import 'Document/macro.html.twig' as document %}
  4. {% block title %}{{ 'ui.itemEventLog' | trans }} | {{ item.code }}{% endblock %}
  5. {% block breadcrumb_wide %}
  6.     <ol class="breadcrumb">
  7.         <li><a href="{{ path('app.component_inventory.index') }}">{{ 'ui.componentInventory' | trans }}</a></li>
  8.         <li class="active">{{ 'ui.itemEventLog' | trans }}</li>
  9.     </ol>
  10. {% endblock %}
  11. {% block body %}
  12.     <div class="container-fluid">
  13.         <div class="row">
  14.             <div class="col-xs-12">
  15.                 <div class="page-header">
  16.                     <h1>{{ 'ui.itemEventLog' | trans }} <small>{{ item.code }} <span class="badge">{{ ('property.type_' ~ constant('App\\Entity\\ComponentInventoryItem::TYPE_COMPONENT')) | trans }}</span></small></h1>
  17.                 </div>
  18.             </div>
  19.         </div>
  20.         <table class="table table-condensed">
  21.             <thead>
  22.             <tr>
  23.                 <th style="width: 150px;"></th>
  24.                 <th style="text-align: right; width: 75px;">Quantity<br/>Change</th>
  25.                 <th style="text-align: right; width: 120px;">Previous<br/>Quantity</th>
  26.                 <th style="text-align: right; width: 120px;">Previous<br/>Row Value</th>
  27.                 <th style="text-align: right; width: 120px;">Updated<br/>Quantity</th>
  28.                 <th style="text-align: right; width: 120px;">Batch<br/>Unit Price</th>
  29.                 <th style="text-align: right; width: 140px;">Updated<br/>Unit Price</th>
  30.                 <th style="text-align: right; width: 140px;">Updated<br/>Row Value</th>
  31.                 <th style="width: 240px;">Purchase Order Number<br/>Excel File Name</th>
  32.                 <th>Notes</th>
  33.             </tr>
  34.             </thead>
  35.             <tbody>
  36.             {% for entry in item.logEntries %}
  37.                 <tr>
  38.                     <td>{{ entry.created | date('Y-m-d H:i') }}</td>
  39.                     <td style="text-align: right;">{% if entry.quantityChange > 0 %}+{% endif %}{{ entry.quantityChange }}</td>
  40.                     <td style="text-align: right;">{{ entry.previousQuantity is null ? '-' : entry.previousQuantity }}</td>
  41.                     <td style="text-align: right;">{{ entry.previousTotalValue is null ? '-' : document.currency(entry.previousTotalValue, '€', 5) }}</td>
  42.                     <td style="text-align: right;">{{ entry.updatedQuantity }}</td>
  43.                     <td style="text-align: right;">{{ entry.batchUnitPrice is null ? '-' : document.currency(entry.batchUnitPrice, '€', 5) }}</td>
  44.                     <td style="text-align: right;">{{ document.currency(entry.updatedUnitPrice, '€', 5) }}</td>
  45.                     <td style="text-align: right;">{{ document.currency(entry.updatedTotalValue, '€', 5) }}</td>
  46.                     <td>
  47.                         {% if entry.purchaseOrderNumber is not null %}
  48.                             <div>{{ entry.purchaseOrderNumber }}</div>
  49.                         {% endif %}
  50.                         {% if entry.excelFileName is not null %}
  51.                             <div>{{ entry.excelFileName }}</div>
  52.                         {% endif %}
  53.                     </td>
  54.                     <td>{{ entry.note }}</td>
  55.                 </tr>
  56.             {% endfor %}
  57.             </tbody>
  58.         </table>
  59.     </div>
  60. {% endblock %}