This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-12-16 11:13:33 -07:00
12 changed files with 222 additions and 66 deletions

View File

@@ -6410,7 +6410,8 @@ Public Class ClsPaginas
Else Else
Response.ContentType = mimeType Response.ContentType = mimeType
End If End If
Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) Response.ClearHeaders()
Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
Response.BinaryWrite(bytes) ' create the file Response.BinaryWrite(bytes) ' create the file
Response.Flush() ' send it to the client to download Response.Flush() ' send it to the client to download
bytes = Nothing bytes = Nothing

View File

@@ -74,7 +74,7 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Encuesta" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Datos Técnicos" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LnkEncuesta" runat="server" AlternateText="Usuarios Asignados" CausesValidation="False" <asp:LinkButton ID="LnkEncuesta" runat="server" AlternateText="Usuarios Asignados" CausesValidation="False"
Width="24.1px" Width="24.1px"

View File

@@ -5,7 +5,6 @@ Imports System.Data
Imports System.IO Imports System.IO
Imports System.Xml Imports System.Xml
Imports Extensiones Imports Extensiones
Imports iText.Kernel.Pdf
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports Stimulsoft.Report Imports Stimulsoft.Report
Imports Stimulsoft.Report.Web Imports Stimulsoft.Report.Web
@@ -190,49 +189,49 @@ Partial Class PopUpVerFactura
'OPCIONES 'OPCIONES
If Request("P") IsNot Nothing AndAlso Decripta((Request("P").ToString)) <> "" Then If Request("P") IsNot Nothing AndAlso Decripta((Request("P").ToString)) <> "" Then
Dim UrlParametros As Hashtable = Parametros(Decripta((Request("P").ToString))) Dim UrlParametros As Hashtable = Parametros(Decripta((Request("P").ToString)))
If UrlParametros("OP") IsNot Nothing AndAlso UrlParametros("OP").ToString <> "" Then If UrlParametros("OP") IsNot Nothing AndAlso UrlParametros("OP").ToString <> "" Then
SeleccionaReporte(UrlParametros) SeleccionaReporte(UrlParametros)
End If
End If End If
End If
If Request("onlyPrint") IsNot Nothing Then If Request("onlyPrint") IsNot Nothing Then
If Request("onlyPrint").ToString() = "GeneraPDFNomina" AndAlso Not IsNothing(Request("CvePersonal")) AndAlso If Request("onlyPrint").ToString() = "GeneraPDFNomina" AndAlso Not IsNothing(Request("CvePersonal")) AndAlso
Not IsNothing(Request("CvePeriodo")) AndAlso Not IsNothing(Request("indemnizacion")) Then Not IsNothing(Request("CvePeriodo")) AndAlso Not IsNothing(Request("indemnizacion")) Then
Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa
Dim RutaEmpresa As String = UsuarioActual.Empresa.Ruta Dim RutaEmpresa As String = UsuarioActual.Empresa.Ruta
Dim indemnizacion As Boolean = Request("indemnizacion").ToString.ToEntero() = 1 Dim indemnizacion As Boolean = Request("indemnizacion").ToString.ToEntero() = 1
GeneraPDFNomina(Request("CvePersonal").ToString.ToEntero(), Request("CvePeriodo").ToString.ToEntero(), CveEmpresa, RutaEmpresa, indemnizacion) GeneraPDFNomina(Request("CvePersonal").ToString.ToEntero(), Request("CvePeriodo").ToString.ToEntero(), CveEmpresa, RutaEmpresa, indemnizacion)
End If End If
If Request("onlyPrint").ToString() = "Pallet" AndAlso Not IsNothing(Request("CvePallet")) Then If Request("onlyPrint").ToString() = "Pallet" AndAlso Not IsNothing(Request("CvePallet")) Then
imprimirpallet2(Request("CvePallet").ToString.ToEntero()) imprimirpallet2(Request("CvePallet").ToString.ToEntero())
End If End If
If Request("onlyPrint").ToString() = "PalletCaja" AndAlso Not IsNothing(Request("CvePallet")) Then If Request("onlyPrint").ToString() = "PalletCaja" AndAlso Not IsNothing(Request("CvePallet")) Then
imprimirpallet(Request("CvePallet").ToString.ToEntero()) imprimirpallet(Request("CvePallet").ToString.ToEntero())
End If End If
If Request("onlyPrint").ToString() = "PalletCaja2" AndAlso Not IsNothing(Request("CvePallet")) Then If Request("onlyPrint").ToString() = "PalletCaja2" AndAlso Not IsNothing(Request("CvePallet")) Then
imprimirpalletWalamart(Request("CvePallet").ToString.ToEntero()) imprimirpalletWalamart(Request("CvePallet").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "manifiesto" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then
imprimirManifiesto(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "manifiestoRemision" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then
imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "manifiestoCartaPorte" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then
imprimirManifiestoCartaPorte(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "rfctxtvalidar" Then
rfctxtvalidar()
End If
If Request("onlyPrint").ToString() = "Recibo" Then
ReciboAgropecuaria()
End If
End If End If
If Request("onlyPrint").ToString() = "manifiesto" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then
imprimirManifiesto(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "manifiestoRemision" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then
imprimirManifiestoRemision(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "manifiestoCartaPorte" AndAlso Not IsNothing(Request("cveEmbarqueManifiesto")) Then
imprimirManifiestoCartaPorte(Request("cveEmbarqueManifiesto").ToString.ToEntero())
End If
If Request("onlyPrint").ToString() = "rfctxtvalidar" Then
rfctxtvalidar()
End If
If Request("onlyPrint").ToString() = "Recibo" Then
ReciboAgropecuaria()
End If
End If End If
End If
End Sub End Sub
@@ -6572,7 +6571,7 @@ Partial Class PopUpVerFactura
Dim PS As String = "" Dim PS As String = ""
Dim All As Byte() Dim All As Byte()
Using ms As New MemoryStream Using ms As New MemoryStream
Using pdfdoc As New PdfDocument(New PdfReader(ms)) Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfWriter(ms))
pdfdoc.InitializeOutlines() pdfdoc.InitializeOutlines()
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
If ObjInventarios.DtResultados IsNot Nothing Then If ObjInventarios.DtResultados IsNot Nothing Then
@@ -6584,7 +6583,7 @@ Partial Class PopUpVerFactura
If Modalidad = "Individual" Then If Modalidad = "Individual" Then
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
docEtiqueta.Close() docEtiqueta.Close()
Else Else
@@ -6593,7 +6592,7 @@ Partial Class PopUpVerFactura
For i As Integer = 0 To Cant For i As Integer = 0 To Cant
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
docEtiqueta.Close() docEtiqueta.Close()
Next Next
@@ -6622,7 +6621,7 @@ Partial Class PopUpVerFactura
Dim All As Byte() Dim All As Byte()
Using ms As New MemoryStream Using ms As New MemoryStream
Using pdfdoc As New PdfDocument(New PdfReader(ms)) Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfWriter(ms))
pdfdoc.InitializeOutlines() pdfdoc.InitializeOutlines()
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveAlmacen.ToString) Then If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveAlmacen.ToString) Then
If ObjInventarios.DtResultados IsNot Nothing Then If ObjInventarios.DtResultados IsNot Nothing Then
@@ -6632,7 +6631,7 @@ Partial Class PopUpVerFactura
If Modalidad = "Individual" Then If Modalidad = "Individual" Then
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
docEtiqueta.Close() docEtiqueta.Close()
Else Else
@@ -6641,7 +6640,7 @@ Partial Class PopUpVerFactura
For i As Integer = 0 To Cant For i As Integer = 0 To Cant
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)) Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
Dim docEtiqueta As New PdfDocument(New PdfReader(reporteByte)) Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc) docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
docEtiqueta.Close() docEtiqueta.Close()
Next Next

View File

@@ -612,7 +612,7 @@
//newData.sort(function (a, b) { //newData.sort(function (a, b) {
// return a[0] > b[0] ? 1 : -1; // return a[0] > b[0] ? 1 : -1;
//}); //});
console.log(JSON.stringify(newData)) //console.log(JSON.stringify(newData))
return newData; return newData;
} }

View File

@@ -37,6 +37,13 @@ Partial Class General_RepIndicadorResumen
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click
CargaDatos() CargaDatos()
End Sub End Sub
Protected Sub LnkExportarPDF_Click(sender As Object, e As EventArgs) Handles LnkExportarPDF.Click
UPPMov.GenerarReportePDF("Reporte Resumen de Indicadores", TxtFechaI.Text, TxtFechaF.Text)
End Sub
'No quitar porque no funciona el exporta PDF
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
' Verifies that the control is rendered
End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
@@ -51,7 +58,7 @@ Partial Class General_RepIndicadorResumen
If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then
'Compras Productores 'Compras Productores
GvCompProductores.DataSource = ObjCitrus.DTSetResultados.Tables(0).FiltraParametros("", "RazonSocial DESC") GvCompProductores.DataSource = ObjCitrus.DTSetResultados.Tables(0).FiltraParametros("", "RazonSocial ASC")
'CxP Productores 'CxP Productores
GvCxP192.DataSource = ObjCitrus.DTSetResultados.Tables(1).FiltraParametros("", "CveMoneda,Saldo DESC") GvCxP192.DataSource = ObjCitrus.DTSetResultados.Tables(1).FiltraParametros("", "CveMoneda,Saldo DESC")
'CxP NO productores 'CxP NO productores
@@ -218,7 +225,7 @@ Partial Class General_RepIndicadorResumen
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
.Unidad = "MXN" .Unidad = "MXN"
}) })
Dim query_vxp = top_vxp.Union(group_resto_vxp) Dim query_vxp = top_vxp.Union(group_resto_vxp).OrderByDescending(Function(x) x.Valor)
'Dim query_vxp = top_vxp.Concat(From e In resto_vxp Group e By e.Texto Into gpo = Group) 'Dim query_vxp = top_vxp.Concat(From e In resto_vxp Group e By e.Texto Into gpo = Group)
'Dim group_resto_vxp = From e In resto_vxp Group e By e.Texto Into gpo = Group 'Dim group_resto_vxp = From e In resto_vxp Group e By e.Texto Into gpo = Group
'Dim group_resto_vxp = resto_vxp.GroupBy(Function(e) New With {Key e.Texto, Key e.Valor, Key e.Color, Key e.Unidad}).ToList() 'Dim group_resto_vxp = resto_vxp.GroupBy(Function(e) New With {Key e.Texto, Key e.Valor, Key e.Color, Key e.Unidad}).ToList()
@@ -248,7 +255,7 @@ Partial Class General_RepIndicadorResumen
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
.Unidad = "MXN" .Unidad = "MXN"
}) })
Dim query_comp_productores = top_comp_productores.Union(group_resto_comp_productores) Dim query_comp_productores = top_comp_productores.Union(group_resto_comp_productores).OrderByDescending(Function(x) x.Valor)
'Compras TipoProveedor=1 Acreedores (Gastos) 'Compras TipoProveedor=1 Acreedores (Gastos)
DtCompAcreed.Reset() DtCompAcreed.Reset()
@@ -277,7 +284,7 @@ Partial Class General_RepIndicadorResumen
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
.Unidad = "MXN" .Unidad = "MXN"
}) })
Dim query_comp_acreed = top_comp_acreed.Union(group_resto_comp_acreed) Dim query_comp_acreed = top_comp_acreed.Union(group_resto_comp_acreed).OrderByDescending(Function(x) x.Valor)
'Cuentas por cobrar x Cliente -- Saldo 'Cuentas por cobrar x Cliente -- Saldo
DtCxC.Reset() DtCxC.Reset()
@@ -306,7 +313,7 @@ Partial Class General_RepIndicadorResumen
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
.Unidad = "MXN" .Unidad = "MXN"
}) })
Dim query_cxc = top_cxc.Union(group_resto_cxc) Dim query_cxc = top_cxc.Union(group_resto_cxc) '.OrderByDescending(Function(x) x.Valor)
'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CxC.Rows)) 'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CxC.Rows))
'Cuentas por cobrar x Cliente -- Recuperado 'Cuentas por cobrar x Cliente -- Recuperado
@@ -336,7 +343,7 @@ Partial Class General_RepIndicadorResumen
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
.Unidad = "MXN" .Unidad = "MXN"
}) })
Dim query_cxcr = top_cxcr.Union(group_resto_cxcr) Dim query_cxcr = top_cxcr.Union(group_resto_cxcr) '.OrderByDescending(Function(x) x.Valor)
'CxP proveedores 'CxP proveedores
DtCxP192.Reset() DtCxP192.Reset()
@@ -365,7 +372,7 @@ Partial Class General_RepIndicadorResumen
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
.Unidad = "MXN" .Unidad = "MXN"
}) })
Dim query_cxp192 = top_cxp192.Union(group_resto_cxp192) Dim query_cxp192 = top_cxp192.Union(group_resto_cxp192).OrderByDescending(Function(x) x.Valor)
'CxP NO proveedor 'CxP NO proveedor
DtCxP.Reset() DtCxP.Reset()
@@ -394,7 +401,7 @@ Partial Class General_RepIndicadorResumen
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2), .Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
.Unidad = "MXN" .Unidad = "MXN"
}) })
Dim query_cxp = top_cxp.Union(group_resto_cxp) Dim query_cxp = top_cxp.Union(group_resto_cxp).OrderByDescending(Function(x) x.Valor)
'Serializar datos agrupándolos por su respectivo DataTable, todos en un solo JSON 'Serializar datos agrupándolos por su respectivo DataTable, todos en un solo JSON
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CompProductores = query_comp_productores, .CompAcreed = query_comp_acreed, .CxC = query_cxc, .CxCR = query_cxcr, .CxP192 = query_cxp192, .CxP = query_cxp}) Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CompProductores = query_comp_productores, .CompAcreed = query_comp_acreed, .CxC = query_cxc, .CxCR = query_cxcr, .CxP192 = query_cxp192, .CxP = query_cxp})

View File

@@ -48,6 +48,14 @@
Entrega Almacén (Surtir Mercancia) Entrega Almacén (Surtir Mercancia)
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel ID="uppCargaBitacora" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<li>
<asp:LinkButton ID="HplCargaBitacora" runat="server" Visible="false" OnClick="HplCargaBitacora_Click" Style="color: #686868;"><i class="fa fa-file-load-o" style="color: #686868;"></i> Cargar Bitácora</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li> <li>

View File

@@ -268,7 +268,30 @@ Partial Class Inventarios_EntregaAlmacen
ViewState("FormaPaqueteria") = value ViewState("FormaPaqueteria") = value
End Set End Set
End Property End Property
'Private Property IndexSeccionAlmacen As Integer
' Get
' Return CType(ViewState("IndexSeccionAlmacen"), Integer)
' End Get
' Set(value As Integer)
' ViewState("IndexSeccionAlmacen") = value
' End Set
'End Property
Private Property ArchivoBitacora As String
Get
Return CType(ViewState("ArchivoBitacora"), String)
End Get
Set(value As String)
ViewState("ArchivoBitacora") = value
End Set
End Property
Private Property ArchivoBitacoraDetalle As String
Get
Return CType(ViewState("ArchivoBitacoraDetalle"), String)
End Get
Set(value As String)
ViewState("ArchivoBitacoraDetalle") = value
End Set
End Property
#End Region #End Region
@@ -318,7 +341,10 @@ Partial Class Inventarios_EntregaAlmacen
DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
DdlAlmacen.SelectedValue = "-1" DdlAlmacen.SelectedValue = "-1"
DdlAlmacen.DataBind() DdlAlmacen.DataBind()
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) If UsuarioActual.CveAlmacen > 0 Then
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
RecargaporAlmacenes()
End If
DdlAlmacenTransitorio.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3) DdlAlmacenTransitorio.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3)
DdlAlmacenTransitorio.DataBind() DdlAlmacenTransitorio.DataBind()
@@ -551,6 +577,15 @@ Partial Class Inventarios_EntregaAlmacen
If ObjInventario.EntregaAlmacenGet(CveVenta, CveAlmacen) Then If ObjInventario.EntregaAlmacenGet(CveVenta, CveAlmacen) Then
If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
ArchivoBitacora = String.Format("{0}Temp\EntregaDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
If ArchivoBitacora <> "" Then
Dim Archivo = New System.IO.FileInfo(ArchivoBitacora)
If Archivo.Exists() Then
HplCargaBitacora.Visible = True
uppCargaBitacora.Update()
End If
End If
DtDatos = ObjInventario.DtResultados DtDatos = ObjInventario.DtResultados
If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer)) If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer))
@@ -1280,6 +1315,7 @@ Partial Class Inventarios_EntregaAlmacen
Row("FechaCaducidad") = If(AplicaCaducidad, TxtFechaCaducidad.Text, MinFecha.ToShortDateString) Row("FechaCaducidad") = If(AplicaCaducidad, TxtFechaCaducidad.Text, MinFecha.ToShortDateString)
DtDatosDetalle.Rows.Add(Row) DtDatosDetalle.Rows.Add(Row)
ActualizaBitacora()
RegistraScript("playsonidito('beep-07.wav')", "Sonidito") RegistraScript("playsonidito('beep-07.wav')", "Sonidito")
If Tipo = 1 Then If Tipo = 1 Then
@@ -1307,11 +1343,44 @@ Partial Class Inventarios_EntregaAlmacen
End Try End Try
DtDatosDetalle.AcceptChanges() DtDatosDetalle.AcceptChanges()
ActualizaBitacora()
CargaSerie() CargaSerie()
End Sub End Sub
#End Region #End Region
#Region "Bitacora"
Private Sub ActualizaBitacora(Optional Eliminar As Boolean = False)
If Not Eliminar Then
DtDatos.TableName = "DtDatos"
DtDatosDetalle.TableName = "DtDatosDetalle"
DtDatos.WriteXml(ArchivoBitacora, XmlWriteMode.WriteSchema)
DtDatosDetalle.WriteXml(ArchivoBitacoraDetalle, XmlWriteMode.WriteSchema)
Else
File.Delete(ArchivoBitacora)
End If
End Sub
Protected Sub HplCargaBitacora_Click(sender As Object, e As EventArgs)
If IO.File.Exists(ArchivoBitacora) Then
'DtInv.Clear()
'DtDatosDetalle.Clear()
DtDatos.ReadXml(ArchivoBitacora)
If IO.File.Exists(ArchivoBitacoraDetalle) Then
Dim dtt As New DataTable
dtt.ReadXml(ArchivoBitacoraDetalle)
DtDatosDetalle = dtt
Alert("Registro(s) Recuperados", TipoMensaje.ToastInformacion)
End If
CargaGvDatos()
Else
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
End If
End Sub
#End Region
#Region " AGREGA CON LOTE BATCH " #Region " AGREGA CON LOTE BATCH "
Private Sub CreaDtDetalleLote() Private Sub CreaDtDetalleLote()
@@ -3894,7 +3963,11 @@ Partial Class Inventarios_EntregaAlmacen
RegistraScript("$('#ModalVerSugerencias').modal('hide')") RegistraScript("$('#ModalVerSugerencias').modal('hide')")
End Sub End Sub
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacen.SelectedIndexChanged Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) 'Handles DdlAlmacen.SelectedIndexChanged
RecargaporAlmacenes()
End Sub
Private Sub RecargaporAlmacenes()
If DdlAlmacen.SelectedValue <> "-1" Then If DdlAlmacen.SelectedValue <> "-1" Then
CargaGvDatos(DdlAlmacen.SelectedValue.ToEntero) CargaGvDatos(DdlAlmacen.SelectedValue.ToEntero)
End If End If

View File

@@ -17,13 +17,15 @@
<li> <li>
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="true" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Cargar Excel</asp:HyperLink> <asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="true" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Cargar Excel</asp:HyperLink>
</li> </li>
<asp:UpdatePanel ID="uppCargaBitacora" runat="server" UpdateMode="Conditional" RenderMode="Inline"><ContentTemplate> <asp:UpdatePanel ID="uppCargaBitacora" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<li> <ContentTemplate>
<asp:Linkbutton ID="HplCargaBitacora" runat="server" Visible="false" OnClick="HplCargaBitacora_Click" Style="color: #686868;"><i class="fa fa-file-load-o" style="color: #686868;"></i> Cargar Bitácora</asp:Linkbutton> <li>
<asp:LinkButton ID="HplCargaBitacora" runat="server" Visible="false" OnClick="HplCargaBitacora_Click" Style="color: #686868;"><i class="fa fa-file-load-o" style="color: #686868;"></i> Cargar Bitácora</asp:LinkButton>
</li> </li>
</ContentTemplate></asp:UpdatePanel> </ContentTemplate>
</asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Recepción Almacén Recepción Almacén

View File

@@ -651,6 +651,24 @@
<asp:Literal ID="LtlTipodeSalario" runat="server" Text='<%# Eval("TipodeSalario") %>'></asp:Literal> <asp:Literal ID="LtlTipodeSalario" runat="server" Text='<%# Eval("TipodeSalario") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" Visible="false">
<HeaderTemplate>Banco</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlBanco" runat="server" Text='<%# Eval("BancoNombre") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" Visible="false">
<HeaderTemplate>Cuenta Bancaria</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCuentaBancaria" runat="server" Text='<%# Eval("CuentaBancaria") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" Visible="false">
<HeaderTemplate>CLABE</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCLABE" runat="server" Text='<%# Eval("CLABE") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />
@@ -832,6 +850,17 @@
<div class="col-md-3"> <div class="col-md-3">
<asp:CheckBox ID="ChkTipodeSalario" runat="server" Text="Tipo de salario" /> <asp:CheckBox ID="ChkTipodeSalario" runat="server" Text="Tipo de salario" />
</div> </div>
</div>
<div class="row">
<div class="col-md-3">
<asp:CheckBox ID="ChkBanco" runat="server" Text="Banco" />
</div>
<div class="col-md-3">
<asp:CheckBox ID="ChkCuentaBancaria" runat="server" Text="Cuenta Bancaria" />
</div>
<div class="col-md-3">
<asp:CheckBox ID="ChkCLABE" runat="server" Text="CLABE" />
</div>
</div> </div>
</div> </div>

View File

@@ -2,6 +2,7 @@
Option Strict On Option Strict On
Imports System.Data Imports System.Data
Imports CFDI_GenCodigo
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
@@ -605,6 +606,9 @@ Partial Class RH_CatPersonal
Else Else
GvDatos.Columns(45).Visible = False GvDatos.Columns(45).Visible = False
End If End If
GvDatos.Columns(46).Visible = ChkBanco.Checked
GvDatos.Columns(47).Visible = ChkCuentaBancaria.Checked
GvDatos.Columns(48).Visible = ChkClaBE.Checked
If (GvDatos.Rows.Count > 0) Then If (GvDatos.Rows.Count > 0) Then

View File

@@ -1,4 +1,4 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatAutorizacionLimites.aspx.vb" Inherits="Ventas_CatAutorizacionLimites" %> <%@ Page Title="" Language="VB" EnableEventValidation="false" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatAutorizacionLimites.aspx.vb" Inherits="Ventas_CatAutorizacionLimites" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
@@ -22,9 +22,13 @@
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i>Agregar autorización</asp:LinkButton></li> <asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i>Agregar autorización</asp:LinkButton>
</li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<li>
<asp:LinkButton ID="LnkExportarExcel" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Exportar Excel</asp:LinkButton>
</li>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -336,4 +336,33 @@ Partial Class Ventas_CatAutorizacionLimites
End Select End Select
UpModal.Update() UpModal.Update()
End Sub End Sub
#Region " EXPORTA EXCEL "
Protected Sub LnkExportarExcel_Click(sender As Object, e As EventArgs) Handles LnkExportarExcel.Click
If GvDatos.Rows.Count <= 0 Then
Alert("No hay registros para exportar. Por favor modifique su consulta.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim StrFiltro As New StringBuilder
StrFiltro.AppendFormat("Filtro: ")
StrFiltro.AppendFormat("Estatus: {0}, ", DdlEstatus.SelectedItem)
StrFiltro.AppendFormat("Cliente: {0}, ", IIf(DdlClienteFiltro.SelectedText <> "", DdlClienteFiltro.SelectedText, "Todos"))
StrFiltro.AppendFormat("Vendedor: {0}, ", DdlVendedorFiltro.SelectedItem)
StrFiltro.AppendFormat("Fecha Inicio: {0}", txtFechaI.Text.ToDate.ToString("dd/MM/yyyy"))
'If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(", Fecha Fin: {0}", txtFechaF.Text.ToDate.ToString("dd/MM/yyyy"))
Dim fechaFin As String = IIf(txtFechaF.Text <> "", txtFechaF.Text.ToDate.ToString("dd/MM/yyyy"), Now.ToString("dd/MM/yyyy"))
StrFiltro.AppendFormat(", Fecha Fin: {0}", fechaFin)
'Oculta columnas en export sin afectar GridView en página
Dim tcols = GvDatos.Columns.Count
GvDatos.HeaderRow.Cells(tcols - 2).Visible = False 'Autorizar/Rechazar
GvDatos.HeaderRow.Cells(tcols - 1).Visible = False 'Eliminar
GvDatos.ExportToExcelGembox("CatAutorizacionLimites " & txtFechaI.Text.ToDate.ToString("dd-MM-yyyy") + " a " & fechaFin.ToDate.ToString("dd-MM-yyyy"), UsuarioActual, "Catálogo de autorizaciones de límite de crédito", DatosFiltros:=StrFiltro.ToString())
End Sub
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
End Sub
#End Region
End Class End Class