220 lines
10 KiB
Plaintext
220 lines
10 KiB
Plaintext
@if (isLoading || ListRecords == null)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else
|
|
{
|
|
@if (TotalCount == 0)
|
|
{
|
|
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-sm table-striped ">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<button class="btn btn-sm btn-info" @onclick="ResetSel" title="Reset selezione"><i class="fas fa-sync-alt"></i></button>
|
|
</th>
|
|
<th class="text-nowrap">
|
|
Ord #
|
|
<Sorter ParamName="DateIns" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter>
|
|
</th>
|
|
<th>
|
|
Cliente
|
|
<Sorter ParamName="Customer" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter>
|
|
</th>
|
|
<th title="Stato">Stato</th>
|
|
@if (ShowAll)
|
|
{
|
|
<th>
|
|
Cod
|
|
<Sorter ParamName="CodDoc" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter>
|
|
</th>
|
|
<th class="text-nowrap">
|
|
Descript
|
|
<Sorter ParamName="Descript" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter>
|
|
</th>
|
|
<th class="text-right text-nowrap">
|
|
<Sorter ParamName="Amount" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter>
|
|
Valore
|
|
</th>
|
|
<th class="text-right text-nowrap">
|
|
<Sorter ParamName="Bill" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter>
|
|
Fatturato
|
|
</th>
|
|
<th class="text-right"></th>
|
|
}
|
|
else
|
|
{
|
|
<th class="text-nowrap">
|
|
Cod/Desc
|
|
<Sorter ParamName="CodDoc" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter>
|
|
</th>
|
|
<th class="text-right text-nowrap">
|
|
Importi
|
|
</th>
|
|
}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
@foreach (var record in ListRecords)
|
|
{
|
|
<tr class="@checkSelect(record.OrdId)">
|
|
<td class="text-nowrap">
|
|
<button class="btn btn-sm btn-info" @onclick="() => Select(record)"><i class="fas fa-search"></i></button>
|
|
<div class="text-center my-1">
|
|
@if (!record.HasBill || record.MovOpen)
|
|
{
|
|
<i class="fas fa-file-invoice-dollar text-secondary" title="Manca registrazione Fattura"></i>
|
|
}
|
|
else
|
|
{
|
|
<i class="fas fa-file-invoice-dollar text-success" title="Registrazione Fattura OK"></i>
|
|
}
|
|
</div>
|
|
</td>
|
|
<td class="text-nowrap">
|
|
@($"{record.DateIns:yyyy-MM-dd}")
|
|
<div class="small">
|
|
<b>@record.Num</b>/@record.YearRef
|
|
</div>
|
|
</td>
|
|
<td class="text-nowrap">
|
|
<div class="small">
|
|
<button class="btn btn-outline-dark btn-sm py-1" @onclick="() => SelCustomer(record.CustomerId)">
|
|
<span title="@record.RagSoc">@trimTxt(record.RagSoc,25)</span>
|
|
</button>
|
|
</div>
|
|
<div class="small">
|
|
<button class="btn btn-outline-dark btn-sm py-1" @onclick="() => SelBasket(record.BasketId)">
|
|
<span title="@record.BaskDescript">@trimTxt(record.BaskDescript,25)</span>
|
|
</button>
|
|
</div>
|
|
</td>
|
|
<td class="text-right text-nowrap">
|
|
@record.OrdStatus
|
|
</td>
|
|
@if (ShowAll)
|
|
{
|
|
<td>
|
|
<div>
|
|
@record.CodDoc
|
|
</div>
|
|
<div class="small">
|
|
@record.NegotDescript
|
|
</div>
|
|
</td>
|
|
<td>
|
|
@record.Descript
|
|
<div class="small">
|
|
@record.Note
|
|
</div>
|
|
</td>
|
|
<td class="text-right text-nowrap" title="Importo">
|
|
@if (record.OrdStatus == BbmOrdStatus.Stornato)
|
|
{
|
|
<del>@record.AmountTot.ToString("C2")</del>
|
|
<b>@record.AmountReq.ToString("C2")</b>
|
|
}
|
|
else
|
|
{
|
|
<b>@record.AmountTot.ToString("C2")</b>
|
|
}
|
|
</td>
|
|
<td class="text-right text-nowrap" title="Fatturato">
|
|
@{
|
|
string fattTitle = "Fatturato 100%";
|
|
string fatCss = "text-success";
|
|
if (record.AmountReq != record.BillTot)
|
|
{
|
|
if (record.PaidTot == 0)
|
|
{
|
|
fattTitle = "Fatturazione non iniziata";
|
|
fatCss = "text-warning";
|
|
}
|
|
else
|
|
{
|
|
fattTitle = "Fatturazione iniziata ma NON completa fino ad importo ordine";
|
|
fatCss = "text-danger";
|
|
}
|
|
}
|
|
<div title="@fattTitle" class="@fatCss">
|
|
F: <b>@record.BillTot.ToString("C2")</b>
|
|
</div>
|
|
|
|
string payCss=record.BillTot == record.PaidTot ? "text-success" : "text-warning";
|
|
<div class="@payCss" title="Incassato">
|
|
I: @record.PaidTot.ToString("C2")
|
|
</div>
|
|
}
|
|
</td>
|
|
<td class="text-right"><button class="btn btn-sm btn-danger" @onclick="() => Delete(record)"><span class="oi oi-trash"></span></button></td>
|
|
}
|
|
else
|
|
{
|
|
<td>
|
|
<div>
|
|
@record.CodDoc
|
|
</div>
|
|
@record.Descript
|
|
<div class="small">
|
|
@record.Note
|
|
</div>
|
|
</td>
|
|
<td class="text-right text-nowrap" title="Importo">
|
|
V: <b Title="Valore">@record.AmountTot.ToString("C2")</b><br />
|
|
F: <b Title="Fatturato">@record.BillTot.ToString("C2")</b><br />
|
|
I: <b Title="Incassato">@record.PaidTot.ToString("C2")</b>
|
|
</td>
|
|
}
|
|
</tr>
|
|
@if (currItem != null && record.OrdId == currItem.OrdId)
|
|
{
|
|
<tr class="table-info">
|
|
<td colspan="9">
|
|
<div class="row">
|
|
<div class="col-6 pr-0">
|
|
<OrdRes CurrOrd="currItem"></OrdRes>
|
|
</div>
|
|
<div class="col-6 pl-1">
|
|
<AccMov CurrOrd="currItem" EditEnabled="AccMovEditEnabled" SelEnabled="AccMovSelEnabled" NewMovReq="showCreateMov" UpdateReq="ReloadOrdMov" AccMovSel="ReportAccMov"></AccMov>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
}
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
}
|
|
@if (showModalCreate)
|
|
{
|
|
<dialog class="modal fade show" tabindex="-1" style="display:block; background-color: rgba(10,10,10,.6);" aria-modal="true" role="dialog">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header bg-primary text-light">
|
|
<h4>Creazione Movimenti</h4>
|
|
<button class="btn btn-warning" @onclick="() => closeModal()">Chiudi <i class="fas fa-times"></i></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
@if (currItem != null)
|
|
{
|
|
<AccMovWizard currOrder="@currItem" UpdateReq="ReloadOrdMov"></AccMovWizard>
|
|
}
|
|
else
|
|
{
|
|
<div class="row">
|
|
<div class="col-12">
|
|
Selezionare ordine
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</dialog>
|
|
|
|
} |