Almacen en empaque destino
This commit is contained in:
@@ -284,7 +284,7 @@ Public Class ClsCGame
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddEmpaque(Empaque As String, CveUsuario As Integer, CveEmpresa As Integer, CostoXTonelada As Double, CostoPreEnfriado As Double, Full As Double, Sencillo As Double, TermoFull As Double, TermoSencillo As Double) As Boolean
|
||||
Public Function AddEmpaque(Empaque As String, CveUsuario As Integer, CveEmpresa As Integer, CostoXTonelada As Double, CostoPreEnfriado As Double, Full As Double, Sencillo As Double, TermoFull As Double, TermoSencillo As Double, Optional CveAlmacen As Integer = -1, Optional CveAlmacenProductoTerminado As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_CGame_EmpaqueAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -297,6 +297,9 @@ Public Class ClsCGame
|
||||
.Add("@Sencillo", SqlDbType.Float).Value = Sencillo
|
||||
.Add("@TermoLleno", SqlDbType.Float).Value = TermoFull
|
||||
.Add("@TermoSencillo", SqlDbType.Float).Value = TermoSencillo
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveAlmacenProductoTerminado", SqlDbType.Int).Value = CveAlmacenProductoTerminado
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -307,7 +310,7 @@ Public Class ClsCGame
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateEmpaque(CveEmpaque As Integer, Estatus As Boolean, Empaque As String, CveUsuario As Integer, CveEmpresa As Integer, CostoXTonelada As Double, CostoPreEnfriado As Double, Full As Double, Sencillo As Double, TermoFull As Double, TermoSencillo As Double) As Boolean
|
||||
Public Function UpdateEmpaque(CveEmpaque As Integer, Estatus As Boolean, Empaque As String, CveUsuario As Integer, CveEmpresa As Integer, CostoXTonelada As Double, CostoPreEnfriado As Double, Full As Double, Sencillo As Double, TermoFull As Double, TermoSencillo As Double, Optional CveAlmacen As Integer = -1, Optional CveAlmacenProductoTerminado As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_CGame_EmpaqueUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -322,6 +325,9 @@ Public Class ClsCGame
|
||||
.Add("@Sencillo", SqlDbType.Float).Value = Sencillo
|
||||
.Add("@TermoLleno", SqlDbType.Float).Value = TermoFull
|
||||
.Add("@TermoSencillo", SqlDbType.Float).Value = TermoSencillo
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveAlmacenProductoTerminado", SqlDbType.Int).Value = CveAlmacenProductoTerminado
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<asp:GridView ID="GvEmpaque" runat="server" GridLines="None" CssClass="table table-hover table-striped GvEmpaque ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveEmpaque,Empaque,Estatus,FechaIng,CveUsuario,Usuario,CveEmpresa,Empresa,CostoXTonelada,CostoPreEnfriado,Lleno,Sencillo,TermoLleno,TermoSencillo">
|
||||
DataKeyNames="CveEmpaque,Empaque,Estatus,FechaIng,CveUsuario,Usuario,CveEmpresa,Empresa,CostoXTonelada,CostoPreEnfriado,Lleno,Sencillo,TermoLleno,TermoSencillo,CveAlmacen,CveAlmacenProductoTerminado,CveSubProyecto">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Empaque" ItemStyle-HorizontalAlign="Left" Visible="true">
|
||||
<ItemTemplate>
|
||||
@@ -103,6 +103,16 @@
|
||||
<asp:Label ID="LblTermoSencillo" runat="server" Text='<%# Eval("TermoSencillo")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Almacen F. O." ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblAlmacen" runat="server" Text='<%# Eval("Almacen")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Almacen P. T." ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblAlmacenProductoTerminado" runat="server" Text='<%# Eval("AlmacenProductoTerminado")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
|
||||
@@ -184,6 +194,14 @@
|
||||
<ajax:FilteredTextBoxExtender ID="FTBETermoSencillo" TargetControlID="TxtTermoSencillo" FilterType="Numbers,Custom" ValidChars="." runat="server" />
|
||||
<label for="<%= TxtTermoSencillo.ClientID.ToString()%>">TermoSencillo:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:DropDownList Class="select2me" Width="200px" ID="DdlAlmacenes" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssStyle="width: 100%;"></asp:DropDownList>
|
||||
<label for="<%= DdlAlmacenes.ClientID.ToString()%>">Almacen fruto origen:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:DropDownList Class="select2me" Width="200px" ID="DdlAlmacenesPT" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssStyle="width: 100%;"></asp:DropDownList>
|
||||
<label for="<%= DdlAlmacenesPT.ClientID.ToString()%>">Almacen producto terminado:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivEstatus" runat="server">
|
||||
<label for="<%= ChkTipoestatus.ClientID.ToString()%>">Estatus:</label>
|
||||
<asp:CheckBox ID="ChkTipoestatus" runat="server" />
|
||||
|
||||
@@ -16,13 +16,21 @@
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveEmpaque")), 0, CInt(ViewState("CveEmpaque")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveEmpaque") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
DdlAlmacenes.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
||||
DdlAlmacenes.DataBind()
|
||||
|
||||
@@ -248,12 +248,13 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
||||
// Encabezados
|
||||
ws.Cell(1, 1).Value = "Código";
|
||||
ws.Cell(1, 2).Value = "Nombre Completo";
|
||||
ws.Cell(1, 3).Value = "Descuento Acordado";
|
||||
ws.Cell(1, 4).Value = "Descuento Aplicado";
|
||||
ws.Cell(1, 5).Value = "Acumulado";
|
||||
ws.Cell(1, 3).Value = "Fecha";
|
||||
ws.Cell(1, 4).Value = "Descuento Acordado";
|
||||
ws.Cell(1, 5).Value = "Descuento Aplicado";
|
||||
ws.Cell(1, 6).Value = "Acumulado";
|
||||
|
||||
// Estilo del encabezado
|
||||
var headerRange = ws.Range("A1:E1");
|
||||
var headerRange = ws.Range("A1:F1");
|
||||
headerRange.Style.Fill.BackgroundColor = XLColor.LightGray;
|
||||
headerRange.Style.Font.Bold = true;
|
||||
headerRange.Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
@@ -271,19 +272,20 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
|
||||
|
||||
ws.Cell(row, 1).Value = codigo;
|
||||
ws.Cell(row, 2).Value = nombre;
|
||||
ws.Cell(row, 3).Value = valor;
|
||||
ws.Cell(row, 4).Value = aplicado;
|
||||
ws.Cell(row, 5).Value = acumulado;
|
||||
ws.Cell(row, 3).Value = dr["FechaInicioAplicacion"].ToString();
|
||||
ws.Cell(row, 4).Value = valor;
|
||||
ws.Cell(row, 5).Value = aplicado;
|
||||
ws.Cell(row, 6).Value = acumulado;
|
||||
|
||||
// Formato numérico a columnas de dinero
|
||||
ws.Cell(row, 3).Style.NumberFormat.Format = "#,##0.00";
|
||||
ws.Cell(row, 4).Style.NumberFormat.Format = "#,##0.00";
|
||||
ws.Cell(row, 5).Style.NumberFormat.Format = "#,##0.00";
|
||||
ws.Cell(row, 6).Style.NumberFormat.Format = "#,##0.00";
|
||||
|
||||
// Color especial si CveTipo = 0
|
||||
if (cveTipo == 0)
|
||||
{
|
||||
var range = ws.Range(row, 1, row, 5);
|
||||
var range = ws.Range(row, 1, row, 6);
|
||||
range.Style.Fill.BackgroundColor = XLColor.FromArgb(221, 221, 221);
|
||||
range.Style.Font.Bold = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user