--Quitar boton anterior y siguiente, filtros de cod inicio y fin
This commit is contained in:
@@ -35,18 +35,20 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
.dataTables_scrollHead {
|
.dataTables_scrollHead {
|
||||||
background-color: #95A5A6;
|
background-color: #95A5A6;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-scrollable {
|
.table-scrollable {
|
||||||
margin-top: 0px !important;
|
margin-top: 0px !important;
|
||||||
margin-bottom: 0px !important;
|
margin-bottom: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_scroll {
|
.dataTables_scroll {
|
||||||
padding-top: 0px;
|
padding-top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Totales a {
|
.Totales a {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
@@ -196,22 +198,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row" runat="server" visible="false" id="DVFiltroCodigo">
|
<div class="row" runat="server" visible="false" id="DVFiltroCodigo">
|
||||||
<div class="col-md-1">Código Inicio:</div>
|
<div class="col-md-1">Código Inicio:</div>
|
||||||
<div class="col-md-2"><asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px"></asp:TextBox></div>
|
|
||||||
<div class="col-md-1">Código Fin:</div>
|
|
||||||
<div class="col-md-2"><asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px"></asp:TextBox></div>
|
|
||||||
|
|
||||||
<div class="col-md-1" runat="server" id="DVNavegar" >
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-5">
|
|
||||||
<asp:LinkButton runat="server" ID="LnkPSAntyerior" OnClick="LnkPSAntyerior_Click" CssClass="btn btn-primary">Anterior</asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
</div>
|
<asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px"></asp:TextBox></div>
|
||||||
<div class="col-md-5">
|
<div class="col-md-1">Código Fin:</div>
|
||||||
<asp:LinkButton runat="server" ID="LnkPSSiguiente" OnClick="LnkPSSiguiente_Click" CssClass="btn btn-primary">Siguiente</asp:LinkButton>
|
<div class="col-md-2">
|
||||||
</div>
|
<asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px"></asp:TextBox></div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -227,11 +218,13 @@
|
|||||||
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div id="dvCa" style="width: 100%; visibility: hidden; top: 40px">
|
<div id="dvCa" style="width: 100%; visibility: hidden; top: 40px">
|
||||||
<table id="dTable" class="correcto table Widthall " runat="server"><tr>
|
<table id="dTable" class="correcto table Widthall " runat="server">
|
||||||
|
<tr>
|
||||||
<td id="dvArt" runat="server" class="dataTables_scrollHead" style="text-align: center!important; font-size: 14px; width: 32.5%;"><b>Producto</b></td>
|
<td id="dvArt" runat="server" class="dataTables_scrollHead" style="text-align: center!important; font-size: 14px; width: 32.5%;"><b>Producto</b></td>
|
||||||
<td id="dvCan" runat="server" class="dataTables_scrollHead" style="text-align: center!important; font-size: 14px; border-right-color: white!important; border-left-color: white!important; width: 30%; border-style: solid;"><b>Cantidad</b></td>
|
<td id="dvCan" runat="server" class="dataTables_scrollHead" style="text-align: center!important; font-size: 14px; border-right-color: white!important; border-left-color: white!important; width: 30%; border-style: solid;"><b>Cantidad</b></td>
|
||||||
<td id="dvImp" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 37.5%; font-size: 14px;"><b>Importe</b></td>
|
<td id="dvImp" runat="server" class="dataTables_scrollHead" style="text-align: center!important; width: 37.5%; font-size: 14px;"><b>Importe</b></td>
|
||||||
</tr></table>
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -369,7 +362,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="Id_Clave" HeaderText="Folio / Concepto" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Id_Clave" HeaderText="Folio / Concepto" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" HTMLEncode="false"/>
|
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" HtmlEncode="false" />
|
||||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|||||||
@@ -267,10 +267,13 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
CveMarca = DdlMarca.SelectedValue.ToEntero
|
CveMarca = DdlMarca.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
||||||
|
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
||||||
|
|
||||||
If Reporte.RepMovimientos(UsuarioActual.CveEmpresa, DdlMoneda.SelectedValue.ToEntero, FechaInicial, FechaFinal, DdlTipoMovimiento.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero,
|
If Reporte.RepMovimientos(UsuarioActual.CveEmpresa, DdlMoneda.SelectedValue.ToEntero, FechaInicial, FechaFinal, DdlTipoMovimiento.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero,
|
||||||
Almacenes, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero,
|
Almacenes, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero,
|
||||||
DdlMovs.SelectedValue.ToEntero, CveMarca:=Marcas, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoAlmacen:=TipoAlmacen,
|
DdlMovs.SelectedValue.ToEntero, CveMarca:=Marcas, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoAlmacen:=TipoAlmacen,
|
||||||
Modalidad:=DdlModalidadFiltro.SelectedValue.ToEntero) Then
|
Modalidad:=DdlModalidadFiltro.SelectedValue.ToEntero, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||||
dt = Reporte.DtResultados
|
dt = Reporte.DtResultados
|
||||||
|
|
||||||
|
|
||||||
@@ -586,331 +589,4 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkPSAntyerior_Click(sender As Object, e As EventArgs)
|
|
||||||
NavegacionPS(Siguiente:=False)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkPSSiguiente_Click(sender As Object, e As EventArgs)
|
|
||||||
NavegacionPS(Siguiente:=True)
|
|
||||||
End Sub
|
|
||||||
Private Sub NavegacionPS(Siguiente As Boolean)
|
|
||||||
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero
|
|
||||||
|
|
||||||
If Not CvePS > 0 Then
|
|
||||||
CvePS = ObtenerInicioPSNavegacion(Siguiente:=Siguiente)
|
|
||||||
If Not CvePS > 0 Then
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim dt As DataTable = New DataTable
|
|
||||||
|
|
||||||
Dim Entrada As Boolean = True
|
|
||||||
Dim Salida As Boolean = True
|
|
||||||
|
|
||||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
|
||||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
|
||||||
Dim CveAlmacen As Integer = If(DdlAlmacen.SelectedValue.ToEntero = 0, -1, DdlAlmacen.SelectedValue.ToEntero)
|
|
||||||
Dim CveAlmacenes As String = DdlAlmacen.GetSelectedValues()
|
|
||||||
If CveAlmacenes.Contains(",") Then
|
|
||||||
CveAlmacen = -1
|
|
||||||
End If
|
|
||||||
If CvePS > 0 Then
|
|
||||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
|
||||||
If dr IsNot Nothing Then
|
|
||||||
DdlPS.SelectedText = dr("PSCodigo").ToString
|
|
||||||
DdlPS.SelectedValue = CvePS.ToString
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Dim CveTiposAlmacen As String = "-1"
|
|
||||||
'For Each item As ListItem In CBLTiposAlmacen.Items
|
|
||||||
' CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
|
||||||
'Next
|
|
||||||
|
|
||||||
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
|
||||||
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
|
||||||
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
|
||||||
If ObjInventarios.GetKardexPSNavegacion(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, "-1", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
|
||||||
CveAlmacenes, Siguiente:=Siguiente, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
|
||||||
dt = ObjInventarios.DtResultados.Copy
|
|
||||||
End If
|
|
||||||
ObjInventarios.Dispose()
|
|
||||||
|
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
|
||||||
DdlPS.SelectedValue = dt.Rows(0)("CvePS").ToString
|
|
||||||
DdlPS.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
|
||||||
DdlPS.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
|
||||||
DdlPS.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
|
||||||
CargaDatos()
|
|
||||||
'UPFiltros.Update()
|
|
||||||
UPPMov.Update()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function ObtenerInicioPSNavegacion(Siguiente As Boolean) As Integer
|
|
||||||
|
|
||||||
Dim CvePSRespuesta As Integer = -1
|
|
||||||
Dim dt As DataTable = New DataTable
|
|
||||||
|
|
||||||
If Siguiente Then
|
|
||||||
If TxtCodigoInicio.Text.Trim.Length > 0 Then
|
|
||||||
'CvePSRespuesta = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim).FiltroPrimeroValor("CvePS").ToEntero
|
|
||||||
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoInicio.Text.Trim)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If TxtCodigoFinal.Text.Trim.Length > 0 Then
|
|
||||||
'CvePSRespuesta = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim).FiltroPrimeroValor("CvePS").ToEntero
|
|
||||||
dt = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=TxtCodigoFinal.Text.Trim)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
|
||||||
CvePSRespuesta = dt.Rows(0)("CvePS").ToString.ToEntero
|
|
||||||
DdlPS.SelectedValue = dt.Rows(0)("CvePS").ToString
|
|
||||||
DdlPS.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
|
||||||
DdlPS.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
|
||||||
DdlPS.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
|
||||||
'UPFiltros.Update()
|
|
||||||
UPPMov.Update()
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Return CvePSRespuesta
|
|
||||||
|
|
||||||
End Function
|
|
||||||
|
|
||||||
'Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
|
|
||||||
' Dim continuar = True
|
|
||||||
' Try
|
|
||||||
|
|
||||||
' Dim wb As New ClosedXML.Excel.XLWorkbook()
|
|
||||||
' Dim libro As ClosedXML.Excel.IXLWorksheet = wb.AddWorksheet("Reporte de inventarios")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Dim Fila As Integer = 0
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
|
||||||
' libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
|
||||||
' libro.Cell(Fila + 3, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Column(1).Width = 34.43
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
|
||||||
' libro.Cell(Fila + 2, 1).Value = "RECORD Type"
|
|
||||||
' libro.Cell(Fila + 3, 1).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(2).Width = 24
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "Codigo del Partner"
|
|
||||||
' libro.Cell(Fila + 2, 2).Value = "Reporter_id "
|
|
||||||
' libro.Cell(Fila + 3, 2).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(3).Width = 28.71
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "Nombre de la Empresa"
|
|
||||||
' libro.Cell(Fila + 2, 3).Value = "Reporter Company Name"
|
|
||||||
' libro.Cell(Fila + 3, 3).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(4).Width = 23.57
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "CÓDIGO DEL PAÍS"
|
|
||||||
' libro.Cell(Fila + 2, 4).Value = "COUNTRY CD"
|
|
||||||
' libro.Cell(Fila + 3, 4).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(5).Width = 17.57
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = "Ubicación"
|
|
||||||
' libro.Cell(Fila + 2, 5).Value = "LOCATION"
|
|
||||||
' libro.Cell(Fila + 3, 5).Value = "OPCIONAL"
|
|
||||||
|
|
||||||
' libro.Column(6).Width = 35.29
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = "FECHA DEL INVENTARIO"
|
|
||||||
' libro.Cell(Fila + 2, 6).Value = "Period End Date"
|
|
||||||
' libro.Cell(Fila + 3, 6).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(7).Width = 23.43
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = "REENVIO"
|
|
||||||
' libro.Cell(Fila + 2, 7).Value = "RESUBMIT"
|
|
||||||
' libro.Cell(Fila + 3, 7).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' libro.Column(8).Width = 29.29
|
|
||||||
' libro.Column(9).Width = 25
|
|
||||||
' libro.Column(10).Width = 18.14
|
|
||||||
' libro.Column(11).Width = 32.71
|
|
||||||
' libro.Column(12).Width = 13.57
|
|
||||||
' libro.Column(13).Width = 13
|
|
||||||
' libro.Column(14).Width = 32
|
|
||||||
' libro.Column(15).Width = 12.71
|
|
||||||
' libro.Column(16).Width = 13
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' Fila = Fila + 3
|
|
||||||
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "IH"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "10245068"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "COMPUPROVEEDORES SA DE CV"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "MX"
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = ""
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = String.Format("{0:yyyyMMdd}", TxtFechaF.Text.ToDate())
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = "N"
|
|
||||||
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
|
||||||
' libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
|
||||||
' libro.Range(libro.Cell(Fila + 3, 3), libro.Cell(Fila + 3, 15)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
|
||||||
' libro.Cell(Fila + 3, 7).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
|
||||||
' libro.Cell(Fila + 3, 10).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "NÚMERO DEL PRODUCTO"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "OPCION DEL PRODUCTO"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "UPC"
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = "CODIGO SKU"
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = "ORDENES DE COMPRAS EN ABIERTO "
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = "INVENTARIO DISPONIBLE"
|
|
||||||
' libro.Cell(Fila + 1, 8).Value = "DEVOLUCIONES"
|
|
||||||
' libro.Cell(Fila + 1, 9).Value = "INVENTARIO RESERVADO"
|
|
||||||
' libro.Cell(Fila + 1, 10).Value = "INVENTARIO TOTAL"
|
|
||||||
' libro.Cell(Fila + 1, 11).Value = "EN TRANSITO"
|
|
||||||
' libro.Cell(Fila + 1, 12).Value = "VALOR UNITARIO DEL PRODUCTO HP"
|
|
||||||
' libro.Cell(Fila + 1, 13).Value = "VALOR TOTAL DEL INVENTARIO"
|
|
||||||
' libro.Cell(Fila + 1, 14).Value = "NOMBRE DE LA TIENDA"
|
|
||||||
' libro.Cell(Fila + 1, 15).Value = "Codigo de la tienda"
|
|
||||||
' libro.Cell(Fila + 1, 16).Value = "MONEDA"
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "RECORD TYPE "
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "Partner Reported Product ID"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "PROD_OPTION"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "UPC"
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = "Reseller product number "
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = "Quantity on Order"
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = "Quantity on Hand"
|
|
||||||
' libro.Cell(Fila + 1, 8).Value = "Quantity in stock allocated to be returned to supplier"
|
|
||||||
' libro.Cell(Fila + 1, 9).Value = "Reserved Inventory"
|
|
||||||
' libro.Cell(Fila + 1, 10).Value = "Quantity avail. for sale"
|
|
||||||
' libro.Cell(Fila + 1, 11).Value = "Quantity in float (In transit between partner warehouses)"
|
|
||||||
' libro.Cell(Fila + 1, 12).Value = "INVENTORY UNIT VALUE"
|
|
||||||
' libro.Cell(Fila + 1, 13).Value = "INVENTORY VALUATION"
|
|
||||||
' libro.Cell(Fila + 1, 14).Value = "Sell from name (For retailers, ""Store Name / Site Name"")"
|
|
||||||
' libro.Cell(Fila + 1, 15).Value = "Sell From Location ID"
|
|
||||||
' libro.Cell(Fila + 1, 16).Value = "CURRENCY"
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 8).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 9).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 10).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 11).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 12).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 13).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 14).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 15).Value = "OPCIONAL"
|
|
||||||
' libro.Cell(Fila + 1, 16).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
|
|
||||||
' If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
' For Each row As DataRow In dt.Select("CvePS>0 AND SaldoFCant >0")
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "ID" ' "TIPO DO REGISTRO"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = String.Format("'{0}", row("Codigo")) ' "NÚMERO DEL PRODUCTO"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "" ' "OPCION DEL PRODUCTO"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "" ' "UPC"
|
|
||||||
' libro.Cell(Fila + 1, 5).Value = "" ' "CODIGO SKU"
|
|
||||||
' libro.Cell(Fila + 1, 6).Value = "" ' "ORDENES DE COMPRAS EN ABIERTO "
|
|
||||||
' libro.Cell(Fila + 1, 7).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO DISPONIBLE"
|
|
||||||
' 'libro.Cell(Fila + 1, 7).Style.NumberFormat.Format = "N2"
|
|
||||||
' libro.Cell(Fila + 1, 8).Value = "" ' "DEVOLUCIONES"
|
|
||||||
' libro.Cell(Fila + 1, 9).Value = "" ' "INVENTARIO RESERVADO"
|
|
||||||
' libro.Cell(Fila + 1, 10).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO TOTAL"
|
|
||||||
' 'libro.Cell(Fila + 1, 10).Style.NumberFormat.Format = "$ #,##0.00"
|
|
||||||
' libro.Cell(Fila + 1, 11).Value = "" ' "EN TRANSITO"
|
|
||||||
' libro.Cell(Fila + 1, 12).Value = "" ' "VALOR UNITARIO DEL PRODUCTO HP"
|
|
||||||
' libro.Cell(Fila + 1, 13).Value = "" ' "VALOR TOTAL DEL INVENTARIO"
|
|
||||||
' libro.Cell(Fila + 1, 14).Value = "" ' "NOMBRE DE LA TIENDA"
|
|
||||||
' libro.Cell(Fila + 1, 15).Value = "" ' "Codigo de la tienda"
|
|
||||||
' libro.Cell(Fila + 1, 16).Value = "MXN" ' "MONEDA"
|
|
||||||
' Next
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
|
||||||
' libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "TIPO DEL REGISTRO"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "TOTAL DE REGISTROS"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "Suma del Inventario Disponible"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "Suma del Inventario Total"
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "RECORD TYPE"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "COUNT OF RECORDS"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "SUM OF “"On Hand”""
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "SUM OF “"Total Inventory"”"
|
|
||||||
|
|
||||||
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = "OBLIGATORIO"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = "OBLIGATORIO"
|
|
||||||
|
|
||||||
' Dim Codigo As Double = 0
|
|
||||||
' Dim SaldoFCant As Double = 0
|
|
||||||
' Dim SaldoFImp As Double = 0
|
|
||||||
' If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
|
||||||
' Codigo = dt.COUNT("Codigo", "CvePS>0")
|
|
||||||
' SaldoFCant = dt.SUM("SaldoFCant", "CvePS>0")
|
|
||||||
' SaldoFImp = dt.SUM("SaldoFImp", "CvePS>0")
|
|
||||||
' End If
|
|
||||||
' Fila = Fila + 1
|
|
||||||
' libro.Cell(Fila + 1, 1).Value = "IT"
|
|
||||||
' libro.Cell(Fila + 1, 2).Value = String.Format("{0}", Codigo)
|
|
||||||
' 'libro.Cell(Fila + 1, 2).Style.NumberFormat.Format = "N2"
|
|
||||||
' libro.Cell(Fila + 1, 3).Value = String.Format("{0}", SaldoFCant)
|
|
||||||
' 'libro.Cell(Fila + 1, 3).Style.NumberFormat.Format = "N2"
|
|
||||||
' libro.Cell(Fila + 1, 4).Value = String.Format("{0}", SaldoFCant)
|
|
||||||
' 'libro.Cell(Fila + 1, 4).Style.NumberFormat.Format = "$ #,##0.00"
|
|
||||||
|
|
||||||
|
|
||||||
' ''Guarda streem y descarga
|
|
||||||
' Dim fs As Stream = New MemoryStream()
|
|
||||||
' wb.SaveAs(fs)
|
|
||||||
' fs.Position = 0
|
|
||||||
' Dim memoryStream As New MemoryStream()
|
|
||||||
' Using input As Stream = fs
|
|
||||||
' input.CopyTo(memoryStream)
|
|
||||||
' End Using
|
|
||||||
' memoryStream.Position = 0
|
|
||||||
|
|
||||||
' Response.Clear()
|
|
||||||
' Response.Buffer = True
|
|
||||||
|
|
||||||
' Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
||||||
' Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xlsx", "Reporte de Inventarios HP"))
|
|
||||||
' Response.BinaryWrite(memoryStream.ToArray())
|
|
||||||
' Response.End()
|
|
||||||
|
|
||||||
' ''endGuarda streem y descarga
|
|
||||||
' Catch
|
|
||||||
|
|
||||||
' continuar = False
|
|
||||||
' End Try
|
|
||||||
' If Not continuar Then
|
|
||||||
' Alert("Ocurrió un error al gener el excel", TipoMensaje.MsgAdvertencia)
|
|
||||||
' End If
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user