Files
lux/Lux.UI/Components/Compo/Item/SellingItemEdit.razor
T
2026-03-09 18:39:41 +01:00

101 lines
5.0 KiB
Plaintext

<div class="rounded rounded-3 bg-secondary bg-opacity-25 bg-gradient p-2 m-0 shadow">
@if (CurrRecord != null)
{
<div><span class="fs-5"># <b>@(CurrRecord?.SellingItemID)</b></span> | Codice @CurrRecord.ItemCode</div>
<div class="row g-1">
<div class="col-md-2">
<div class="form-floating">
<select @bind="@CurrRecord.Envir" class="form-select">
<option value="NULL">--- Sel. Envir ---</option>
@foreach (var item in Enum.GetValues(typeof(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS))
.Cast<EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS>()
.Where(e => Convert.ToInt32(e) != 0))
{
<option value="@item">@item</option>
}
</select>
<label class="small bg-opacity-50">Envir</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<select @bind="@CurrRecord.SourceType" class="form-select" disabled="@CurrRecord.IsProtected">
@foreach (var sType in Enum.GetValues(typeof(EgwCoreLib.Lux.Core.Enums.ItemSourceType)))
{
<option value="@sType">@sType</option>
}
</select>
<label class="small bg-opacity-50">Source</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<div class="form-control ">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" checked="@CurrRecord.IsService">
</div>
</div>
<label class="small bg-opacity-50">Serv</label>
</div>
</div>
<div class="col-md-2">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.ExtItemCode" disabled="@CurrRecord.IsProtected">
<label class="small bg-opacity-50">ItemCode</label>
</div>
</div>
<div class="col-md-2">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.SupplCode" disabled="@CurrRecord.IsProtected">
<label class="small bg-opacity-50">Suppl.Code</label>
</div>
</div>
<div class="col-md-2">
<div class="form-floating">
<InputDouble CssClass="form-control form-control-lg text-end" Decimals="2" Step="0.05" @bind-Value="@CurrRecord.Cost"></InputDouble>
<label class="small bg-opacity-50">Costo</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<InputPercent CssClass="form-control form-control-lg text-end" ForceInvariantParsing="true" Decimals="1" @bind-Value="@MarginDec"></InputPercent>
<label class="small bg-opacity-50">Margine</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<input type="text" class="form-control text-end" @bind="@CurrRecord.UM">
<label class="small bg-opacity-50">UM</label>
</div>
</div>
<div class="col-md-6">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.Description" disabled="@CurrRecord.IsProtected">
<label class="small bg-opacity-50">Descrizione</label>
</div>
</div>
<div class="col-md-3">
<div class="form-floating">
<select @bind="@CurrRecord.JobID" class="form-select" disabled="@CurrRecord.IsProtected">
@foreach (var jType in ListJobTask)
{
<option value="@jType.JobID">@jType.Description</option>
}
</select>
<label class="small bg-opacity-50">Job Task</label>
</div>
</div>
<div class="col-md-3">
<div class="row g-1 py-1">
<div class="col-md-6">
<button class="btn btn-lg btn-success w-100" @onclick="DoSave">Save</button>
</div>
<div class="col-md-6">
<button class="btn btn-lg btn-warning w-100" @onclick="DoCancel">Cancel</button>
</div>
</div>
</div>
</div>
}
</div>