aggiunta vista valorizzazione giacenze iniziale...
This commit is contained in:
@@ -21,4 +21,14 @@ textarea {
|
||||
}
|
||||
.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.padZL {
|
||||
padding-left: 0.2em;
|
||||
}
|
||||
.padZR {
|
||||
padding-right: 0.2em;
|
||||
}
|
||||
.padZRL {
|
||||
padding-left: 0.2em;
|
||||
padding-right: 0.2em;
|
||||
}
|
||||
@@ -26,3 +26,14 @@ textarea {
|
||||
.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.padZL{
|
||||
padding-left: 0.2em;
|
||||
}
|
||||
.padZR{
|
||||
padding-right: 0.2em;
|
||||
}
|
||||
.padZRL{
|
||||
.padZL;
|
||||
.padZR;
|
||||
}
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
body{padding-top:50px;padding-bottom:20px;}.body-content{padding-left:15px;padding-right:15px;}.dl-horizontal dt{white-space:normal;}input,select,textarea{max-width:280px;}.deleted{text-decoration:line-through;}
|
||||
body{padding-top:50px;padding-bottom:20px;}.body-content{padding-left:15px;padding-right:15px;}.dl-horizontal dt{white-space:normal;}input,select,textarea{max-width:280px;}.deleted{text-decoration:line-through;}.padZL{padding-left:.2em;}.padZR{padding-right:.2em;}.padZRL{padding-left:.2em;padding-right:.2em;}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using StockManMVC.Models;
|
||||
|
||||
namespace StockManMVC.Controllers
|
||||
{
|
||||
public class MagStatusController : Controller
|
||||
{
|
||||
private StockManEntities db = new StockManEntities();
|
||||
|
||||
// GET: MagStatus
|
||||
public ActionResult Index()
|
||||
{
|
||||
var vLocationVal = db.vLocationVal.Include(v => v.Location);
|
||||
return View(vLocationVal.ToList());
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
db.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,5 +33,6 @@ namespace StockManMVC.Models
|
||||
public virtual LocType LocType { get; set; }
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<ItemFlux> ItemFlux1 { get; set; }
|
||||
public virtual vLocationVal vLocationVal { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,10 +84,25 @@ namespace StockManMVC.Models
|
||||
// public Nullable<System.DateTime> dtLastUpd;
|
||||
//}
|
||||
|
||||
public class vLocationMetadata
|
||||
{
|
||||
[Display(Name = "Posizione")]
|
||||
public String Desc;
|
||||
}
|
||||
|
||||
//public class EnrollmentMetadata
|
||||
//{
|
||||
// [Range(0, 4)]
|
||||
// public Nullable<decimal> Grade;
|
||||
//}
|
||||
public class vLocationValMetadata
|
||||
{
|
||||
//[Display(Name = "Posizione")]
|
||||
//public String Desc;
|
||||
|
||||
[Display(Name = "Valore Articoli")]
|
||||
[DataType(DataType.Currency)]
|
||||
public String TotVal;
|
||||
|
||||
[Display(Name = "Tot num Articoli")]
|
||||
public String TotCurr;
|
||||
|
||||
[Display(Name = "Mov. aperti")]
|
||||
public String TotPend;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace StockManMVC.Models
|
||||
{
|
||||
[MetadataType(typeof(MovTypeMetadata))]
|
||||
public partial class MovType
|
||||
{
|
||||
}
|
||||
[MetadataType(typeof(LocTypeMetadata))]
|
||||
public partial class LocType
|
||||
{
|
||||
}
|
||||
|
||||
[MetadataType(typeof(ItemFluxesMetadata))]
|
||||
public partial class ItemFluxes
|
||||
{
|
||||
}
|
||||
|
||||
//[MetadataType(typeof(ItemsMetadata))]
|
||||
//public partial class Items
|
||||
//{
|
||||
//}
|
||||
//[MetadataType(typeof(StocksMetadata))]
|
||||
//public partial class Stocks
|
||||
//{
|
||||
//}
|
||||
|
||||
//[MetadataType(typeof(EnrollmentMetadata))]
|
||||
//public partial class Enrollment
|
||||
//{
|
||||
//}
|
||||
}
|
||||
@@ -36,6 +36,7 @@ namespace StockManMVC.Models
|
||||
public virtual DbSet<Item> Item { get; set; }
|
||||
public virtual DbSet<Operator> Operator { get; set; }
|
||||
public virtual DbSet<vItemFlux2Save> vItemFlux2Save { get; set; }
|
||||
public virtual DbSet<vLocationVal> vLocationVal { get; set; }
|
||||
|
||||
public virtual int stp_ItemConsolidate(Nullable<int> itemID)
|
||||
{
|
||||
|
||||
@@ -104,6 +104,17 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St
|
||||
<Property Name="TotValCar" Type="decimal" Precision="38" Scale="6" />
|
||||
<Property Name="TotQtaCar" Type="int" />
|
||||
</EntityType>
|
||||
<!--Errori trovati durante la generazione:
|
||||
avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'StockMan.dbo.vLocationVal'. La chiave è stata dedotta e la definizione è stata creata come tabella/visualizzazione di sola lettura.-->
|
||||
<EntityType Name="vLocationVal">
|
||||
<Key>
|
||||
<PropertyRef Name="LocationID" />
|
||||
</Key>
|
||||
<Property Name="LocationID" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
<Property Name="TotVal" Type="decimal" Precision="38" Scale="6" />
|
||||
<Property Name="TotCurr" Type="int" />
|
||||
<Property Name="TotPend" Type="int" />
|
||||
</EntityType>
|
||||
<Association Name="FK_Item_ItemFamily">
|
||||
<End Role="ItemFamily" Type="Self.ItemFamily" Multiplicity="1" />
|
||||
<End Role="Item" Type="Self.Item" Multiplicity="*" />
|
||||
@@ -235,6 +246,14 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St
|
||||
[vItemFlux2Save].[TotValCar] AS [TotValCar],
|
||||
[vItemFlux2Save].[TotQtaCar] AS [TotQtaCar]
|
||||
FROM [dbo].[vItemFlux2Save] AS [vItemFlux2Save]</DefiningQuery>
|
||||
</EntitySet>
|
||||
<EntitySet Name="vLocationVal" EntityType="Self.vLocationVal" store:Type="Views" store:Schema="dbo">
|
||||
<DefiningQuery>SELECT
|
||||
[vLocationVal].[LocationID] AS [LocationID],
|
||||
[vLocationVal].[TotVal] AS [TotVal],
|
||||
[vLocationVal].[TotCurr] AS [TotCurr],
|
||||
[vLocationVal].[TotPend] AS [TotPend]
|
||||
FROM [dbo].[vLocationVal] AS [vLocationVal]</DefiningQuery>
|
||||
</EntitySet>
|
||||
<AssociationSet Name="FK_Item_ItemFamily" Association="Self.FK_Item_ItemFamily">
|
||||
<End Role="ItemFamily" EntitySet="ItemFamily" />
|
||||
@@ -324,6 +343,7 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St
|
||||
<NavigationProperty Name="ItemStock" Relationship="Self.FK_Stock_Location1" FromRole="Location" ToRole="ItemStock" />
|
||||
<NavigationProperty Name="LocType" Relationship="Self.FK_Location_LocType1" FromRole="Location" ToRole="LocType" />
|
||||
<NavigationProperty Name="ItemFlux1" Relationship="StockManModel.FK_ItemFlux_Location1" FromRole="Location" ToRole="ItemFlux" />
|
||||
<NavigationProperty Name="vLocationVal" Relationship="StockManModel.LocationvLocationVal" FromRole="Location" ToRole="vLocationVal" />
|
||||
</EntityType>
|
||||
<EntityType Name="LocType">
|
||||
<Key>
|
||||
@@ -447,8 +467,13 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St
|
||||
<Parameter Name="ItemID" Mode="In" Type="Int32" />
|
||||
</FunctionImport>
|
||||
<FunctionImport Name="stp_ItemDuplicate" EntitySet="Item" ReturnType="Collection(StockManModel.Item)">
|
||||
<Parameter Name="Original_ID" Mode="In" Type="Int32" />
|
||||
<Parameter Name="Original_ID" Mode="In" Type="Int32" />
|
||||
</FunctionImport>
|
||||
<EntitySet Name="vLocationVal" EntityType="StockManModel.vLocationVal" />
|
||||
<AssociationSet Name="LocationvLocationVal" Association="StockManModel.LocationvLocationVal">
|
||||
<End Role="Location" EntitySet="Location" />
|
||||
<End Role="vLocationVal" EntitySet="vLocationVal" />
|
||||
</AssociationSet>
|
||||
</EntityContainer>
|
||||
<EntityType Name="ItemFamily">
|
||||
<Key>
|
||||
@@ -584,6 +609,28 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St
|
||||
<Property Type="Int32" Name="QtaCurr" Nullable="true" />
|
||||
<Property Type="Int32" Name="QtaPend" Nullable="true" />
|
||||
</ComplexType>
|
||||
<EntityType Name="vLocationVal">
|
||||
<Key>
|
||||
<PropertyRef Name="LocationID" />
|
||||
</Key>
|
||||
<Property Name="LocationID" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="TotVal" Type="Decimal" Precision="38" Scale="6" />
|
||||
<Property Name="TotCurr" Type="Int32" />
|
||||
<Property Name="TotPend" Type="Int32" />
|
||||
<NavigationProperty Name="Location" Relationship="StockManModel.LocationvLocationVal" FromRole="vLocationVal" ToRole="Location" />
|
||||
</EntityType>
|
||||
<Association Name="LocationvLocationVal">
|
||||
<End Type="StockManModel.Location" Role="Location" Multiplicity="1" />
|
||||
<End Type="StockManModel.vLocationVal" Role="vLocationVal" Multiplicity="1" />
|
||||
<ReferentialConstraint>
|
||||
<Principal Role="Location">
|
||||
<PropertyRef Name="ID" />
|
||||
</Principal>
|
||||
<Dependent Role="vLocationVal">
|
||||
<PropertyRef Name="LocationID" />
|
||||
</Dependent>
|
||||
</ReferentialConstraint>
|
||||
</Association>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
@@ -698,6 +745,16 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St
|
||||
</EntitySetMapping>
|
||||
<FunctionImportMapping FunctionImportName="stp_ItemConsolidate" FunctionName="StockManModel.Store.stp_ItemConsolidate" />
|
||||
<FunctionImportMapping FunctionImportName="stp_ItemDuplicate" FunctionName="StockManModel.Store.stp_ItemDuplicate" />
|
||||
<EntitySetMapping Name="vLocationVal">
|
||||
<EntityTypeMapping TypeName="StockManModel.vLocationVal">
|
||||
<MappingFragment StoreEntitySet="vLocationVal">
|
||||
<ScalarProperty Name="TotPend" ColumnName="TotPend" />
|
||||
<ScalarProperty Name="TotCurr" ColumnName="TotCurr" />
|
||||
<ScalarProperty Name="TotVal" ColumnName="TotVal" />
|
||||
<ScalarProperty Name="LocationID" ColumnName="LocationID" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
<AssociationConnector Association="StockManModel.FK_ItemFlux_Location1" />
|
||||
<EntityTypeShape EntityType="StockManModel.vItemFlux2Save" Width="1.5" PointX="5.375" PointY="0.5" />
|
||||
<AssociationConnector Association="StockManModel.ItemvItemFlux2Save" />
|
||||
<EntityTypeShape EntityType="StockManModel.vLocationVal" Width="1.5" PointX="3" PointY="8.25" />
|
||||
<AssociationConnector Association="StockManModel.LocationvLocationVal" />
|
||||
</Diagram>
|
||||
</edmx:Diagrams>
|
||||
</edmx:Designer>
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Codice generato da un modello.
|
||||
//
|
||||
// Le modifiche manuali a questo file potrebbero causare un comportamento imprevisto dell'applicazione.
|
||||
// Se il codice viene rigenerato, le modifiche manuali al file verranno sovrascritte.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace StockManMVC.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class vLocationVal
|
||||
{
|
||||
public string LocationID { get; set; }
|
||||
public Nullable<decimal> TotVal { get; set; }
|
||||
public Nullable<int> TotCurr { get; set; }
|
||||
public Nullable<int> TotPend { get; set; }
|
||||
|
||||
public virtual Location Location { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -180,6 +180,7 @@
|
||||
<Compile Include="Controllers\ItemStocksController.cs" />
|
||||
<Compile Include="Controllers\LocationsController.cs" />
|
||||
<Compile Include="Controllers\LocTypesController.cs" />
|
||||
<Compile Include="Controllers\MagStatusController.cs" />
|
||||
<Compile Include="Controllers\MovTypesController.cs" />
|
||||
<Compile Include="Controllers\OperatorsController.cs" />
|
||||
<Compile Include="Controllers\vItemFlux2SaveController.cs" />
|
||||
@@ -213,7 +214,6 @@
|
||||
<Compile Include="Models\Operator.cs">
|
||||
<DependentUpon>SMModel.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Models\PartialClasses.cs" />
|
||||
<Compile Include="Models\SMModel.Context.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -235,6 +235,9 @@
|
||||
<Compile Include="Models\vItemFlux2Save.cs">
|
||||
<DependentUpon>SMModel.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Models\vLocationVal.cs">
|
||||
<DependentUpon>SMModel.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -439,6 +442,7 @@
|
||||
<Content Include="Views\vItemFlux2Save\Details.cshtml" />
|
||||
<Content Include="Views\vItemFlux2Save\Edit.cshtml" />
|
||||
<Content Include="Views\vItemFlux2Save\Index.cshtml" />
|
||||
<Content Include="Views\MagStatus\Index.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
|
||||
@@ -101,30 +101,30 @@
|
||||
</a>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="col-xs-4 padZR">
|
||||
<a href="@Url.Action("CreatePrecompiled", "ItemFluxes", new { ItemID = Model.ID, MovTypeID = "CAR" })" class="btn btn-success form-control">
|
||||
<i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
|
||||
Carico
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="col-xs-4 padZRL">
|
||||
<a href="@Url.Action("CreatePrecompiled", "ItemFluxes", new { ItemID = Model.ID, MovTypeID = "RETT" })" class="btn btn-info form-control">
|
||||
<i class="glyphicon glyphicon-edit" aria-hidden="true"></i>
|
||||
Rettifica
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-4 padZL">
|
||||
<a href="@Url.Action("CreatePrecompiled", "ItemFluxes", new { ItemID = Model.ID, MovTypeID = "SCAR" })" class="btn btn-danger form-control">
|
||||
<i class="glyphicon glyphicon-minus" aria-hidden="true"></i>
|
||||
Scarico
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="col-xs-4">
|
||||
<a href="@Url.Action("CreatePrecompiled", "ItemFluxes", new { ItemID = Model.ID, MovTypeID = "MOV" })" class="btn btn-warning form-control">
|
||||
<i class="glyphicon glyphicon-equalizer" aria-hidden="true"></i>
|
||||
Movimento
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<a href="@Url.Action("CreatePrecompiled", "ItemFluxes", new { ItemID = Model.ID, MovTypeID = "RETT" })" class="btn btn-info form-control">
|
||||
<i class="glyphicon glyphicon-edit" aria-hidden="true"></i>
|
||||
Rettifica
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
@model IEnumerable<StockManMVC.Models.vLocationVal>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Valorizzazione Stock Giacenze";
|
||||
}
|
||||
|
||||
<div class="row" style="margin-top: 0.5em;">
|
||||
<div class="col-sm-10 col-sm-offset-1">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Valorizzazione Stock Giacenze</strong>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-condensed table-responsive table-striped">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Location.Descr)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TotCurr)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TotPend)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.TotVal)
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Location.Descr)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.TotCurr)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.TotPend)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.TotVal)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,7 +41,7 @@
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>@Html.ActionLink("Stato Magazzino", "Index", "vLocationVal")</li>
|
||||
<li>@Html.ActionLink("Stato Magazzino", "Index", "MagStatus")</li>
|
||||
<li>@Html.ActionLink("Movimenti Aperti", "Index", "vItemFlux2Save")</li>
|
||||
<li>@Html.ActionLink("Spostamento Articoli", "Move", "ItemStocks")</li>
|
||||
</ul>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user