66 lines
2.9 KiB
Plaintext
66 lines
2.9 KiB
Plaintext
|
|
<table class="table table-sm table-striped">
|
|
<thead>
|
|
<tr class="table-dark">
|
|
<td>#</td>
|
|
<td class="text-center"><i class="fa-solid fa-repeat"></i></td>
|
|
<td>Class</td>
|
|
<td>Descrizione</td>
|
|
@* <td>Cod</td> *@
|
|
<td class="text-end">Qty</td>
|
|
<td class="text-end">UnitPrice</td>
|
|
<td class="text-end">Importo</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in bomDict)
|
|
{
|
|
@if (item.Key == currIdx && EditRecord != null)
|
|
{
|
|
<tr class="table-info">
|
|
<td>@(item.Key + 1)</td>
|
|
<td colspan="3">
|
|
<div class="input-group">
|
|
<button class="btn btn-sm btn-warning" title="Effettua Cambio" @onclick="() => DoCancel()"><i class="fa-solid fa-ban"></i></button>
|
|
<select @bind="@EditRecord.ItemID" class="form-select">
|
|
@foreach (var itemAlt in ListItemAlt)
|
|
{
|
|
<option value="@itemAlt.ItemID">@itemAlt.Description | @($"{itemAlt.Cost:C2}")</option>
|
|
}
|
|
</select>
|
|
<button class="btn btn-sm btn-success" title="Effettua Cambio" @onclick="() => DoSave()"><i class="fa-solid fa-check"></i></button>
|
|
</div>
|
|
</td>
|
|
<td class="text-end">@($"{item.Value.Qty:N3}")</td>
|
|
<td class="text-end">@($"{item.Value.PriceEff:C2}")</td>
|
|
<td class="text-end">@($"{item.Value.TotalCost:C2}")</td>
|
|
</tr>
|
|
}
|
|
else
|
|
{
|
|
<tr>
|
|
<td>@(item.Key + 1)</td>
|
|
<td class="text-center">
|
|
@if (item.Value.Price == 0)
|
|
{
|
|
<button class="btn btn-sm btn-primary" title="Effettua Cambio" @onclick="() => DoEdit(item.Key, item.Value)"><i class="fa-solid fa-arrow-right-arrow-left"></i></button>
|
|
}
|
|
</td>
|
|
<td>@item.Value.ClassCode</td>
|
|
<td>@item.Value.ItemCode</td>
|
|
@* <td>@item.Value.DescriptionCode</td> *@
|
|
<td class="text-end">@($"{item.Value.Qty:N3}")</td>
|
|
<td class="text-end">@($"{item.Value.PriceEff:C2}")</td>
|
|
<td class="text-end">@($"{item.Value.TotalCost:C2}")</td>
|
|
</tr>
|
|
}
|
|
}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr class="table-primary">
|
|
<td colspan="5" class="text-end">@BomList.Count record</td>
|
|
<td class="text-end">tot:</td>
|
|
<td class="text-end fw-bold">@($"{ImportoTotale:C2}")</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table> |