2023-01-09 23:48:36 +01:00
|
|
|
<div class="table-responsive">
|
2022-07-30 00:54:44 +02:00
|
|
|
<table class="table table-striped table-header table-hover">
|
2019-08-02 12:17:56 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>{% trans %}part.supplier.name{% endtrans %}</th>
|
|
|
|
<th>{% trans %}part.supplier.partnr{% endtrans %}</th>
|
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for order in part.orderdetails %}
|
|
|
|
<tr class="{% if order.obsolete %}table-danger{% endif %}">
|
2019-09-08 17:30:58 +02:00
|
|
|
<td>
|
2022-09-18 16:45:12 +02:00
|
|
|
<a href="{{ entity_url(order.supplier, 'list_parts') }}">{{ order.supplier.name }}</a>
|
2019-09-08 17:30:58 +02:00
|
|
|
</td>
|
2019-08-02 12:17:56 +02:00
|
|
|
<td>{% if order.supplierProductUrl is not empty %}
|
2019-11-01 23:49:46 +01:00
|
|
|
<a href="{{ order.supplierProductUrl }}" rel="noopener" target="_blank" class="link-external">{{ order.supplierPartNr }}</a>
|
2019-08-02 12:17:56 +02:00
|
|
|
{% else %}
|
|
|
|
{{ order.supplierPartNr }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% if order.pricedetails is not empty %}
|
|
|
|
<table class="table table-bordered table-sm table-striped table-hover">
|
|
|
|
<thead class="thead-dark">
|
|
|
|
<tr>
|
|
|
|
<th>{% trans %}part.order.minamount{% endtrans %}</th>
|
|
|
|
<th>{% trans %}part.order.price{% endtrans %}</th>
|
2019-09-01 14:14:30 +02:00
|
|
|
<th>
|
|
|
|
{% trans %}part.order.single_price{% endtrans %}
|
|
|
|
{% if part.partUnit %}
|
|
|
|
/ 1 {{ part.partUnit.unit }}
|
|
|
|
{% endif %}
|
|
|
|
</th>
|
2019-08-02 12:17:56 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for detail in order.pricedetails %}
|
|
|
|
<tr>
|
2020-05-20 22:02:07 +02:00
|
|
|
|
2019-08-02 12:17:56 +02:00
|
|
|
<td>
|
2022-09-18 17:50:25 +02:00
|
|
|
{{ detail.MinDiscountQuantity | format_amount(part.partUnit) }}
|
2019-08-02 12:17:56 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2022-09-18 17:50:25 +02:00
|
|
|
{{ detail.price | format_money(detail.currency) }} / {{ detail.PriceRelatedQuantity | format_amount(part.partUnit) }}
|
2020-05-20 22:02:07 +02:00
|
|
|
{% set tmp = pricedetail_helper.convertMoneyToCurrency(detail.price, detail.currency) %}
|
|
|
|
{% if detail.currency != (app.user.currency ?? null) and tmp is not null and tmp.GreaterThan(0) %}
|
2022-09-18 17:50:25 +02:00
|
|
|
<span class="text-muted">({{ pricedetail_helper.convertMoneyToCurrency(detail.price, detail.currency, app.user.currency ?? null) | format_money(app.user.currency ?? null) }})</span>
|
2019-09-01 14:37:53 +02:00
|
|
|
{% endif %}
|
2019-08-02 12:17:56 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2022-09-18 17:50:25 +02:00
|
|
|
{{ detail.PricePerUnit | format_money(detail.currency) }}
|
2020-05-20 22:02:07 +02:00
|
|
|
{% set tmp = pricedetail_helper.convertMoneyToCurrency(detail.PricePerUnit, detail.currency) %}
|
|
|
|
{% if detail.currency != (app.user.currency ?? null) and tmp is not null and tmp.GreaterThan(0) %}
|
2022-09-18 17:50:25 +02:00
|
|
|
<span class="text-muted">({{ pricedetail_helper.convertMoneyToCurrency(detail.PricePerUnit, detail.currency, app.user.currency ?? null) | format_money(app.user.currency ?? null) }})</span>
|
2019-09-01 14:37:53 +02:00
|
|
|
{% endif %}
|
2019-08-02 12:17:56 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td> {# Action for order information #}
|
|
|
|
<div class="btn-group">
|
2022-07-30 00:54:44 +02:00
|
|
|
<button type="button" class="btn btn-info btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
2019-08-02 12:17:56 +02:00
|
|
|
Action
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu">
|
|
|
|
<span class="text-muted dropdown-item-text" ><i class="fas fa-lightbulb fa-fw"></i> <b>ID:</b> {{ order.iD }}</span>
|
2019-11-23 14:48:21 +01:00
|
|
|
<span class="text-muted dropdown-item-text" ><i class="fas fa-history fa-fw"></i> <b>{% trans %}createdAt{% endtrans %}:</b> {{ order.addedDate | format_datetime("short")}}</span>
|
2019-08-02 12:17:56 +02:00
|
|
|
<div class="dropdown-divider"></div>
|
|
|
|
<a class="dropdown-item" href="#"><i class="fas fa-edit fa-fw"></i> {% trans %}edit.caption_short{% endtrans %}</a>
|
|
|
|
<a class="dropdown-item" href="#"><i class="fas fa-trash fa-fw"></i> {% trans %}delete.caption{% endtrans %}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|