From e513bf5f6b78a51c71536ad15eea7593615c435c Mon Sep 17 00:00:00 2001 From: Marco Audiffredi Date: Wed, 10 Jul 2024 18:22:58 +0200 Subject: [PATCH] campi destinazione (colli, uova ecc) e sequenza --- Controllers/GiriChiudiController.cs | 4 +- Models/Destinazioni_Out.cs | 13 ++ Views/Destinazioni/Index.cshtml | 222 ++++++++++------------------ Views/Giri/Index.cshtml | 40 ++--- 4 files changed, 115 insertions(+), 164 deletions(-) diff --git a/Controllers/GiriChiudiController.cs b/Controllers/GiriChiudiController.cs index eef5ffa..d893fe7 100644 --- a/Controllers/GiriChiudiController.cs +++ b/Controllers/GiriChiudiController.cs @@ -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>(data); model = lst.Where(x => x.SerialeGiro.Equals(id)).First(); + model.BancaliRecuperati = nbanc; + model.ImportoRecuperato = imp; } else { diff --git a/Models/Destinazioni_Out.cs b/Models/Destinazioni_Out.cs index 65903fa..85838b0 100644 --- a/Models/Destinazioni_Out.cs +++ b/Models/Destinazioni_Out.cs @@ -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")] diff --git a/Views/Destinazioni/Index.cshtml b/Views/Destinazioni/Index.cshtml index 3490272..6518f08 100644 --- a/Views/Destinazioni/Index.cshtml +++ b/Views/Destinazioni/Index.cshtml @@ -20,81 +20,26 @@ + - - - - - - - - - - - @* *@ - @* *@ - @* - - - - - - - - - - - - - - - - - - *@ + + + + + + + + @foreach (var item in Model) { + @@ -104,42 +49,74 @@ - @* @if (item.ConsFatta != null) - { + @if (item.Casse != null && item.Casse>0) + { + + } + else + { + + } + @if (item.Trasf != null && item.Trasf > 0) + { + + } + else + { + + } + @if (item.Colli != null && item.Colli > 0) + { + + } + else + { + + } + @if (item.num_cons != null && item.num_cons > 0) + { + + } + else + { + + } + @if (item.Uova != null && item.Uova > 0) + { + + } + else + { + + } + @if (item.Cist != null && item.Cist > 0) + { + + } + else + { + + } + - } *@ + @if (item.ConsFatta != null) { - - - - - - - - - - - - - - - - - } - - - - - - - - - - - - @* *@ - + }
Seq Committente Sede Indirizzo sedeBancali caricatiBancali scaricatiImporto recuperatoNote (importo)@* Importo non recuperato *@Note (bancali)@* Bancali non recuperati *@Esito consegnaConsegna fattaSeriale giro - @Html.DisplayNameFor(model => model.CodAutomezzo) - - @Html.DisplayNameFor(model => model.DescAutomezzo) - - @Html.DisplayNameFor(model => model.Brserial) - - @Html.DisplayNameFor(model => model.DataCarico) - - @Html.DisplayNameFor(model => model.CodCommittente) - - @Html.DisplayNameFor(model => model.Committente) - - @Html.DisplayNameFor(model => model.CodAutista) - - @Html.DisplayNameFor(model => model.Autista) - - @Html.DisplayNameFor(model => model.CodSede) - - @Html.DisplayNameFor(model => model.Sede) - - @Html.DisplayNameFor(model => model.IndirizzoSede) - - @Html.DisplayNameFor(model => model.Cproword) - - @Html.DisplayNameFor(model => model.Cprownum) - - @Html.DisplayNameFor(model => model.Brmerce) - - @Html.DisplayNameFor(model => model.Brnote) - - @Html.DisplayNameFor(model => model.ImportoDaRitirare) - - @Html.DisplayNameFor(model => model.ItemList) - - @Html.DisplayNameFor(model => model.serialeGiro) - CasseTrasf.ColliNr.Cons.UovaCistNote
+ @Html.DisplayFor(modelItem => item.Seq) + @Html.DisplayFor(modelItem => item.CodCommittente) - @Html.DisplayFor(modelItem => item.Committente) @Html.DisplayFor(modelItem => item.IndirizzoSede) + @Html.DisplayFor(modelItem => item.Casse) +   + @Html.DisplayFor(modelItem => item.Trasf) +   + @Html.DisplayFor(modelItem => item.Colli) +   + @Html.DisplayFor(modelItem => item.num_cons) +   + @Html.DisplayFor(modelItem => item.Uova) +   + @Html.DisplayFor(modelItem => item.Cist) +   - Dettaglio consegna + @Html.DisplayFor(modelItem => item.Note) - @Html.DisplayFor(modelItem => item.ConsFatta.consFattaBanCar) - - @Html.DisplayFor(modelItem => item.ConsFatta.consFattaBanSca) - - @Html.DisplayFor(modelItem => item.ConsFatta.consFattaImpor) - - @Html.DisplayFor(modelItem => item.ConsFatta.consFattaNotImp) - - @Html.DisplayFor(modelItem => item.ConsFatta.consFattaNotBan) - @Html.HiddenFor(modelItem => item.ConsFatta.consFattaFlagCons) @@ -155,60 +132,13 @@ } else { -       notyet - @Html.HiddenFor(modelItem => item.Brmerce) - - @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ }) -
diff --git a/Views/Giri/Index.cshtml b/Views/Giri/Index.cshtml index 71863fe..a23709b 100644 --- a/Views/Giri/Index.cshtml +++ b/Views/Giri/Index.cshtml @@ -48,8 +48,7 @@ Automezzo noconsPar noconsPar - noconsRit - noconsRit + noconsTemp noconsTemp   @@ -74,24 +73,31 @@ @Html.DisplayFor(modelItem => item.ImportoDaRecuperare) - - @Html.DisplayFor(modelItem => item.BancaliRecuperati) - - - @Html.DisplayFor(modelItem => item.ImportoRecuperato) - - - @Html.DisplayFor(modelItem => item.parzialeBanRec) - - - @Html.DisplayFor(modelItem => item.parzialeImpRec) - + @if (item.parzialeBanRec != null && item.parzialeBanRec > 0) + { + + @Html.DisplayFor(modelItem => item.parzialeBanRec) + + } + else + { +   + } + @if (item.parzialeImpRec != null && item.parzialeImpRec > 0) + { + + @Html.DisplayFor(modelItem => item.parzialeImpRec) + + } + else + { +   + } + nocons nocons - nocons - nocons - nocons + nocons }