personalizar PU Promedio
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<label class="col-md-2" style="width: 80px; display:none;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" Width="150px" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="Lnkcompuxlsinventarios" OnClick="Lnkcompuxlsinventarios_Click" runat="server"><i class="fa fa-ad-excel"></i> Generar Inventarios HP</asp:LinkButton>
|
||||
</li>
|
||||
</li>--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
@@ -275,6 +275,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Visible="false" DataField="FechaCompra" HeaderText="Última Compra" DataFormatString="{0:d}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:BoundField Visible="false" DataField="FechaVenta" HeaderText="Última Venta" DataFormatString="{0:d}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:BoundField Visible="false" DataField="PUPromedio" HeaderText="PU Promedio" DataFormatString="{0:N2}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right"/>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
@@ -326,17 +327,7 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||
@@ -366,15 +357,16 @@
|
||||
<asp:CheckBox ID="ChkClasificacion2" runat="server" Text="Clasificación 2" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaUltimaCompra" runat="server" Text="Fecha Última Compra" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaUltimaVenta" runat="server" Text="Fecha Última Venta" />
|
||||
</td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkPUPromedio" runat="server" Text="PU Promedio" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -93,7 +93,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
End If
|
||||
CargaPermisos()
|
||||
CargaGvBitacora()
|
||||
Lnkcompuxlsinventarios.Visible = UsuarioActual.CveEmpresa = 72
|
||||
' Lnkcompuxlsinventarios.Visible = UsuarioActual.CveEmpresa = 72
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -320,42 +320,21 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
e.Row.FCLabel("lbSalidaImp").Text = If(e.Row.DBCampo("SalidaImp").ToString().ToDecimal = 0, "-", e.Row.DBCampo("SalidaImp").ToDouble.ToString("N2"))
|
||||
e.Row.FCLabel("lbSaldoF2").Text = If(e.Row.DBCampo("SaldoFImp").ToString().ToDecimal = 0, "-", e.Row.DBCampo("SaldoFImp").ToDouble.ToString("N2"))
|
||||
|
||||
|
||||
|
||||
|
||||
'0,1,4
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Protected Sub gv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' If e.Row.DBCampo("CvePS").ToEntero = -1 Then
|
||||
|
||||
' e.Row.Cells(3).Text = ""
|
||||
' e.Row.Cells(4).Text = ""
|
||||
' e.Row.Cells(5).Text = ""
|
||||
' e.Row.CssClass = "SubTotales"
|
||||
' e.Row.Height = 22
|
||||
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
#Region "MARCA"
|
||||
Protected Sub CargarMarcas()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
|
||||
DivMarca.Visible = True
|
||||
|
||||
Dim ObjMarcas As New ClsProductosServicios
|
||||
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarca.DataSource = ObjMarcas.DtResultados
|
||||
ObjMarcas.Dispose()
|
||||
'Dim ObjMarcas As New ClsProductosServicios
|
||||
'ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarca.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||
' ObjMarcas.Dispose()
|
||||
DdlMarca.DataBind()
|
||||
End If
|
||||
|
||||
@@ -448,6 +427,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
|
||||
GvM.Columns(16).Visible = ChkFechaUltimaCompra.Checked
|
||||
GvM.Columns(17).Visible = ChkFechaUltimaVenta.Checked
|
||||
GvM.Columns(18).Visible = ChkPUPromedio.Checked
|
||||
|
||||
'GvM.Columns(4).Visible = ChkSeccionAlmacen.Checked
|
||||
If ChkSeccionAlmacen.Checked OrElse ChkCodigoBarras.Checked OrElse ChkCodigoAlterno.Checked Then
|
||||
@@ -547,233 +527,234 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
UpBitacora.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
|
||||
Dim continuar = True
|
||||
Try
|
||||
'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 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"
|
||||
' 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(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(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(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(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(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(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
|
||||
' 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
|
||||
' 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"
|
||||
' 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.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 = "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"
|
||||
' 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
|
||||
' If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
||||
|
||||
For Each row As DataRow In dt.Select("CvePS>0 AND SaldoFCant >0")
|
||||
' 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.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.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 = "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"
|
||||
' 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"
|
||||
' 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
|
||||
' ''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.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()
|
||||
' 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
|
||||
' ''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
|
||||
|
||||
continuar = False
|
||||
End Try
|
||||
If Not continuar Then
|
||||
Alert("Ocurrió un error al gener el excel", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user