campi destinazione (colli, uova ecc) e sequenza

This commit is contained in:
Marco Audiffredi 2024-07-10 18:22:58 +02:00
parent 023e91feb2
commit e513bf5f6b
4 changed files with 115 additions and 164 deletions

View File

@ -28,7 +28,7 @@ namespace SoftwayWeb.Controllers
// return View();
return RedirectToAction("index", "giri");
}
public ActionResult Chiudi(string id)
public ActionResult Chiudi(string id, int nbanc,decimal imp)
{
SessionHelper helper = new SessionHelper(this);
GiriConsegnaView model = new GiriConsegnaView();
@ -49,6 +49,8 @@ namespace SoftwayWeb.Controllers
string data = response.Content.ReadAsStringAsync().Result;
lst = JsonConvert.DeserializeObject<List<GiriConsegnaView>>(data);
model = lst.Where(x => x.SerialeGiro.Equals(id)).First();
model.BancaliRecuperati = nbanc;
model.ImportoRecuperato = imp;
}
else
{

View File

@ -42,6 +42,19 @@ namespace SoftwayWeb.Models
[Display(Name = "Seriale Giro")]
public string? serialeGiro { get; set; }
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(18, 4)")]
public decimal? Casse { get; set; }
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(18, 4)")]
public decimal? Trasf { get; set; }
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(18, 4)")]
public decimal? Colli { get; set; }
public int? num_cons { get; set; }
public int? Uova { get; set; }
public int? Cist { get; set; }
public string? Note { get; set; }
public int? Seq { get; set; }
public class ConsegnaFatta
{
[Display(Name = "Seriale consegna")]

View File

@ -20,81 +20,26 @@
<table class="table" style="width:100%">
<thead>
<tr>
<th>Seq</th>
<th>Committente</th>
<th>Sede</th>
<th>Indirizzo sede</th>
<th hidden>Consegna @* effettuata *@</th>
<th hidden>Riga</th>
<th>Bancali caricati</th>
<th>Bancali scaricati</th>
<th hidden>Automezzo</th>
<th hidden>Autista</th>
<th>Importo recuperato</th>
<th>Note (importo)@* Importo non recuperato *@</th>
<th>Note (bancali)@* Bancali non recuperati *@</th>
<th>Esito consegna</th>
@* <th>Consegna fatta</th> *@
@* <th>Seriale giro</th> *@
@* <th>
@Html.DisplayNameFor(model => model.CodAutomezzo)
</th>
<th>
@Html.DisplayNameFor(model => model.DescAutomezzo)
</th>
<th>
@Html.DisplayNameFor(model => model.Brserial)
</th>
<th>
@Html.DisplayNameFor(model => model.DataCarico)
</th>
<th>
@Html.DisplayNameFor(model => model.CodCommittente)
</th>
<th>
@Html.DisplayNameFor(model => model.Committente)
</th>
<th>
@Html.DisplayNameFor(model => model.CodAutista)
</th>
<th>
@Html.DisplayNameFor(model => model.Autista)
</th>
<th>
@Html.DisplayNameFor(model => model.CodSede)
</th>
<th>
@Html.DisplayNameFor(model => model.Sede)
</th>
<th>
@Html.DisplayNameFor(model => model.IndirizzoSede)
</th>
<th>
@Html.DisplayNameFor(model => model.Cproword)
</th>
<th>
@Html.DisplayNameFor(model => model.Cprownum)
</th>
<th>
@Html.DisplayNameFor(model => model.Brmerce)
</th>
<th>
@Html.DisplayNameFor(model => model.Brnote)
</th>
<th>
@Html.DisplayNameFor(model => model.ImportoDaRitirare)
</th>
<th>
@Html.DisplayNameFor(model => model.ItemList)
</th>
<th>
@Html.DisplayNameFor(model => model.serialeGiro)
</th>
<th></th> *@
<th>Casse</th>
<th>Trasf.</th>
<th>Colli</th>
<th>Nr.Cons.</th>
<th>Uova</th>
<th>Cist</th>
<th>Note</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Seq)
</td>
<td>
@Html.DisplayFor(modelItem => item.CodCommittente) - @Html.DisplayFor(modelItem => item.Committente)
</td>
@ -104,42 +49,74 @@
<td>
@Html.DisplayFor(modelItem => item.IndirizzoSede)
</td>
@* @if (item.ConsFatta != null)
{
@if (item.Casse != null && item.Casse>0)
{
<td>
@Html.DisplayFor(modelItem => item.Casse)
</td>
}
else
{
<td>&nbsp;</td>
}
@if (item.Trasf != null && item.Trasf > 0)
{
<td>
@Html.DisplayFor(modelItem => item.Trasf)
</td>
}
else
{
<td>&nbsp;</td>
}
@if (item.Colli != null && item.Colli > 0)
{
<td>
@Html.DisplayFor(modelItem => item.Colli)
</td>
}
else
{
<td>&nbsp;</td>
}
@if (item.num_cons != null && item.num_cons > 0)
{
<td>
@Html.DisplayFor(modelItem => item.num_cons)
</td>
}
else
{
<td>&nbsp;</td>
}
@if (item.Uova != null && item.Uova > 0)
{
<td>
@Html.DisplayFor(modelItem => item.Uova)
</td>
}
else
{
<td>&nbsp;</td>
}
@if (item.Cist != null && item.Cist > 0)
{
<td>
@Html.DisplayFor(modelItem => item.Cist)
</td>
}
else
{
<td>&nbsp;</td>
}
<td>
<a href="@Url.ActionLink("Index","Consegne", new{id = item.ConsFatta.consFattaSerial})" title="ConsFatta">Dettaglio consegna</a>
@Html.DisplayFor(modelItem => item.Note)
</td>
} *@
@if (item.ConsFatta != null)
{
<td hidden>
@Html.HiddenFor(modelItem => item.ConsFatta.consFattaSerial)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.ConsFatta.consFattaRow)
</td>
<td>
@Html.DisplayFor(modelItem => item.ConsFatta.consFattaBanCar)
</td>
<td>
@Html.DisplayFor(modelItem => item.ConsFatta.consFattaBanSca)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.ConsFatta.consFattaMezzo)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.ConsFatta.consFattaAut)
</td>
<td>
@Html.DisplayFor(modelItem => item.ConsFatta.consFattaImpor)
</td>
<td>
@Html.DisplayFor(modelItem => item.ConsFatta.consFattaNotImp)
</td>
<td>
@Html.DisplayFor(modelItem => item.ConsFatta.consFattaNotBan)
</td>
<td>
@Html.HiddenFor(modelItem => item.ConsFatta.consFattaFlagCons)
@ -155,60 +132,13 @@
}
else
{
<td hidden>&nbsp;</td>
<td hidden>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td hidden>&nbsp;</td>
<td hidden>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>
<img alt="notyet" src="@Url.Content("~/images/Yellow.png")" style="width:35px;height:35px;">
</td>
}
<td hidden>
@Html.HiddenFor(modelItem => item.CodAutomezzo) @* - *@ @Html.HiddenFor(modelItem => item.DescAutomezzo)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.Brserial)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.DataCarico)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.CodAutista) @* - *@ @Html.HiddenFor(modelItem => item.Autista)
</td>
<td>
@Html.HiddenFor(modelItem => item.Brmerce)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.Brnote)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.ImportoDaRitirare)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.serialeGiro)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.Cproword)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.Cprownum)
</td>
<td hidden>
@Html.HiddenFor(modelItem => item.ItemList)
</td>
@* <td>
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
</td> *@
</tr>
</tr>
}
</tbody>
</table>

View File

@ -48,8 +48,7 @@
<th>Automezzo</th>
<th><img alt="nocons" src="@Url.Content("~/images/pallet.png")" style="width:31px;height:31px;">Par</th>
<th><img alt="nocons" src="@Url.Content("~/images/icons8-euro-30.png")" style="width:31px;height:31px;">Par</th>
<th><img alt="nocons" src="@Url.Content("~/images/pallet.png")" style="width:31px;height:31px;">Rit</th>
<th><img alt="nocons" src="@Url.Content("~/images/icons8-euro-30.png")" style="width:31px;height:31px;">Rit</th>
<th><img alt="nocons" src="@Url.Content("~/images/pallet.png")" style="width:31px;height:31px;">Temp</th>
<th><img alt="nocons" src="@Url.Content("~/images/icons8-euro-30.png")" style="width:31px;height:31px;">Temp</th>
<th style="width:12%;">&nbsp;</th>
@ -74,24 +73,31 @@
<td>
@Html.DisplayFor(modelItem => item.ImportoDaRecuperare)
</td>
<td>
@Html.DisplayFor(modelItem => item.BancaliRecuperati)
</td>
<td>
@Html.DisplayFor(modelItem => item.ImportoRecuperato)
</td>
<td>
@Html.DisplayFor(modelItem => item.parzialeBanRec)
</td>
<td>
@Html.DisplayFor(modelItem => item.parzialeImpRec)
</td>
@if (item.parzialeBanRec != null && item.parzialeBanRec > 0)
{
<td>
@Html.DisplayFor(modelItem => item.parzialeBanRec)
</td>
}
else
{
<td>&nbsp;</td>
}
@if (item.parzialeImpRec != null && item.parzialeImpRec > 0)
{
<td>
@Html.DisplayFor(modelItem => item.parzialeImpRec)
</td>
}
else
{
<td>&nbsp;</td>
}
<td>
<a href="@Url.ActionLink("Index", "Destinazioni", new { id=item.SerialeGiro, codAutista=item.CodAutista, dataGiro=item.DataGiro, codMezzo=item.CodMezzo })" title="Destinazioni" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-oggetti-puntiforme-30.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Bancali", "GiriChiudi", new { id=item.SerialeGiro })" title="Bancali" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-bancale-24.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Chiudi", "GiriChiudi", new { id=item.SerialeGiro })" title="Chiudi" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-bandiera-a-scacchi-64.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Riapri", "GiriChiudi", new { id=item.SerialeGiro })" title="Riapri" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-riduzione-32.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Elimina", "GiriElimina", new { id=item.SerialeGiro })" title="Elimina" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-rimuovere-24.png")" style="width:24px;height:24px;"></a>
<a href="@Url.ActionLink("Chiudi", "GiriChiudi", new { id=item.SerialeGiro,nbanc=item.parzialeBanRec,imp=item.parzialeImpRec })" title="Chiudi" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-bandiera-a-scacchi-64.png")" style="width:24px;height:24px;"></a>
</td>
</tr>
}