diff --git a/App_Code/ClsExportaciones.vb b/App_Code/ClsExportaciones.vb index ea59fddc9..facc2c19b 100644 --- a/App_Code/ClsExportaciones.vb +++ b/App_Code/ClsExportaciones.vb @@ -351,13 +351,14 @@ Public Class ClsExportaciones Return Retorno End Function - Public Function AddPartida(CvePS As Integer, CveUnidadMedida As Integer, Precio As Decimal, CveEmpresa As Integer, CveUsuario As Integer, CveExportacion As Integer, Cantidad As Decimal, + Public Function AddPartida(CvePS As Integer, CveUnidadMedida As Integer, CveTipoEmpaque As Integer, Precio As Decimal, CveEmpresa As Integer, CveUsuario As Integer, CveExportacion As Integer, Cantidad As Decimal, PesoUnitario As Decimal, CvePais As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Exp_ExportacionesDetalleAdd") With SqlAdapter.SelectCommand.Parameters .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida + .Add("@CveTipoEmpaque", SqlDbType.Int).Value = CveTipoEmpaque .Add("@Precio", SqlDbType.Decimal).Value = Precio .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario @@ -378,7 +379,7 @@ Public Class ClsExportaciones Return Retorno End Function - Public Function UpdatePartida(CveExportacionDetalle As Integer, CvePS As Integer, CveUnidadMedida As Integer, Precio As Decimal, CveUsuario As Integer, Cantidad As Decimal, + Public Function UpdatePartida(CveExportacionDetalle As Integer, CvePS As Integer, CveUnidadMedida As Integer, CveTipoEmpaque As Integer, Precio As Decimal, CveUsuario As Integer, Cantidad As Decimal, PesoUnitario As Decimal, CvePais As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Exp_ExportacionesDetalleUpdate") @@ -386,6 +387,7 @@ Public Class ClsExportaciones .Add("@CveExportacionDetalle", SqlDbType.Int).Value = CveExportacionDetalle .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida + .Add("@CveTipoEmpaque", SqlDbType.Int).Value = CveTipoEmpaque .Add("@Precio", SqlDbType.Decimal).Value = Precio .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 65e819be0..e55dcc59d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7641,6 +7641,28 @@ Public Class ClsPaginas Return Nothing End If + 'SOLO FORMATO DE STIMULSOFT Y COMPLEMENTO DE SERVICIOS DE CONSTRUCCION + If UsuarioActual.Empresa.Funcionalidad(707) = "1" AndAlso Vta.CveComplementoTimbrado = 9 AndAlso Not String.IsNullOrEmpty(Vta.ComplementoSAT) Then + Dim settings As New JsonSerializerSettings + settings.NullValueHandling = NullValueHandling.Ignore + Dim pc As Modelos.MParcialesConstruccion = JsonConvert.DeserializeObject(Of Modelos.MParcialesConstruccion)(Vta.ComplementoSAT, settings) + + If pc IsNot Nothing Then + params.Add(New ReportParameter("SC_NumPerLicoAut", pc.NumPerLicoAut)) + params.Add(New ReportParameter("SC_Calle", pc.Calle)) + params.Add(New ReportParameter("SC_NoExterior", pc.NoExterior)) + params.Add(New ReportParameter("SC_NoInterior", pc.NoInterior)) + params.Add(New ReportParameter("SC_Colonia", pc.Colonia)) + params.Add(New ReportParameter("SC_Localidad", pc.Localidad)) + params.Add(New ReportParameter("SC_Referencia", pc.Referencia)) + params.Add(New ReportParameter("SC_Municipio", pc.Municipio)) + Dim Estado = GlobalDTGralEstados("MEX").FiltroPrimeroValor("NombreEstado", $"CveEstado = {pc.CveEstado}") + params.Add(New ReportParameter("SC_Estado", Estado)) + params.Add(New ReportParameter("SC_CodigoEstado", pc.Estado)) + params.Add(New ReportParameter("SC_CodigoPostal", pc.CodigoPostal)) + End If + End If + If NombreArchivo = "FacturaUSA" Then Dim DtBaseTotales As DataTable = Vta.DtDeduccion.Clone() @@ -7868,7 +7890,7 @@ Public Class ClsPaginas If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then RutaReporte = String.Format("{0}{1}", bdir, RutaReporte) End If - Dim urlHost As String = "http://sig.adssistemas.mx:7998/" + Dim urlHost As String = "http: //sig.adssistemas.mx:7998/" 'Dim urlHost As String = "http://localhost:2202/" If EsProduccion Then urlHost = "http://192.200.113.178:6599/" diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index a22fce440..1d32535fd 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -325,6 +325,26 @@ Public Class ClsProductosServicios Return Retorno End Function + + Public Function GetPS_APIMarcasStock(CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Inv_APIMarcasStockGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al consultar el stock.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function GetPSSimplificado(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 8ed054aa6..4b11792f3 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1570,6 +1570,25 @@ Public Class ClsVentas Return Retorno End Function + + Public Function GetVentaDetallePreciosLista(CveVenta As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentasDetallePreciosListaGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los precios de lista en los productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function AddVentaDetalle(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, CveUnidadMedida As Integer, PU As Decimal, IVA As Decimal, Total As Decimal, Observaciones As String, Descuento As Decimal, TipoDescuento As Integer, CveSubProyecto As Integer, CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1, diff --git a/Ashx/E189.ashx b/Ashx/E189.ashx new file mode 100644 index 000000000..013be2e57 --- /dev/null +++ b/Ashx/E189.ashx @@ -0,0 +1,219 @@ +<%@ WebHandler Language="VB" Class="E189" %> + +Option Strict On +Option Explicit On + +Imports System.Data +Imports System.IO +Imports Newtonsoft.Json +Imports Newtonsoft.Json.Linq +Imports Extensiones + +Public Class E189 : Implements IHttpHandler, System.Web.SessionState.IRequiresSessionState + + Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable + Get + Return False + End Get + End Property + + Private ReadOnly Property CveEmpresa As Integer = 189 + Private ReadOnly Property CveUsuario As Integer = 100 + Private ReadOnly Property NombreCadena As String = "Conexion" + + Public ReadOnly Property EsProduccion As Boolean + Get + If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then + Return False + Else + Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1") + End If + End Get + End Property + + +#Region "V A L I D A - D A T O S" + Private Function ValidaUsuarioSistema(CveUsuario As Integer, CveEmpresa As Integer) As Usuario + Dim UsuarioActual As Usuario = Nothing + Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexion(CveEmpresa) + Dim ObjUsuarios As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena) + UsuarioActual = ObjUsuarios.GetUsuarioDetalle(100, CveEmpresa) + If UsuarioActual IsNot Nothing Then + HttpContext.Current.Session("UsuarioSIG") = UsuarioActual + 'CreaObjetoEmpresa(UsuarioActual) + End If + ObjUsuarios.Dispose() + + Return UsuarioActual + End Function + + 'Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario) + ' Dim ObjEmpresa As New ClsSisEmpresas() + ' If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then + ' If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then + ' Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados + + ' Dim EmpresasFuncionalidades As New HybridDictionary + ' For Each Row As Data.DataRow In dttmp.Rows + ' EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString) + ' Next + ' ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades) + ' End If + + ' UsuarioActual.Empresa = ObjEmpresa.Empresa + + ' End If + ' ObjEmpresa.Dispose() + 'End Sub +#End Region + + Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest + Dim retorno As String = "" + Dim MsgLog As New StringBuilder + MsgLog.AppendLine("Inicia Petición.") + Try + Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString()) + MsgLog.AppendLine(Metodo) + + If Metodo = "Stock" Then + context.Response.ContentType = "application/json" + retorno = ConsultaDatos(context) + End If + + context.Response.Write(retorno) + + Catch ex As Exception + context.Response.ContentType = "text/html" + MsgLog.AppendLine("Error de procesamiento:" & ex.Message) + + Dim respuesta As New AuthMessage + respuesta.ErrorMessage = New ResponseMsgError() With {.message = "La solicitud no se pudo procesar."} + respuesta.IsSuccess = False + respuesta.StatusCode = 200 + retorno = JsonConvert.SerializeObject(respuesta.ErrorMessage) + context.Response.Write(retorno) + + End Try + MsgLog.ToString.GuardaLogAD("LogE119") + End Sub + + + Private Function ConsultaDatos(ByVal context As HttpContext) As String + + Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa) + + Dim Respuesta As New ResponseMsg + Dim RespuestaError As New ResponseMsgError + Dim TieneError As Boolean = False + + Dim productos As JArray = Nothing + + Using ObjInventario As New ClsProductosServicios() + If ObjInventario.GetPS_APIMarcasStock(CveEmpresa) AndAlso ObjInventario.DtResultados IsNot Nothing Then + productos = JArray.Parse(ObjInventario.DtResultados.DataTableToJSONIPP()) + Else + RespuestaError.message = "no se pudo obtener los datos" + TieneError = True + End If + End Using + + If TieneError Then + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(RespuestaError) + Else + context.Response.StatusCode = 200 + Try + Return New JObject(New JProperty("productos", productos)).ToString() + Catch ex As Exception + RespuestaError.message = "Ocurrió un error al generar la petición" + Return JsonConvert.SerializeObject(RespuestaError) + End Try + + End If + End Function + + + + Private Class ResponseMsg + Sub New() + status = "success" + End Sub + Public Property status As String + Public Property data As Object + Public Property message As String + End Class + + Private Class ResponseMsgError + Sub New() + status = "error" + End Sub + Public Property status As String + Public Property message As String + End Class + + Private Class AuthMessage + Public Property IsSuccess As Boolean + Public Property ErrorMessage As ResponseMsgError + Public Property StatusCode As Integer + End Class + + 'Private Function ActualizarExistenciasJson(Todos As Boolean) As String + ' Dim payload = New JObject() + + ' Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0 + + ' Dim DtPS As DataTable = Nothing + ' Using ObjPS As New ClsProductosServicios + ' If ObjPS.GetExistenciasEmpresa("-1", CveEmpresa) Then + ' DtPS = ObjPS.DtResultados.Copy() + ' End If + ' End Using + + ' If DtPS IsNot Nothing Then + ' payload.Add(New JProperty("stock", GenerarPayloadExistencias(DtPS))) + ' End If + + ' Return payload.ToString() + 'End Function + + + + Private Function Parametros(Cadena As String) As Hashtable + Dim P1() As String = Cadena.Split("&"c) + Dim Tmp As String + Dim P2() As String + + Dim URLParametros As New Hashtable + + For Each Tmp In P1 + P2 = Tmp.Replace("%26%", "&").Split("="c) + URLParametros.Add(P2(0).ToString.ToUpper, P2(1)) + Next + Return URLParametros + End Function + + Private Shared Function IsValidJson(ByVal strInput As String) As Boolean + If String.IsNullOrWhiteSpace(strInput) Then + Return False + End If + + strInput = strInput.Trim() + + If (strInput.StartsWith("{") AndAlso strInput.EndsWith("}")) OrElse (strInput.StartsWith("[") AndAlso strInput.EndsWith("]")) Then + + Try + Dim obj As JToken = JToken.Parse(strInput) + Return True + Catch jex As JsonReaderException + Console.WriteLine(jex.Message) + Return False + Catch ex As Exception + Console.WriteLine(ex.ToString()) + Return False + End Try + Else + Return False + End If + End Function + +End Class \ No newline at end of file diff --git a/Bancos/CuentasBancariasDetalle.aspx.vb b/Bancos/CuentasBancariasDetalle.aspx.vb index 83eec7caa..02e5228f9 100644 --- a/Bancos/CuentasBancariasDetalle.aspx.vb +++ b/Bancos/CuentasBancariasDetalle.aspx.vb @@ -138,20 +138,21 @@ Partial Class Bancos_CuentasBancariasDetalle Using ObjContabilidad As New ClsContabilidad 'UsuarioActual.Empresa.Funcionalidad(208).ToEntero If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then - DDlCuentaContable.DataSource = ObjContabilidad.DtResultados + dt = ObjContabilidad.DtResultados.Copy() + + DDlCuentaContable.DataSource = dt DDlCuentaContable.DataBind() - DDlCuentaContable.Items.Insert(0, New ListItem("Selecione", "-1")) - DDlCuentaContable.DataTextField = "CtaCodigo" - DDlCuentaContable.DataValueField = "CveCuenta" + DDlCuentaContable.Items.Insert(0, New ListItem("-", "-1")) + 'DDlCuentaContable.DataTextField = "CtaCodigo" + 'DDlCuentaContable.DataValueField = "CveCuenta" End If End Using - DDlCuentaContable.DataSource = dt - DDlCuentaContable.DataBind() - DDlCuentaContable.Items.Insert(0, New ListItem("-", "-1")) + DdlCuentaContableComplementaria.DataSource = dt DdlCuentaContableComplementaria.DataBind() DdlCuentaContableComplementaria.Items.Insert(0, New ListItem("-", "-1")) + If dt IsNot Nothing Then dt.Dispose() trCuentaContable.Visible = True trCuentaContableComplementaria.Visible = True @@ -235,7 +236,7 @@ Partial Class Bancos_CuentasBancariasDetalle TxtNumeroSucursal.Text = ObjCuentasBancariasDetalle.NumeroSucursal - If UsuarioActual.Empresa.TipoContabilizacion = 1 Then + If UsuarioActual.Empresa.TipoContabilidad = 1 Then DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaConta.ToString) DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaContaComplementaria.ToString) Else diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 6d6c56058..e8ae23cd2 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -1518,7 +1518,7 @@ Partial Class Compras_eFacturas If dt IsNot Nothing Then - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") + Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}Logo.png") Dim params As New List(Of ReportParameter) @@ -1529,7 +1529,7 @@ Partial Class Compras_eFacturas params.Add(New ReportParameter("FechaImpresion", Fecha.ToDateTime.ToShortDateString)) If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", $"file//:{Imagen.FullName}")) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If diff --git a/Empresas/Grales/Formatos/RepFacturas.rdlc b/Empresas/Grales/Formatos/RepFacturas.rdlc index 41722835f..44a646ecf 100644 --- a/Empresas/Grales/Formatos/RepFacturas.rdlc +++ b/Empresas/Grales/Formatos/RepFacturas.rdlc @@ -1,967 +1,5 @@  - - - - - - - - - - - true - true - - - - - Tipo - - - - - - - Textbox3 - - - - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio - - - - - - - Textbox28 - - - - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - 1.70632cm - - - 6.55172cm - - - 1.87355cm - - - 1.67935cm - - - 5.52508cm - - - - - 0.33542cm - - - - - true - true - - - - - =Fields!FechaFactura.Value - - - - - - - FechaFactura - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!NombreProveedor.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - Total - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Switch(Fields!FueValidado.Value = "1","Validado", -Fields!FueValidado.Value = "2","Cancelada", -Fields!FueValidado.Value = "3","Omitida", -1=1,"No validado") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UUID.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 0.44125cm - - - true - true - - - - - Fecha Fact. - - - - - - - Textbox40 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - true - true - - - - - Proveedor - - - - - - - Textbox42 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - true - true - - - - - Importe - - - - - - - Textbox44 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - true - true - - - - - EstatusSAT - - - - - - - Textbox49 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox4 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - =Fields!SerieFolio.Value - - - - - =Fields!FechaFactura.Value - - - =Fields!SerieFolio.Value - - - - 1.30938cm - - - true - true - - - - - =Switch(Fields!TipoComprobante.Value="I","Ingreso", -Fields!TipoComprobante.Value="E","Egreso", -Fields!TipoComprobante.Value="P","Pago" -) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1.96039cm - - - true - true - - - - - =Fields!SerieFolio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - DataSet1 - 0.06614cm - 0.77667cm - 20.60579cm - - - - - - 0.35786in - - - - - - - Textbox1 - 0.18521cm - 3.4699cm - 0.6cm - 12.60299cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE FACTURAS - - - - - - - - - - - - - - - - Textbox2 - 1.10271cm - 4.76092cm - 0.52945cm - 9.98771cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Inicio: - - - - - - - - - =IIF(Parameters!FechaInicio.Value = "-1","",Parameters!FechaInicio.Value) - - - - - - - - - - - - - - - Fecha Fin: - - - - - - - - - =IIF(Parameters!FechaFin.Value = "-1","",Parameters!FechaFin.Value) - - - - Textbox13 - 0.0259cm - 17.07478cm - 2.18834cm - 3.53188cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.06614cm - 2.22362cm - 2.33715cm - 3 - - - - - - - - - - - 0.76376cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 18.56637cm - 0.68085cm - 2.06587cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0cm - 0cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox3 + + + + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio + + + + + + + Textbox28 + + + + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 1.41528cm + + + 6.55172cm + + + 1.87355cm + + + 1.2cm + + + 1.5cm + + + 5.14577cm + + + + + 0.33542cm + + + + + true + true + + + + + =Fields!FechaFactura.Value + + + + + + + FechaFactura + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NombreProveedor.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Abreviatura.Value + + + + + + + Abreviatura + + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + true + true + + + + + =Switch(Fields!FueValidado.Value = "1","Validado", +Fields!FueValidado.Value = "2","Cancelada", +Fields!FueValidado.Value = "3","Omitida", +1=1,"No validado") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UUID.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 0.44125cm + + + true + true + + + + + Fecha + + + + + + + + + Fact. + + + + + + + Textbox40 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + true + true + + + + + Proveedor + + + + + + + Textbox42 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + true + true + + + + + Importe + + + + + + + Textbox44 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + true + true + + + + + Moneda + + + + + + + Textbox5 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + true + true + + + + + Estatus + + + + + + + + + SAT + + + + + + + Textbox49 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox4 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + =Fields!SerieFolio.Value + + + + + =Fields!FechaFactura.Value + + + =Fields!SerieFolio.Value + + + + 1.25012cm + + + true + true + + + + + =Switch(Fields!TipoComprobante.Value="I","Ingreso", +Fields!TipoComprobante.Value="E","Egreso", +Fields!TipoComprobante.Value="P","Pago" +) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 1.96039cm + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + DataSet1 + 0.06614cm + 0.77667cm + 20.89683cm + + + + + + 0.35786in + + + + + + + Textbox1 + 0.18521cm + 3.4699cm + 0.6cm + 12.60299cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE FACTURAS + + + + + + + + + + + + + + + + Textbox2 + 1.10271cm + 4.76092cm + 0.52945cm + 9.98771cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Inicio: + + + + + + + + + =IIF(Parameters!FechaInicio.Value = "-1","",Parameters!FechaInicio.Value) + + + + + + + + + + + + + + + Fecha Fin: + + + + + + + + + =IIF(Parameters!FechaFin.Value = "-1","",Parameters!FechaFin.Value) + + + + Textbox13 + 0.0259cm + 17.07478cm + 2.18834cm + 3.53188cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 3 + + + + + + + + + + + 0.76376cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0cm + 18.56637cm + 0.68085cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0cm + 0cm + 1cm + 1cm + 0.13cm + @@ -148,11 +163,11 @@ - + - + - > + @@ -224,14 +239,28 @@ - + - - - - - - + + + +   + + diff --git a/Export/RepExportaciones.aspx.cs b/Export/RepExportaciones.aspx.cs index d6977de3a..a93dfa6a8 100644 --- a/Export/RepExportaciones.aspx.cs +++ b/Export/RepExportaciones.aspx.cs @@ -28,7 +28,7 @@ public partial class Export_RepExportaciones : ClsPaginas private bool EsImportacion { - get{ return (ViewState["EsImportacion"] == null) ? false : Boolean.Parse(ViewState["EsImportacion"].ToString()); } + get { return (ViewState["EsImportacion"] == null) ? false : Boolean.Parse(ViewState["EsImportacion"].ToString()); } set { ViewState["EsImportacion"] = value; } } public string EmptyDataTextPersonalizado { get; set; } @@ -43,7 +43,7 @@ public partial class Export_RepExportaciones : ClsPaginas if (Request["Opcion"] != null) { if (Request["Opcion"] == "I") - EsImportacion = true; + EsImportacion = true; } Page.Title = EsImportacion ? "Importaciones" : "Exportaciones"; @@ -86,7 +86,7 @@ public partial class Export_RepExportaciones : ClsPaginas } protected void CargaExportaciones() { - + bool EsExportacion = !EsImportacion; string SubProyectos = DdlSubProyecto.GetSelectedValuesM(); SubProyectos = SubProyectos == "" ? "-1" : SubProyectos; @@ -125,4 +125,76 @@ public partial class Export_RepExportaciones : ClsPaginas Alert("La Exportación se ha eliminado correctamente."); } } -} \ No newline at end of file + + protected void GVExportaciones_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + var dataItem = (System.Data.DataRowView)e.Row.DataItem; + int cveExportacion = Convert.ToInt32(dataItem["CveExportacion"]); + HyperLink hl = (HyperLink)e.Row.FindControl("HlExpDetalle"); + + // Usa la bandera EsImportacion de la página + if (EsImportacion) + hl.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}&Opcion=I"; + else + hl.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}"; + + // EDITAR + HyperLink hlEditar = (HyperLink)e.Row.FindControl("HlEditar"); + if (EsImportacion) + hlEditar.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}&Opcion=I"; + else + hlEditar.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}"; + + // Tipo Exportación + Label lblTipoExp = (Label)e.Row.FindControl("lblTipoExp"); + if (lblTipoExp != null) + { + string valor = dataItem["TipoExportacion"].ToString(); + switch (valor) + { + case "1": + lblTipoExp.Text = "(IMP) Importación"; + break; + case "2": + lblTipoExp.Text = "(EXP) Exportación/retorno"; + break; + case "3": + lblTipoExp.Text = "(TRA) Tránsitos"; + break; + default: + lblTipoExp.Text = "Desconocido"; + break; + } + } + + // Estatus + Label lblEstatus = (Label)e.Row.FindControl("lblEstatus"); + if (lblEstatus != null) + { + string valor = dataItem["CveExportacionEstatus"].ToString(); + switch (valor) + { + case "1": + lblEstatus.Text = "Tránsito"; + break; + case "2": + lblEstatus.Text = "Completa"; + break; + default: + lblEstatus.Text = "Desconocido"; + break; + } + } + } + } + protected void GVExportaciones_RowCreated(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.Header) + { + // Cambia el texto del primer encabezado (ajusta el índice si no es la primera columna) + e.Row.Cells[0].Text = EsImportacion ? "Importación" : "Exportación"; + } + } +} diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx index ce6321aff..94fae70d0 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx +++ b/Inventarios/KardexAlmacenHorizontal.aspx @@ -139,48 +139,51 @@ left: 120px; } */ - -/*Begin ScrollADS V2*/ -.divContainerads { - width: 100%; - max-height: calc(100vh - 260px); - overflow-y: auto; -} -table.adssigscroll { - min-width: 100%; - background-color: #fff; -} - table.adssigscroll tbody, table.adssigscroll thead { - background-color: #fff; - } + /*Begin ScrollADS V2*/ - table.adssigscroll tr { - background-color: inherit; - } - - table.adssigscroll tr.stickyRow { - position: sticky; - top: 0; /* Se mantiene pegado en la parte superior */ - background-color: inherit; /* Para que no se superponga con otros elementos */ - z-index: 4; /* Asegura que esté sobre otros elementos */ + .divContainerads { + width: 100%; + max-height: calc(100vh - 260px); + overflow-y: auto; } -.adssigrid-order tr > th::after { - content: "\f0dc"; - font:normal normal normal 14px / 1 FontAwesome; - display: inline-block; - margin-left: 5px; - color: #32A1CF; -} -.adssigrid-order tr > th.asce::after { - content: "\f0de"; -} -.adssigrid-order tr > th.desc::after { - content: "\f0dd"; -} + table.adssigscroll { + min-width: 100%; + background-color: #fff; + } + + table.adssigscroll tbody, table.adssigscroll thead { + background-color: #fff; + } + + table.adssigscroll tr { + background-color: inherit; + } + + table.adssigscroll tr.stickyRow { + position: sticky; + top: 0; /* Se mantiene pegado en la parte superior */ + background-color: inherit; /* Para que no se superponga con otros elementos */ + z-index: 4; /* Asegura que esté sobre otros elementos */ + } + + .adssigrid-order tr > th::after { + content: "\f0dc"; + font: normal normal normal 14px / 1 FontAwesome; + display: inline-block; + margin-left: 5px; + color: #32A1CF; + } + + .adssigrid-order tr > th.asce::after { + content: "\f0de"; + } + + .adssigrid-order tr > th.desc::after { + content: "\f0dd"; + } /*END ScrollADS V2*/ - @@ -221,17 +224,25 @@ table.adssigscroll {
-
-
Proveedor
-
+
+
+
Proveedor
- -
+
+
Producto
- -
+
+
Existencia
+ + + + + +
+
+
Fecha Fin
@@ -243,15 +254,8 @@ table.adssigscroll {
- -
- - - - -
- -
+
+
Ver por
@@ -261,51 +265,60 @@ table.adssigscroll {
> -
- -
- +
+
+
Clasificación
+
- -
- + + - -
- - <%----%> -
- -
- + +
+
Tipo Almacen
+
- -
+ +
+
Incluir Proyectados
+ + + + + + +
+
+
Tránsito?
- <%----%> +
+
+
Almacén
+
- - -
- +
+
Producto
+
- Orden: -
+
+
Orden
@@ -314,32 +327,16 @@ table.adssigscroll {
-
-
- Marca: -
- - - -
-
-
- -
- - - - - - + +
+
Marca
+ + +
+ - -
- - -
@@ -352,8 +349,8 @@ table.adssigscroll {
- + diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index 39b1117ca..f543c7a54 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -184,7 +184,7 @@ Partial Class Inventarios_KardexAlmacenHorizontal dt = ObjMovimientos.DtResultados Dim ListaBorrar As New List(Of DataColumn) - If Not TienePermisoImportes AndAlso DdlExistencia.SelectedValue.ToEntero = 2 Then + If Not TienePermisoImportes AndAlso DdlExistencia.SelectedValue.ToEntero().Contiene(2, 4) Then dt.Columns.RemoveAt(dt.Columns.Count - 2) 'CP-quito columna de importe total dt.Columns.RemoveAt(dt.Columns.Count - 2) 'Valor-quito columna de importe total End If @@ -247,17 +247,21 @@ Partial Class Inventarios_KardexAlmacenHorizontal 'Dim Liga As String = String.Format($"/Inventarios/Kardex.aspx?CvePS={ddlProducto2.SelectedValue.ToEntero}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CveUM={DdlUnidadMedida.SelectedValue.ToEntero}&FechaI={TxtFechaI.Text}&FechaF={TxtFechaF.Text}") 'e.Row.FCHyperLink("HplAlmacen").NavigateUrl = Liga - If e.Row.RowIndex = 0 Then + If e.Row.RowIndex = 0 AndAlso DdlExistencia.SelectedValue.ToEntero().Contiene(2, 4) Then e.Row.CssClass = "Totales" End If - 'e.Row.Attributes.Add("style", " max-height:31px!important") - e.Row.HorizontalAlign = HorizontalAlign.Right - e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left - e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left - e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left + If DdlExistencia.SelectedValue.ToEntero = 3 Then + e.Row.HorizontalAlign = HorizontalAlign.Left + Else + e.Row.HorizontalAlign = HorizontalAlign.Right + e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left + e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left + e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left + End If + Dim Index As Integer = 0 For Each Cells As TableCell In e.Row.Cells @@ -315,17 +319,15 @@ Partial Class Inventarios_KardexAlmacenHorizontal 'Escondo CvePS y CveAlmacén (Se generan por autogeneratecolumns por eso se borran por aqui). ' e.Row.Cells(0).Width = New Unit("200px") - - If DdlExistencia.SelectedValue.ToEntero = 2 Then + If DdlExistencia.SelectedValue.ToEntero.Contiene(2, 3, 4) Then Try + If DdlExistencia.SelectedValue.ToEntero = 3 Then + e.Row.Cells(1).Visible = False + End If e.Row.Cells(2).Visible = False e.Row.Cells(3).Visible = False Catch ex As Exception - End Try - - Else - e.Row.Cells(0).Visible = False End If If e.Row.RowType = DataControlRowType.Header Then @@ -334,7 +336,6 @@ Partial Class Inventarios_KardexAlmacenHorizontal End Sub Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - Imprimir("Excel") End Sub Private Sub Imprimir(Optional reporte As String = "PDF") diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 8ea08208b..ac434e9b8 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -9814,26 +9814,6 @@ public partial class Nomina_Nomina2 : ClsPaginas script = string.Format("Savexml(\"{0} {1}.xml\", $('.ltlxml').html());", Xmlname, empleado); - //System.IO.FileInfo file = new System.IO.FileInfo(PathXML); - //string mimeType = "text/plain"; - //try - //{ - // mimeType = MimeMapping.GetMimeMapping(PathXML); - //} - //catch (Exception) - //{ - - //} - //// Response.Write(path) - //Response.Clear(); - //Response.ClearHeaders(); - //Response.ClearContent(); - //Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}"); - //Response.AddHeader("Content-Length", file.Length.ToString()); - //Response.ContentType = mimeType; - //Response.Flush(); - //Response.TransmitFile(file.FullName); - //Response.End(); } if (!string.IsNullOrEmpty(PathXMLF) && System.IO.File.Exists(PathXMLF)) { diff --git a/Nomina/RepMovtosPermanentes.aspx b/Nomina/RepMovtosPermanentes.aspx index 40e85b556..6a0d0edf2 100644 --- a/Nomina/RepMovtosPermanentes.aspx +++ b/Nomina/RepMovtosPermanentes.aspx @@ -4,10 +4,6 @@