194 lines
10 KiB
Plaintext
194 lines
10 KiB
Plaintext
<div class="card my-2 ">
|
|
<div class="card-header">
|
|
<b>Movimenti</b>
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
Data
|
|
</th>
|
|
<th>
|
|
Posizione
|
|
</th>
|
|
<th>
|
|
Riferimento
|
|
</th>
|
|
<th>
|
|
Qta
|
|
</th>
|
|
<th>
|
|
importo
|
|
</th>
|
|
<th>
|
|
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if (searchtemFlux != null)
|
|
{
|
|
foreach (var flux in searchtemFlux)
|
|
{
|
|
<tr>
|
|
<td class="@dateCss(flux.DtExport)">
|
|
@flux.DtMov.Date.ToString("yyyy/MM/dd")
|
|
</td>
|
|
<td>
|
|
@flux.Location.Descr
|
|
</td>
|
|
<td>
|
|
@flux.ExtLocation.Descr
|
|
</td>
|
|
@if (flux.Qta > 0)
|
|
{
|
|
<td class=" text-dark text-end" style="background-color: rgba(39, 174, 96, 0.7)">
|
|
@flux.Qta
|
|
</td>
|
|
}
|
|
else
|
|
{
|
|
<td class=" text-dark text-end" style="background-color: rgba(192, 57, 43, 0.7)">
|
|
@flux.Qta
|
|
</td>
|
|
}
|
|
<td class="text-end">
|
|
@($"{flux.TotValue:C2}")
|
|
</td>
|
|
<td>
|
|
<div class="d-flex justify-content-between">
|
|
<div class="d-flex justify-content-between">
|
|
<button class="btnAccept" @onclick="()=>setItem(flux)" data-bs-toggle="modal" data-bs-target="#modalShowFlux"><i class="fa-solid fa-magnifying-glass"></i></button>
|
|
<button class="btnDup" @onclick="()=>dupItem(flux)" data-bs-toggle="modal" data-bs-target="#modalShowFlux"><i class="fa-solid fa-copy"></i></button>
|
|
</div>
|
|
@if (flux.DtExport == null)
|
|
{
|
|
<div class="d-flex justify-content-between">
|
|
<button class="btnMod" @onclick="()=>editMode(flux)" data-bs-toggle="modal" data-bs-target="#modalShowFlux"><i class="fa-solid fa-pen-to-square"></i></button>
|
|
<button class="btnDecline" @onclick="()=>delete(flux)"><i class="fa-solid fa-trash-can"></i></button>
|
|
</div>
|
|
}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
}
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
</div>
|
|
<div class="card-footer">
|
|
<DataPager @ref="pagerItemDetails" PageSize="@numRecord" currPage="@currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="@totalCount" />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@if (fluxToShow != null)
|
|
{
|
|
<div class="modal fade" id="modalShowFlux" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header bg-primary text-light">
|
|
<h1 class="modal-title fs-5" id="modalNewFamLabel">Movimento #@fluxToShow.Id </h1>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="w-100">
|
|
<div class="my-2">
|
|
@if (fluxToShow.MovTypeId == "CAR")
|
|
{
|
|
<div class="form-floating col">
|
|
<input id="tipoMov" value="Carico da fornitore" class="form-control w-100 my-1" disabled />
|
|
<label for="tipoMov" class="form-label">Tipo di movimento</label>
|
|
</div>
|
|
<div class="form-floating col">
|
|
|
|
<select id="forn" @bind="@fluxToShow.ExtLocationId" class="form-select" style="@enable">
|
|
<option value="">---Selezionare Fornitore---</option>
|
|
@if (listLocation != null)
|
|
{
|
|
@foreach (var item in listLocation.Where(x => x.LocTypeId == "FOR").ToList())
|
|
{
|
|
<option value="@item.Id">@item.Descr</option>
|
|
}
|
|
}
|
|
</select>
|
|
<label for="forn" class="form-label">Fornitore </label>
|
|
</div>
|
|
}
|
|
else if (fluxToShow.MovTypeId == "SCAR" || fluxToShow.MovTypeId == "RETT")
|
|
{
|
|
<div class="form-floating col">
|
|
<input id="tipoMov" value="Scarico da magazzino" class="form-control w-100 my-1" disabled />
|
|
<label for="tipoMov" class="form-label">Tipo di movimento</label>
|
|
</div>
|
|
<div class="form-floating col">
|
|
<select id="cliente" @bind="@fluxToShow.ExtLocationId" class="form-select" style="@enable">
|
|
<option value="">---Selezionare Cliente---</option>
|
|
@if (listLocation != null)
|
|
{
|
|
@foreach (var item in listLocation.Where(x => x.LocTypeId == "CLI").ToList())
|
|
{
|
|
<option value="@item.Id">@item.Descr</option>
|
|
}
|
|
}
|
|
</select>
|
|
<label for="cliente" class="form-label">Cliente </label>
|
|
</div>
|
|
}
|
|
<div class="row">
|
|
<div class="form-floating col">
|
|
<input id="doc" @bind="@fluxToShow.CodDoc" class="form-control w-100 my-1" style="@enable" />
|
|
<label for="doc" class="form-label">Documento</label>
|
|
</div>
|
|
<div class="form-floating col">
|
|
<input id="data" type="date" @bind="@fluxToShow.DtMov" class="form-control w-100 my-1" style="@enable" />
|
|
<label for="data" class="form-label">Data documento </label>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="form-floating col">
|
|
<input id="qta" type="number" @bind="@fluxToShow.Qta" class="form-control w-100 my-1" style="@enable" />
|
|
<label for="qta" class="form-label">Quantità</label>
|
|
</div>
|
|
<div class="form-floating col">
|
|
<input id="importo" type="number" @bind="@fluxToShow.TotValue" class="form-control w-100 my-1" style="@enable" />
|
|
<label for="importo" class="form-label">Importo</label>
|
|
</div>
|
|
</div>
|
|
<div class="form-floating col">
|
|
<select id="pos" @bind="@fluxToShow.LocationId" class="form-select" style="@enable">
|
|
@if (listLocation != null)
|
|
{
|
|
@foreach (var item in listLocation.Where(x => x.LocTypeId == "MAG").ToList())
|
|
{
|
|
<option value="@item.Id">@item.Descr</option>
|
|
}
|
|
}
|
|
</select>
|
|
<label for="pos" class="form-label">Posizione</label>
|
|
</div>
|
|
<div class="form-floating col mt-2">
|
|
<textarea id="note" @bind="@fluxToShow.Note" class="form-control w-100" rows="3" style="@enable"></textarea>
|
|
<label for="note" class="form-label">Note</label>
|
|
</div>
|
|
</div>
|
|
<div class="text-end">
|
|
@if (isDup)
|
|
{
|
|
<button class="btnAccept" @onclick="()=>duplicate()"><i class="fa-regular fa-circle-check"></i></button>
|
|
}
|
|
else if (isMod)
|
|
{
|
|
<button class="btnAccept" @onclick="()=>edit()"><i class="fa-regular fa-circle-check"></i></button>
|
|
}
|
|
<button class="btnDecline" data-bs-dismiss="modal"><i class="fa-solid fa-ban"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
} |