Files
laatzen/LaaProductionWeb/LaaProduction.Web/Views/Shipments/Batch.cshtml
T

94 lines
4.9 KiB
Plaintext

@using LaaProduction.Services.Models
@model PalletsBatchModel
@if (!string.IsNullOrWhiteSpace(this.Model.Customer))
{
<div class="d-flex justify-content-center">
<div id="batch" class="print-page border rounded shadow-sm mt-5 p-5">
<div class="table-responsive">
<table class="table table-borderless">
<tr>
<th colspan="2" class="fs-5">Paletten Begleitschein</th>
<th colspan="2" class="fs-5">@this.Model.Customer</th>
</tr>
<tr>
<th class="white-space-nowrap">Kunden-Auftrag</th>
<td class="">@this.Model.OrderNr</td>
<th class="white-space-nowrap">Fertigungsauftrags-Nr.</th>
<td class="">@this.Model.ProductionOrderNr</td>
</tr>
<tr class="border-top">
<td class="p-0 small" colspan="4">
<table class="table table-borderless">
<tr>
<th class="text-end">Pos</th>
<th >Bezeichnung</th>
<th class="text-end">Menge</th>
<th class="text-end">Bestellmenge</th>
</tr>
@foreach (var pos in this.Model.Positions)
{
<tr>
<td class="text-end">@pos.PositionNr</td>
<td >@pos.Description</td>
<td class="text-end">@pos.ItemsCount</td>
<td class="text-end">@pos.TotalItemsCount</td>
</tr>
}
<tr class="border-top">
<td colspan="3" class="text-end fw-bold">Palettenmenge: @this.Model.Positions.Sum(x => x.ItemsCount)</td>
<td colspan="1"></td>
</tr>
</table>
</td>
</tr>
</table>
<table class="table table-borderless table-striped">
<thead>
<tr>
<th>Nr.</th>
<th class="w-100">(Pos) Serial Nr.</th>
<th class="w-100">Barcode</th>
<th class="white-space-nowrap">Paletten Nr.</th>
<th class="w-100"></th>
</tr>
</thead>
<tbody>
@{
var count = 1;
foreach (var item in this.Model.Positions.SelectMany(x => x.Items))
{
<tr class="is_scaned_@(item.IsScanned ? 1 : 0)">
<td class="va-middle @(item.IsScanned ? null : "text-secondary")">@(count++).</td>
<td class="va-middle w-100 @(item.IsScanned ? null : "text-secondary")">(@item.PositionNr) @item.BarcodeNr</td>
<td class="va-middle w-100 text-center">
<svg class="barcode"
jsbarcode-format="auto"
jsbarcode-value="@item.BarcodeNr"
jsbarcode-displayValue="false"
jsbarcode-background="transparent"
jsbarcode-lineColor="@(item.IsScanned ? "black" : "#ced4da")"
jsbarcode-height="50"
jsbarcode-margin="0"
jsbarcode-textMargin="0"
jsbarcode-fontoptions="bold">
</svg>
</td>
<td class="va-middle text-end">@(item.IsScanned ? item.PalletNr : null)</td>
<td class="va-middle text-center">
<a class="btn btn-sm btn-danger" href="~/Shipments/Delete/@item.Id">
<i class="bi bi-x"></i>
</a>
</td>
</tr>
}
}
</tbody>
</table>
</div>
</div>
</div>
}