diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index eb72516a0..72e96b468 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6180,6 +6180,7 @@ Public Class ClsPaginas Dim ConfATR1 As String = "" Dim ConfATR2 As String = "" Dim ObjInv As New ClsGenerales + Dim TelDestino As String = "" If ObjInv.GetGralTimbre(CveTimbre, "-1", MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1) Then If ObjInv.DtResultados.Rows.Count > 0 Then @@ -6188,6 +6189,7 @@ Public Class ClsPaginas SerieFolio = Dr("SerieFolio").ToString Telefono = Dr("FiguraTelefono").ToString TipoDocto = Dr("TipoDocto").ToString + TelDestino = Dr("TelDestino").ToString If UsuarioActual.CveEmpresa = 13 Then PermisoSCTR1 = Dr("PermisoSCTR1").ToString @@ -6562,6 +6564,7 @@ Public Class ClsPaginas ImgCBB = "" End If + 'Dim bCBB As Byte() = qrCode.GenerarQrCode($"{ClsPaginas.LigaVerificacionSATCCP}?IdCCP={cfdi.CfdiInfo.IdCCP}&FechaOrig={Carta.Ubicaciones(0).FechaHoraSalidaLlegada}&FechaTimb={cfdi.CfdiInfo.FechaTimbrado}") ImagenCCP = New System.IO.FileInfo(RutaCCP) If ImagenCCP.Exists Then ImgCCP = String.Format("file://{0}", ImagenCCP.FullName) @@ -6629,6 +6632,10 @@ Public Class ClsPaginas params.Add(New ReportParameter("imprmirNom043", If(imprmirNom043, "1", "0"))) + If imprmirNom043 Then + params.Add(New ReportParameter("TelDestino", TelDestino)) + End If + If UsuarioActual.CveEmpresa = 13 Then params.Add(New ReportParameter("PermisoSCTRemolque1", PermisoSCTR1)) params.Add(New ReportParameter("PermisoSCTRemolque2", PermisoSCTR2)) diff --git a/Ashx/E140.ashx b/Ashx/E140.ashx index 25a99bd7f..1ad9449bc 100644 --- a/Ashx/E140.ashx +++ b/Ashx/E140.ashx @@ -6,6 +6,7 @@ Imports System.Data Imports Newtonsoft.Json Imports Extensiones Imports System.IO +Imports Newtonsoft.Json.Linq Imports Microsoft.Reporting.WebForms Public Class E140 : Implements IHttpHandler, IRequiresSessionState @@ -14,18 +15,325 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState Return False End Get End Property - Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest + Public Shared 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 + Private ReadOnly Property CveEmpresa As Integer = 140 + Private ReadOnly Property UsuarioWSE140 As String = "bdh_apiuser_" + Private ReadOnly Property PasswordWSE140 As String = "*863.fy03pon.8kmn_vbtu" + Public ReadOnly Property TokenAutorizacion As String + Get + Return "$2y$10$LGqtRWUloKQmAt.jcUldc.PmS5LJ6l.WU2w1G4PBOTLMVKZRNQFPS" + End Get + End Property + 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 + + Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest + Dim retorno As String Try - Select Case context.Request("metodo") + Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString()) + Select Case Metodo Case "MetasVendedores" MetasVendedores(context) End Select + + If Metodo = "ConsultaRemisiones" Then + context.Response.ContentType = "application/json" + Dim Auth As AuthMessage = ValidarSolicitud(context) + + If Auth.IsSucces Then + retorno = ConsultaRemisiones(context, "") + Else + context.Response.StatusCode = Auth.StatusCode + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + context.Response.Write(retorno) + ElseIf Metodo = "RegistraPago" Then + context.Response.ContentType = "application/json" + Dim Auth As AuthMessage = ValidarSolicitud(context) + + If Auth.IsSucces Then + retorno = RegistraPagoRemision(context, "") + Else + context.Response.StatusCode = Auth.StatusCode + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + context.Response.Write(retorno) + End If Catch ex As Exception ex.GuardaLog(ex.Message) End Try End Sub + Private Function ValidarSolicitud(ByVal context As HttpContext) As AuthMessage + Dim unauthorized As Boolean = True + Dim respuesta As New AuthMessage + + Dim authHeader = context.Request.Headers("Authorization") + If authHeader IsNot Nothing Then + Dim basicAuth As String = authHeader.Replace("Basic ", "") + + Dim usernamePasswordArray = Encoding.UTF8.GetString(Convert.FromBase64String(basicAuth)).Split(":"c) + + Dim userName = usernamePasswordArray(0) + Dim password = usernamePasswordArray(1) + unauthorized = Not (userName = Me.UsuarioWSE140 AndAlso password = Me.PasswordWSE140) + + Else + respuesta.ErrorMessage = New AppsResponseError() With {.message = "el usuario y/o contraseña son requeridos"} + respuesta.IsSucces = False + respuesta.StatusCode = 200 + + Return respuesta + End If + + If unauthorized Then + respuesta.ErrorMessage = New AppsResponseError() With {.message = "el usuario y/o contraseña no son validos"} + respuesta.IsSucces = False + respuesta.StatusCode = 200 + + Return respuesta + Else + respuesta.ErrorMessage = Nothing + respuesta.IsSucces = True + respuesta.StatusCode = 200 + + Return respuesta + End If + + End Function + + Private Function ConsultaRemisiones(ByVal context As HttpContext, Codigo As String) As String + Dim Respuesta As New AppsResponse + Dim RespuestaError As New AppsResponseError + Dim TieneError As Boolean = False + Dim CveSubProyecto As String = "11790" + + Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa) + Dim data As New JArray + Dim dtt As New DataTable + Dim ObjVentas As New ClsVentas + If ObjVentas.GetRepRemisionesSinFacturar(Now.AddYears(-2).ToShortDateString, Now.ToShortDateString, Now.ToShortDateString, CveSubProyecto, -1, -1, "-1", CveEmpresa, CveUsuarioConsulta:=100, PrimerProducto:=True) Then + dtt = ObjVentas.DtResultados.FiltraParametros("CveVenta > 0") + End If + ObjVentas.Dispose() + + If dtt IsNot Nothing Then + Try + For Each Row As DataRow In dtt.Rows + Dim objVenta As New JObject( + New JProperty("cveventa", Row("CveVenta")), + New JProperty("folio", Row("Folio")), + New JProperty("cliente", Row("Cliente")), + New JProperty("fecha", Row("Fecha")), + New JProperty("total", Row("Total")), + New JProperty("moneda", Row("Abreviatura")), + New JProperty("primerproducto", Row("PrimerCodigoPS")) + ) + data.Add(objVenta) + Next + Catch ex As Exception + TieneError = True + RespuestaError.message = "Ocurrió un error al obtener las remisiones pendientes." + End Try + dtt.Dispose() + Else + TieneError = True + End If + + Respuesta.data = data + + If TieneError Then + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(RespuestaError) + Else + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(Respuesta) + End If + End Function + + Private Function RegistraPagoRemision(ByVal context As HttpContext, CveVenta As String) As String + Dim Respuesta As New AppsResponse + Dim RespuestaError As New AppsResponseError + Dim TieneError As Boolean = False + Dim CveSubProyecto As String = "11790" + Dim JsonRequest As JObject = Nothing + + If context.Request.InputStream IsNot Nothing Then + Using reader As New StreamReader(context.Request.InputStream) + Dim json = reader.ReadToEnd + If Not String.IsNullOrEmpty(json) Then + JsonRequest = JObject.Parse(json) + If JsonRequest Is Nothing Then + TieneError = True + End If + End If + End Using + End If + + Dim UsuarioActual As Usuario = ValidaUsuarioSistema(100, CveEmpresa) + Dim data As New JArray + Dim dtt As New DataTable + Dim MsgError As String = "" + Dim CveCuentaBancaria As Integer = 8075 + Dim ImportePago As Decimal = JsonRequest("importe_pago").ToString.ToDecimal + Dim FechaPago As Date = JsonRequest("fecha_pago").ToString.ToDate + Dim FolioPago As String = JsonRequest("referencia_pago").ToString + Dim CveTipoTransaccion As Integer = If(JsonRequest("referencia_pago").ToString = "tdc", 12, 11) + Dim CveMonedaPago As Integer = If(JsonRequest("moneda_pago").ToString = "USD", 2, 1) + Dim pCveVenta As Integer = JsonRequest("cveventa").ToString.ToEntero + Dim Referencia As String = "" + 'validaciones + + Dim ObjVenta As New ClsVentas() + Dim ObjClientes As New ClsClientes + If ObjVenta.GetVenta(pCveVenta, CveEmpresa) Then + If ObjVenta.DtResultados IsNot Nothing AndAlso ObjVenta.DtResultados.Rows.Count > 0 Then + Dim dr As DataRow = ObjVenta.DtResultados.Rows(0) + 'importe y forma de pago. + Dim VentaRemision As New ClsPaginas.Venta(UsuarioActual) + VentaRemision.CveVenta = dr("CveVenta").ToString.ToEntero + VentaRemision.Fecha = dr("Fecha").ToString.ToDate + VentaRemision.CveCliente = dr("CveCliente").ToString.ToEntero + VentaRemision.CveMoneda = dr("CveMoneda").ToString.ToEntero + VentaRemision.TipoDocto = dr("TipoDocto").ToString + VentaRemision.SerieFolio = dr("SerieFolio").ToString + VentaRemision.ClienteNombre = dr("ClienteNombre").ToString + VentaRemision.TC = dr("TipoCambio").ToString.ToDecimal + VentaRemision.Total = dr("Total").ToString.ToDecimal + VentaRemision.IVA = dr("IVA").ToString.ToDecimal + VentaRemision.IEPS = dr("IEPS").ToString.ToDecimal + VentaRemision.RetIVA = dr("RetIVA").ToString.ToDecimal + VentaRemision.RetISR = dr("RetISR").ToString.ToDecimal + VentaRemision.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal + VentaRemision.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero + + Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, VentaRemision.CveSubProyecto, VentaRemision.CveCliente, VentaRemision.CveMoneda, "Ing") + ObjFactura.CveMoneda = VentaRemision.CveMoneda + ObjFactura.CveVendedor = dr("CveVendedor").ToString.ToEntero + ObjFactura.CveFormaPago = dr("CveFormaPago33").ToString.ToEntero + 'ObjFactura.ClaveFormaPagoSAT = "99" + ObjFactura.CveMetodoPago = dr("CveMetodoPago").ToString.ToEntero + 'ObjFactura.ClaveMetodoPagoSAT = "PPD" + Dim DtRemisionesPS As DataTable = Nothing + If ObjClientes.GetVentasRemisionesTotales(VentaRemision.CveCliente, VentaRemision.CveVenta.ToString(), 1, CveEmpresa) Then + DtRemisionesPS = ObjClientes.DtResultados.Copy() + End If + For Each drr As DataRow In DtRemisionesPS.Rows + ObjFactura.AgregarPS(drr("CvePS").ToString().ToEntero(), drr("Cantidad").ToString().ToDecimal(), drr("PU").ToString().ToDecimal(), drr("Descuento").ToString().ToDecimal, drr("Obs").ToString(), CveUM:=drr("CveUM").ToString().ToEntero(), + CveProyecto:=drr("CveProyecto").ToString().ToEntero(), CveSubProyecto:=drr("CveSubProyecto").ToString().ToEntero(), CveVentaDetallePadre:=drr("CveVentaDetalle").ToString().ToEntero(), CveVentaDetalleRemision:=drr("CveVentaDetalle").ToString().ToEntero(), + PorcentajeIVA:=drr("PorcentajeIVA").ToString().ToDecimal(), CvePromocionDetalle:=drr("CvePromocionDetalle").ToString.ToEntero) + Next + + ObjFactura.GenerarSalidaAlmacen = True + ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPS = 2").Copy() + 'ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}", "Orden").ToString().ToEntero() + + ObjFactura.CalculaTotales() + + Dim ObjConta As New ClsContabilidad() + Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL()) + Dim ObjVentas As New ClsVentas(ObjConta.IniciaTransacSQL()) + Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Ashx/E140", 4, 0, 0, 1, FechaPago, "Venta Kiosco", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + If CvePrePoliza > 0 Then + 'registro de venta y pago + + Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing + Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True) + Retorno.Factura = ObjFactura + + If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then + VentaRemision.CveVenta = ObjFactura.CveVenta + 'Respuesta.data = Retorno.SerieFolio + + If TieneError Then + Dim sb As New StringBuilder() + For Each msg As String In Retorno.Mensajes + sb.AppendFormat("{0}. ", msg) + Next + RespuestaError.message = sb.ToString() + End If + '11- tdd, 12-tdc + Dim CveIE As Integer = ObjIE.AddBancos_IE(CveCuentaBancaria, CveTipoTransaccion, FechaPago, "-1", "", ImportePago, VentaRemision.CveMoneda, + VentaRemision.TC, "", "", False, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + If CveIE > 0 Then + 'Importe de pago + Dim Pago As New ClsPaginas.VentaPago + Pago.TipoPago = "XXX" + Pago.Fecha = FechaPago + Pago.CveIE = CveIE + Pago.CveMonedaPago = CveMonedaPago + Pago.ImportePago = ImportePago + Pago.ImportePagoVenta = ImportePago + Pago.Referencia = Referencia + + If MsgError = "" AndAlso ClsPaginas.AplicaPrePolizaPagoVenta(VentaRemision, Pago, CvePrePoliza, ObjConta) Then + MsgError = "No se pudo insertar la póliza" + End If + Else + MsgError = "No se pudo insertar el pago" + End If + Else + TieneError = True + End If + End If + If Not TieneError Then + Dim bytesPDF As Byte() = DescargarFactura(ObjFactura.SerieFolio, CveEmpresa, ObjFactura.CveVenta) 'ClsPaginas.PdfFactura(ObjFactura, AplicaPagare:="0", Guardar:=True, RegenerarQR:=True, EsTicket:=False) + + 'generar el pdf y mandarlo + Dim objretorno As New JObject( + New JProperty("CveVenta", ObjFactura.CveVenta), + New JProperty("SerieFolio", ObjFactura.SerieFolio), + New JProperty("pdf", Convert.ToBase64String(bytesPDF)) + ) + data.Add(objretorno) + Respuesta.data = data + ObjConta.RollBack() + 'ObjConta.Commit() + Else + ObjConta.RollBack() + End If + ObjConta.Dispose() + ObjIE.Dispose() + End If + End If + ObjVenta.Dispose() + ObjClientes.Dispose() + + Respuesta.data = data + + If TieneError Then + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(RespuestaError) + Else + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(Respuesta) + End If + End Function + + +#Region "M E T A S V E N D E D O R E S" Private Shared Sub MetasVendedores(ByVal context As HttpContext) @@ -128,7 +436,6 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState For Each dRow As System.Data.DataRow In DTVendedores.Rows - Dim CorreoSupervisor As String = dRow("Correo").ToString() Dim Sucursal As String = dRow("Sucursal").ToString Dim Vendedor As String = dRow("Nombre").ToString() @@ -226,6 +533,30 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState Next End Sub +#End Region + Private Function DescargarFactura(FilePDF As String, CveEmpresa As Integer, CveVenta As Integer) As Byte() + ' + Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?P={3}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1®ENERAR=1", CveVenta)))) + Dim File As Byte() = Nothing + Try + Using httpClient = New System.Net.Http.HttpClient() + httpClient.Timeout = New TimeSpan(0, 1, 0) + Using request = New System.Net.Http.HttpRequestMessage(System.Net.Http.HttpMethod.Get, Url) + request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks))) + Dim response = httpClient.SendAsync(request).Result + If response.StatusCode = Net.HttpStatusCode.OK Then + File = response.Content.ReadAsByteArrayAsync().Result + End If + End Using + End Using + Catch ex As Exception + File = Nothing + OnError("Ocurrió un error al descargar la factura", ex) + End Try + + Return File + End Function + Private Shared Sub MandaCorreo(Para As String, Cuerpo As String, bytes As Byte()) Try @@ -247,15 +578,51 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState End Try End Sub + Private Shared Function IsValidJson(ByVal strInput As String) As Boolean + If String.IsNullOrWhiteSpace(strInput) Then + Return False + End If - Public Shared ReadOnly Property EsProduccion As Boolean - Get - If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then + strInput = strInput.Trim() + + If (strInput.StartsWith("{") AndAlso strInput.EndsWith("}")) OrElse (strInput.StartsWith("[") AndAlso strInput.EndsWith("]")) Then + + Try + Dim obj = JToken.Parse(strInput) + Return True + Catch jex As JsonReaderException + Console.WriteLine(jex.Message) Return False - Else - Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1") - End If - End Get - End Property + Catch ex As Exception + Console.WriteLine(ex.ToString()) + Return False + End Try + Else + Return False + End If + End Function + + Private Class AppsResponse + 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 AppsResponseError + Sub New() + status = "error" + End Sub + Public Property status As String + Public Property message As String + End Class + + Private Class AuthMessage + Public Property IsSucces As Boolean + Public Property ErrorMessage As AppsResponseError + Public Property StatusCode As Integer + End Class End Class \ No newline at end of file diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index f5359825b..fd6a82ba1 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -62,9 +62,9 @@ Public Class E141 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe #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(141) + Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexion(CveEmpresa) Dim ObjUsuarios As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena) - UsuarioActual = ObjUsuarios.GetUsuarioDetalle(100) + UsuarioActual = ObjUsuarios.GetUsuarioDetalle(100, CveEmpresa) If UsuarioActual IsNot Nothing Then HttpContext.Current.Session("UsuarioSIG") = UsuarioActual 'CreaObjetoEmpresa(UsuarioActual) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index cafa2516a..e522c9c6e 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -151,11 +151,12 @@
- + +
TC:
@@ -367,7 +368,7 @@
-
+
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 355064115..5db1c8b8e 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -84,10 +84,10 @@ Partial Class Bancos_DepositosCaja Else DivRowCuenta.Visible = False DivDescuentocheck.Visible = False - End If - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - DivRowCuenta.Visible = True - End If + End If + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + DivRowCuenta.Visible = True + End If End If If UsuarioActual.CveEmpresa.Contiene(140, 141) Then divTipoPago.Visible = False : divTipoPago1.Visible = False @@ -273,6 +273,7 @@ Partial Class Bancos_DepositosCaja Try Dim FolioIE As Long = -1 Dim CveMoneda As Integer = 1 + Dim CveMonedaDeposito As Integer Dim TipoCambio As Decimal = 1 Dim Fecha As Date = TxtFecha.Text.ToDate Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") @@ -294,7 +295,14 @@ Partial Class Bancos_DepositosCaja End If If drDestino IsNot Nothing Then - CveMoneda = drDestino("CveMoneda").ToString.ToEntero + CveMonedaDeposito = drDestino("CveMoneda").ToString.ToEntero + End If + If CveMonedaDeposito <> 1 Then + TipoCambio = TxtTCDeposito.Text.ToDecimal + If TipoCambio < 10 Then + Alert("Tipo cambio incorrecto", TipoMensaje.ToastAdventencia) + Exit Sub + End If End If NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) @@ -372,12 +380,18 @@ Partial Class Bancos_DepositosCaja If FolioIE <= 0 Then OcurrioError = True End If - CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Depósito Bancario - {tSubProyectoDeposito}", TotalImporte, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario) + + CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Depósito Bancario - {tSubProyectoDeposito}", TotalImporte, CveMonedaDeposito, TipoCambio, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario) documentos += String.Format("Depósito: {1}    
", CveIEOrigen, FolioIE) - If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte * TipoCambio, 30, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then + If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte, 30, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then + If CveMonedaDeposito > 1 Then + If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, (TotalImporte * TipoCambio) - TotalImporte, 204, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteME:=TotalImporte, TipoCambio:=TipoCambio) Then + OcurrioError = True + End If + End If If ChkFaltante.Checked Then CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero @@ -442,7 +456,15 @@ Partial Class Bancos_DepositosCaja End If CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then + If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then + + If Gvr.DataKey("CveMoneda").ToEntero > 1 Then + If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, (Importe * TipoCambio) - Importe, 204, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteME:=Importe, TipoCambio:=TipoCambio) Then + OcurrioError = True + Exit For + End If + End If + Else OcurrioError = True Exit For End If @@ -730,4 +752,13 @@ Partial Class Bancos_DepositosCaja Return File End Function + + Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs) + Dim CveMonedaDeposito As Integer = GlobalDTBancosCuentasGral(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveCuenta={DdlCuentaDeposito.SelectedValue}").ToEntero + If CveMonedaDeposito <> 1 Then + divtcdeposito.Visible = True + Else + divtcdeposito.Visible = False + End If + End Sub End Class \ No newline at end of file diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 7746f79d5..4c2820c32 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1260,6 +1260,21 @@ Partial Class Compras_Compras End Set End Property + Private Property FechaMovtoDev As Date + Get + If ViewState("FechaMovtoDev") Is Nothing Then + ViewState("FechaMovtoDev") = MinFecha + End If + Return ViewState("FechaMovtoDev").ToString.ToDate + End Get + Set(value As Date) + ViewState("FechaMovtoDev") = value + End Set + End Property + + + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -3077,38 +3092,23 @@ Partial Class Compras_Compras TmpDT.Columns.Add("CveContrato", GetType(Integer)) TmpDT.Columns.Add("DifPSSat", GetType(Integer)) - If Not TmpDT.Columns.Contains("CveContratoDetalle") Then - TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) - End If - If Not TmpDT.Columns.Contains("CveCultivoCuadroDetalle") Then - TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer)) - End If + If Not TmpDT.Columns.Contains("CveContratoDetalle") Then TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) + If Not TmpDT.Columns.Contains("CveCultivoCuadroDetalle") Then TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer)) + If Not TmpDT.Columns.Contains("CveSATPSActualizado") Then TmpDT.Columns.Add("CveSATPSActualizado", GetType(Integer)) + If Not TmpDT.Columns.Contains("ImporteSinImpuestos") Then TmpDT.Columns.Add("ImporteSinImpuestos", GetType(Decimal)) - If Not TmpDT.Columns.Contains("CveSATPSActualizado") Then - TmpDT.Columns.Add("CveSATPSActualizado", GetType(Integer)) - End If + If Not TmpDT.Columns.Contains("AplicaSerie") Then TmpDT.Columns.Add("AplicaSerie", GetType(Boolean)) + If Not TmpDT.Columns.Contains("AplicaLote") Then TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) + If Not TmpDT.Columns.Contains("AplicaCaducidad") Then TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) - If Not TmpDT.Columns.Contains("ImporteSinImpuestos") Then - TmpDT.Columns.Add("ImporteSinImpuestos", GetType(Decimal)) - End If - If Not TmpDT.Columns.Contains("AplicaLote") Then - TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) - End If - If Not TmpDT.Columns.Contains("AplicaCaducidad") Then - TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) - End If + If Not TmpDT.Columns.Contains("Serie") Then TmpDT.Columns.Add("Serie", GetType(String)) + If Not TmpDT.Columns.Contains("Lote") Then TmpDT.Columns.Add("Lote", GetType(String)) + If Not TmpDT.Columns.Contains("FechaCaducidad") Then TmpDT.Columns.Add("FechaCaducidad", GetType(Date)) - If Not TmpDT.Columns.Contains("Lote") Then - TmpDT.Columns.Add("Lote", GetType(String)) - End If - If Not TmpDT.Columns.Contains("FechaCaducidad") Then - TmpDT.Columns.Add("FechaCaducidad", GetType(Date)) - End If + GvPS.DataSource = TmpDT + GvPS.DataBind() - GvPS.DataSource = TmpDT - GvPS.DataBind() - - If UsuarioActual.Empresa.UsaAC Then + If UsuarioActual.Empresa.UsaAC Then CargaHidendsAC() End If @@ -4909,7 +4909,6 @@ Partial Class Compras_Compras TmpDT.AcceptChanges() If Correcto Then - Dim ObjCompras As New ClsCompras() Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL()) Dim ObjIE As New ClsBancos(ObjCompras.IniciaTransacSQL) @@ -4923,7 +4922,6 @@ Partial Class Compras_Compras Dim ObjCGame As New ClsCGame(ObjCompras.IniciaTransacSQL()) Dim ObjProductosServicios As New ClsProductosServicios(ObjCompras.IniciaTransacSQL()) Dim ObjGrales As New ClsGenerales(ObjCompras.IniciaTransacSQL()) - Dim ObjContaAC As ClsContPAQi = Nothing Dim ErrorMovtosCxP As Boolean = False @@ -5057,7 +5055,6 @@ Partial Class Compras_Compras UsuarioActual.Sesion("Comp-NumeroReembolso") = "" End If - If Not ErrorReembolso Then 'PORCENTAJE IVA @@ -5797,7 +5794,6 @@ Partial Class Compras_Compras If CveMovimientoInventario <= 0 Then ErrorMovInv = True Else - Dim DtDetalle As New DataTable Dim DtEquivalencias As DataTable Dim CveProducto As Integer @@ -5879,8 +5875,6 @@ Partial Class Compras_Compras Exit For End If End If - - End If End If i = i + 1 @@ -5904,7 +5898,6 @@ Partial Class Compras_Compras End If End If End If - End If Next End If @@ -6031,7 +6024,6 @@ Partial Class Compras_Compras If Capital > 0 Or Interes > 0 Or Ambos > 0 Then If ObjIE.GetCreditosDetalle(CveCreditoTemp, -1) Then - Dim CveCompraCapital As Integer = -1 Dim CveCompraInteres As Integer = -1 @@ -6264,9 +6256,6 @@ Partial Class Compras_Compras End Select End If - - - importeMovimiento = importePagoProv If CveMonedaPago = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 1 Then importeMovimiento = importeMovimiento / TipoCambioCompra @@ -6284,7 +6273,6 @@ Partial Class Compras_Compras CveSubProyectoDT = TmpDT(0)("CveSubProyecto").ToString.ToEntero CveTipoGastoDT = TmpDT(0)("CveTipoGasto").ToString.ToEntero End If - Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" Dim ImporteSubCre As Decimal = TxtSubTotal.Text.ToDecimal @@ -6294,7 +6282,6 @@ Partial Class Compras_Compras ErrorPrepoliza = True End If - 'If importeMovimiento <> 0 Then For Each gvRowCredito As GridViewRow In GvCreditos.Rows @@ -13905,7 +13892,7 @@ Partial Class Compras_Compras If ObjInventario.GetExistenciasProducto(Dr.DataKey("CvePS").ToEntero, Dr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, CveAlmacen, FechaMovto:=tFechaExistencia.ToString("yyyy/MM/dd HH:mm")) Then Dim Existencia As Decimal = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", CveAlmacen)).ToDecimal - If Dr.FCTextBox("TxtCantidad").Text.ToDouble > Existencia Then + If Dr.FCTextBox("TxtCantidad").Text.ToDecimal > Existencia Then Alert($"No hay existencia suficiente del producto:
- {Dr.DataKey("CodigoPS")} en la fecha: {tFechaExistencia.ToString("yyyy/MM/dd HH:mm")}", TipoMensaje.MsgAdvertencia) ErrorMovInv = True Exit For @@ -13954,6 +13941,7 @@ Partial Class Compras_Compras Private Sub cargaddldevoluciones(CveProveedor As Integer, SubTotal As Double) Dim objcompras As New ClsCompras() + If objcompras.GetCompraParaDevolucion(CveProveedor, UsuarioActual.CveEmpresa, SubTotal) Then DDLDevolucion.Items.Clear() Dim dtt As DataTable = objcompras.DtResultados @@ -13971,6 +13959,9 @@ Partial Class Compras_Compras End Sub Protected Sub DDLDevolucion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDLDevolucion.SelectedIndexChanged + + FechaMovtoDev = MinFecha + If DdlTipoComprobante.SelectedValue.Contiene("DEV") Then DivAlmacenDev.Visible = True End If @@ -13978,6 +13969,7 @@ Partial Class Compras_Compras Dim objcompras As New ClsCompras() If objcompras.GetCompraDetalleAlmacen(UsuarioActual.CveEmpresa, DDLDevolucion.SelectedValue.ToEntero) Then GVDevolucion.DataSource = objcompras.DtResultados + FechaMovtoDev = objcompras.DtResultados.FiltroPrimeroValor("FechaMovto").ToDate.ToString("dd/MM/yyyy").ToDate End If objcompras.Dispose() GVDevolucion.DataBind() @@ -13988,18 +13980,14 @@ Partial Class Compras_Compras End If Next DdlAlmacenDevolucion.SelectedValueExist(CveAlmacen) - UPDevolucion.Update() + + If EsGrupoDiaz AndAlso FechaMovtoDev <> MinFecha AndAlso (FechaMovtoDev >= TxtFecha.Text.ToDate) Then + Alert("La fecha de la devolución se cambiará a una fecha posterior al ingreso.", TipoMensaje.ToastAdventencia) + End If + End Sub - 'Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click - ' cargaddldevoluciones(CveProveedor, TextBox1.Text.ToDouble) - 'End Sub - 'Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click - ' Dim ObjInventario As New ClsInventarios() - ' Dim cvecompra As Integer = 5221 - ' Dim subtotal As Double = TextBox1.Text.ToDouble - ' guardardevolucion(ObjInventario, cvecompra, subtotal, NowADS().ToDate) - 'End Sub + Protected Sub BtnVinculaDevolucion_Click(sender As Object, e As EventArgs) Try Dim subtotaldevolucion As Decimal = 0 @@ -14026,6 +14014,13 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then tTolerancia = Math.Abs(TxtSubTotal2.Text.ToDecimal - subtotaldevolucion) If Math.Abs(TxtSubTotal2.Text.ToDecimal - subtotaldevolucion) <= tTolerancia Then VinculaDevolucion() + + If EsGrupoDiaz AndAlso FechaMovtoDev <> MinFecha AndAlso (FechaMovtoDev >= TxtFecha.Text.ToDate) Then + TxtFecha.Text = FechaMovtoDev.AddDays(1).ToString("dd/MM/yyyy") + Alert("La fecha de la devolución se cambiará a una fecha posterior al ingreso.", TipoMensaje.ToastAdventencia) + UpParametros.Update() + End If + Else Alert("El Total de la NC debe ser igual al total de la devolucion", TipoMensaje.MsgAdvertencia) End If @@ -14036,7 +14031,6 @@ Partial Class Compras_Compras OnError("Ocurrió un error al realizar la vinculación", ex) End Try - End Sub Private Sub VinculaDevolucion() @@ -14080,9 +14074,7 @@ Partial Class Compras_Compras Dim Clasificacion As String = gvr.DataKey("Clasificacion").ToString Dim PS As String = gvr.DataKey("CodigoPS").ToString Dim CveTipoPS As Integer = gvr.DataKey("CveTipoPS").ToString.ToEntero - Dim CveProyecto As String = "-1" - Dim Proyecto As String = "Seleccione" Dim Obs As String = "" Dim PU As Decimal = gvr.DataKey("PU").ToString.ToDecimal @@ -14106,21 +14098,20 @@ Partial Class Compras_Compras Next If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then - Dim CvePS_RNC As Integer = UsuarioActual.Empresa.Funcionalidad(580).ToEntero - If CvePS_RNC = 0 Then + Dim CvePSRNC As Integer = UsuarioActual.Empresa.Funcionalidad(580).ToEntero + If CvePSRNC = 0 Then Alert("producto utilizado para diferencia no definido.") Exit Sub End If - Dim PSRow As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS_RNC).FiltroPrimero("") + Dim PSRow As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSRNC).FiltroPrimero("") Dim PS As String = PSRow("PSCodigo").ToString Dim tDif As Decimal = TxtSubTotal2.Text.ToDecimal - Total AddPS(1, PSRow("CveUnidadMedida").ToString.ToEntero, PSRow("UnidadMedida").ToString, - PSRow("CveClasificacion").ToString.ToEntero, PSRow("Clasificacion").ToString, CvePS_RNC, PS, 1, CveSubProyectoDev.ToString, SubProyecto, "", "-1", "", tDif, tDif, IVAPorcentajeCompra, 0, 0, 0, 0, 0) + PSRow("CveClasificacion").ToString.ToEntero, PSRow("Clasificacion").ToString, CvePSRNC, PS, 1, CveSubProyectoDev.ToString, SubProyecto, "", "-1", "", tDif, tDif, IVAPorcentajeCompra, 0, 0, 0, 0, 0) End If - AddPS2() BtnGuardar.Enabled = True diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index e5dc959a1..a4e7e7422 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -4258,12 +4258,14 @@ Partial Class PopUpVerFactura ObjCompra.Dispose() If Not Archivo.Exists Then - params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) - ImprimirPDF(String.Format("Empresas/Grales/Formatos/DevolucionProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios") Else - ImprimirPDF(String.Format("{0}Formatos\DevolucionProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios") + If UsuarioActual.CveEmpresa.Contiene(189) Then + ImprimirPDF(String.Format("{0}Formatos\DevolucionProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios", DtDatos2:=DTPrePoliza, RDSName2:="DsPrePoliza") + Else + ImprimirPDF(String.Format("{0}Formatos\DevolucionProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios") + End If End If 'ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionProveedor.rdlc", DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios") diff --git a/Compras/eFacturas.aspx b/Compras/eFacturas.aspx index aa709891c..577e6b336 100644 --- a/Compras/eFacturas.aspx +++ b/Compras/eFacturas.aspx @@ -1365,6 +1365,8 @@   Consultar +   Prueba +
diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 5100ce38b..dcd6b6243 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -6075,6 +6075,10 @@ Partial Class Compras_eFacturas + Protected Sub LnkRegistroRNC_Click(sender As Object, e As EventArgs) + VinculacionAutomaticaRNC() + End Sub + Private Sub VinculacionAutomaticaRNC() Dim ErrorProceso As Boolean = False Dim ErrorProcesoStr As String = "" @@ -6087,7 +6091,7 @@ Partial Class Compras_eFacturas For Each GvRow As GridViewRow In GvD.Rows - If GvRow.FCCheckBox("chkRegistraFactura").Checked Then + If GvRow.DataKey("TipoComprobante") = "E" Then Dim TotalFactura As Decimal = GvRow.DataKey("Total").ToDecimal Dim SaldoFactura As Decimal = TotalFactura @@ -6095,7 +6099,7 @@ Partial Class Compras_eFacturas Dim CFDIXmlPath As String = $"{UsuarioActual.Empresa.Ruta}Compras\{GvRow.DataKey("RFCDe")}\{GvRow.DataKey("XML")}" If Not File.Exists(CFDIXmlPath) Then ErrorProceso = True - Exit For + Continue For End If Dim CompraActual As New ClsCompraManager(CFDIXmlPath, ClsCompraManager.EnumCargaCompra.DesdeArchivo, GlobalDTTiposGastos(UsuarioActual.CveEmpresa), UsuarioActual) @@ -6109,82 +6113,73 @@ Partial Class Compras_eFacturas CompraActual.Descripcion = TxtDescripcionCompra.Text.Trim CompraActual.NombreProveedor = GvRow.DataKey("NombreProveedor") - Dim CvePersonal As Integer = -1 'DdlPersonalReembolso.SelectedValue.ToEntero - Dim CveCajachica As Integer = -1 'DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero + For Each DR As String In CompraActual.DocumentosRelacionadosUUIDSList - If RBLContado.SelectedValue.ToEntero = 6 Then 'Caja Chica - CveCajachica = DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero - ElseIf RBLContado.SelectedValue.ToEntero = 2 Then ' viaticos - CvePersonal = DdlPersonalReembolso.SelectedValue.ToEntero - ElseIf RBLContado.SelectedValue.ToEntero = 4 Then ' deudores + Next - End If + + 'If CompraActual.ConfiguraRegistroCompra(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, CveCajachica, CvePersonal, + ' DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero, NumeroReembolso:=TxtNumeroReembolso.Text, + ' DTProrrateo:=DTProrrateo, DTPagosDeudores:=New DataTable) Then + + ' 'FIX ME OIC Recuerda cambiar el tipo de documento al registrar, actualmente tiene FAC y NC uno u otro, ajustar para que registre *** Egs *** cuado TipoComprobante = 'E' + ' If CompraActual.AddCompra(Objcompras.IniciaTransacSQL()) Then + ' Contador = Contador + 1 + ' Else + ' ErrorProceso = True + ' ErrorProcesoStr = CompraActual.MensajeError + ' Exit For + ' End If + 'Else + ' ErrorProceso = True + ' ErrorProcesoStr = CompraActual.MensajeError + ' Exit For + 'End If + + 'If RBLContado.SelectedValue.ToEntero = 4 Then 'Deudores + ' Dim CompraActualPagar = New Compra + ' If Objcompras.GetCompras(CompraActual.CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then + ' If Objcompras.DtResultados IsNot Nothing AndAlso Objcompras.DtResultados.Rows.Count > 0 Then + ' Dim dr As DataRow = Objcompras.DtResultados.Rows(0) + + + ' CompraActualPagar.CveCompra = CompraActual.CveCompra + ' CompraActualPagar.CveTipoConceptoProveedor = dr("CveTipoConcepto").ToString.ToEntero + ' CompraActualPagar.CveProveedor = dr("CveProveedor").ToString.ToEntero + ' CompraActualPagar.CveMoneda = dr("CveMoneda").ToString.ToEntero + ' CompraActualPagar.Fecha = dr("Fecha").ToString.ToDate + ' CompraActualPagar.SerieFolio = dr("SerieFolio").ToString + ' 'CompraActualPagar.ProveedorNombre = TxtPagueseA.Text + ' CompraActualPagar.TC = dr("TipoCambio").ToString.ToDecimal + ' CompraActualPagar.Total = dr("Total").ToString.ToDecimal + ' CompraActualPagar.IVA = dr("IVA").ToString.ToDecimal + ' CompraActualPagar.IVADeducible = dr("IVADeducible").ToString.ToDecimal.RoundSQL + ' CompraActualPagar.IVANoDeducible = dr("IVANoDeducible").ToString.ToDecimal.RoundSQL + ' CompraActualPagar.IEPS = dr("IEPS").ToString.ToDecimal + ' CompraActualPagar.RetIVA = dr("RetIVA").ToString.ToDecimal + ' CompraActualPagar.RetISR = dr("RetISR").ToString.ToDecimal + ' CompraActualPagar.CveConceptoRetIVA = dr("CveRetIVAConcepto").ToString.ToEntero + ' CompraActualPagar.CveConceptoRetISR = dr("CveRetISRConcepto").ToString.ToEntero + ' CompraActualPagar.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal + ' CompraActualPagar.UsuarioActual = UsuarioActual + ' CompraActualPagar.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero + ' CompraActualPagar.EsImportacion = CBool(dr("EsImportacion")) + ' CompraActualPagar.CompraNoDeducible = dr("NoDeducible").ToString.ToEntero - - If CompraActual.ConfiguraRegistroCompra(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, CveCajachica, CvePersonal, - DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero, NumeroReembolso:=TxtNumeroReembolso.Text, - DTProrrateo:=DTProrrateo, DTPagosDeudores:=New DataTable) Then - - 'FIX ME OIC Recuerda cambiar el tipo de documento al registrar, actualmente tiene FAC y NC uno u otro, ajustar para que registre *** Egs *** cuado TipoComprobante = 'E' - If CompraActual.AddCompra(Objcompras.IniciaTransacSQL()) Then - Contador = Contador + 1 - Else - ErrorProceso = True - ErrorProcesoStr = CompraActual.MensajeError - Exit For - End If - Else - ErrorProceso = True - ErrorProcesoStr = CompraActual.MensajeError - Exit For - End If - - If RBLContado.SelectedValue.ToEntero = 4 Then 'Deudores - Dim CompraActualPagar = New Compra - If Objcompras.GetCompras(CompraActual.CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then - If Objcompras.DtResultados IsNot Nothing AndAlso Objcompras.DtResultados.Rows.Count > 0 Then - Dim dr As DataRow = Objcompras.DtResultados.Rows(0) - - - CompraActualPagar.CveCompra = CompraActual.CveCompra - CompraActualPagar.CveTipoConceptoProveedor = dr("CveTipoConcepto").ToString.ToEntero - CompraActualPagar.CveProveedor = dr("CveProveedor").ToString.ToEntero - CompraActualPagar.CveMoneda = dr("CveMoneda").ToString.ToEntero - CompraActualPagar.Fecha = dr("Fecha").ToString.ToDate - CompraActualPagar.SerieFolio = dr("SerieFolio").ToString - 'CompraActualPagar.ProveedorNombre = TxtPagueseA.Text - CompraActualPagar.TC = dr("TipoCambio").ToString.ToDecimal - CompraActualPagar.Total = dr("Total").ToString.ToDecimal - CompraActualPagar.IVA = dr("IVA").ToString.ToDecimal - CompraActualPagar.IVADeducible = dr("IVADeducible").ToString.ToDecimal.RoundSQL - CompraActualPagar.IVANoDeducible = dr("IVANoDeducible").ToString.ToDecimal.RoundSQL - CompraActualPagar.IEPS = dr("IEPS").ToString.ToDecimal - CompraActualPagar.RetIVA = dr("RetIVA").ToString.ToDecimal - CompraActualPagar.RetISR = dr("RetISR").ToString.ToDecimal - CompraActualPagar.CveConceptoRetIVA = dr("CveRetIVAConcepto").ToString.ToEntero - CompraActualPagar.CveConceptoRetISR = dr("CveRetISRConcepto").ToString.ToEntero - CompraActualPagar.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal - CompraActualPagar.UsuarioActual = UsuarioActual - CompraActualPagar.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero - CompraActualPagar.EsImportacion = CBool(dr("EsImportacion")) - CompraActualPagar.CompraNoDeducible = dr("NoDeducible").ToString.ToEntero - - - - Else - ErrorProceso = True - End If - Else - ErrorProceso = True - End If + ' Else + ' ErrorProceso = True + ' End If + ' Else + ' ErrorProceso = True + ' End If - End If + 'End If End If If ErrorProceso Then @@ -6315,6 +6310,7 @@ Partial Class Compras_eFacturas End Function + End Class diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx index 9277a203e..9ba2ebace 100644 --- a/Contabilidad/RepIVA.aspx +++ b/Contabilidad/RepIVA.aspx @@ -390,7 +390,7 @@ - + diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 1a90339d7..e562cfbc1 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -13,6 +13,11 @@ using System.IO; using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; using System.Diagnostics; +using DocumentFormat.OpenXml.Drawing; +using DocumentFormat.OpenXml.ExtendedProperties; +using static Stimulsoft.Report.StiOptions; +using System.Web.Services.Description; +using System.Drawing; public partial class Contabilidad_RepIVA : ClsPaginas { @@ -331,39 +336,130 @@ public partial class Contabilidad_RepIVA : ClsPaginas if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico)) { - - foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0) + if (txtFechaI.Text.ToDate().Year < 2025) // años anteriores al 2025 { - SBDIOT.AppendLine( - Drow["TipoTercero"].ToString() + "|" + - Drow["TipoOperacion"].ToString() + "|" + - Drow["RFC"].ToString() + "|" + - Drow["NumeroIDFiscal"].ToString() + "|" + - Drow["NombreExtranjero"].ToString() + "|" + - Drow["PaisResidencia"].ToString() + "|" + - Drow["Nacionalidad"].ToString() + "|" + - LV(Drow["valorActos1516"].ToString()) + "|" + - LV(Drow["valorActos15"].ToString()) + "|" + - LV(Drow["ValorIvaNo1516"].ToString()) + "|" + + foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0) + { + SBDIOT.AppendLine( + Drow["TipoTercero"].ToString() + "|" + + Drow["TipoOperacion"].ToString() + "|" + + Drow["RFC"].ToString() + "|" + + Drow["NumeroIDFiscal"].ToString() + "|" + + Drow["NombreExtranjero"].ToString() + "|" + + Drow["PaisResidencia"].ToString() + "|" + + Drow["Nacionalidad"].ToString() + "|" + + LV(Drow["valorActos1516"].ToString()) + "|" + + LV(Drow["valorActos15"].ToString()) + "|" + + LV(Drow["ValorIvaNo1516"].ToString()) + "|" + - LV(Drow["valorActos1011"].ToString()) + "|" + - LV(Drow["valorActos10"].ToString()) + "|" + - LV(Drow["valorActosImp8"].ToString()) + "|" + - LV(Drow["ValorIvaNo10"].ToString()) + "|" + - LV(Drow["ValorIvaNo08"].ToString()) + "|" + + LV(Drow["valorActos1011"].ToString()) + "|" + + LV(Drow["valorActos10"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["ValorIvaNo10"].ToString()) + "|" + + LV(Drow["ValorIvaNo08"].ToString()) + "|" + - LV(Drow["valorActosImp1516"].ToString()) + "|" + - LV(Drow["ValorIvaNoImp16"].ToString()) + "|" + + LV(Drow["valorActosImp1516"].ToString()) + "|" + + LV(Drow["ValorIvaNoImp16"].ToString()) + "|" + - LV(Drow["valorActosImp10"].ToString()) + "|" + - LV(Drow["ValorIvaNoImp10"].ToString()) + "|" + + LV(Drow["valorActosImp10"].ToString()) + "|" + + LV(Drow["ValorIvaNoImp10"].ToString()) + "|" + - LV(Drow["IvaExentoImpo"].ToString()) + "|" + - LV(Drow["IVACero"].ToString()) + "|" + - LV(Drow["IvaExento"].ToString()) + "|" + - LV(Drow["IvaRetenido"].ToString()) + "|" + - LV(Drow["IvaDevoluciones"].ToString()) + "|"); + LV(Drow["IvaExentoImpo"].ToString()) + "|" + + LV(Drow["IVACero"].ToString()) + "|" + + LV(Drow["IvaExento"].ToString()) + "|" + + LV(Drow["IvaRetenido"].ToString()) + "|" + + LV(Drow["IvaDevoluciones"].ToString()) + "|"); + } } + else + { + foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0) + { + SBDIOT.AppendLine( + Drow["TipoTercero"].ToString() + "|" + + Drow["TipoOperacion"].ToString() + "|" + + Drow["RFC"].ToString() + "|" + + Drow["NumeroIDFiscal"].ToString() + "|" + + Drow["NombreExtranjero"].ToString() + "|" + + Drow["PaisResidencia"].ToString() + "|" + + Drow["Nacionalidad"].ToString() + "|" + + // 3.2 valor de los actos o actividades + LV(Drow["valorActosImp8"].ToString()) + "|" + // actos norte + LV(Drow["valorActosImp8"].ToString()) + "|" + // desc norte + LV(Drow["valorActosImp8"].ToString()) + "|" + // actos sur + LV(Drow["valorActosImp8"].ToString()) + "|" + // desc sur + LV(Drow["valorActosImp8"].ToString()) + "|" + // 16% + LV(Drow["valorActosImp8"].ToString()) + "|" + // desc 16% + LV(Drow["valorActosImp8"].ToString()) + "|" + // importacion 16% + LV(Drow["valorActosImp8"].ToString()) + "|" + // desc importacion 16% + LV(Drow["valorActosImp8"].ToString()) + "|" + // importacion intangibles 16% + LV(Drow["valorActosImp8"].ToString()) + "|" + // desc intangibles 16% + // 3.3 IVA Acreditable + LV(Drow["valorActosImp8"].ToString()) + "|" + // actos norte + LV(Drow["valorActosImp8"].ToString()) + "|" + // proporcion actos norte + LV(Drow["valorActosImp8"].ToString()) + "|" + // actos sur + LV(Drow["valorActosImp8"].ToString()) + "|" + // proporcion actos sur + LV(Drow["valorActosImp8"].ToString()) + "|" + // 16% + LV(Drow["valorActosImp8"].ToString()) + "|" + // proporcion 16% + LV(Drow["valorActosImp8"].ToString()) + "|" + // importacion 16% + LV(Drow["valorActosImp8"].ToString()) + "|" + // proporción importacion 16% + LV(Drow["valorActosImp8"].ToString()) + "|" + // intangibles 16% + LV(Drow["valorActosImp8"].ToString()) + "|" + // proporcion intangibles 16% + // 3.4 IVA NO Acreditable + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + LV(Drow["valorActosImp8"].ToString()) + "|" + + // 3.5 datos adicionales + LV(Drow["valorActosImp8"].ToString()) + "|" + // VA retenido por el contribuyente + LV(Drow["valorActosImp8"].ToString()) + "|" + //Actos o actividades pagados en la importación de bienes y servicios por los que no se pagara el IVA (Exentos) + LV(Drow["valorActosImp8"].ToString()) + "|" + // Actos o actividades pagados por los que no se pagará el IVA(Exentos) + LV(Drow["valorActosImp8"].ToString()) + "|" + // Demás actos o actividades pagados a la tasa del 0% + LV(Drow["valorActosImp8"].ToString()) + "|" + // Actos o actividades no objeto del IVA realizados en + LV(Drow["valorActosImp8"].ToString()) + "|" + // Actos o actividades no objeto del IVA por no contar on establecimiento en territorio nacion + LV(Drow["valorActosImp8"].ToString()) + "|"); // Manifiesto que se dio efectos fiscales a los comprobantes que amparan las operaciones realizadas con el proveedor + + //LV(Drow["valorActos1516"].ToString()) + "|" + + //LV(Drow["valorActos15"].ToString()) + "|" + + //LV(Drow["ValorIvaNo1516"].ToString()) + "|" + + + //LV(Drow["valorActos1011"].ToString()) + "|" + + //LV(Drow["valorActos10"].ToString()) + "|" + + //LV(Drow["valorActosImp8"].ToString()) + "|" + + //LV(Drow["ValorIvaNo10"].ToString()) + "|" + + //LV(Drow["ValorIvaNo08"].ToString()) + "|" + + + //LV(Drow["valorActosImp1516"].ToString()) + "|" + + //LV(Drow["ValorIvaNoImp16"].ToString()) + "|" + + + //LV(Drow["valorActosImp10"].ToString()) + "|" + + //LV(Drow["ValorIvaNoImp10"].ToString()) + "|" + + + //LV(Drow["IvaExentoImpo"].ToString()) + "|" + + //LV(Drow["IVACero"].ToString()) + "|" + + //LV(Drow["IvaExento"].ToString()) + "|" + + //LV(Drow["IvaRetenido"].ToString()) + "|" + + //LV(Drow["IvaDevoluciones"].ToString()) + "|"); + } + + } + } Objconta.Dispose(); diff --git a/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc b/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc index ef29e5311..f02dfff7c 100644 --- a/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc +++ b/Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc @@ -1897,158 +1897,6 @@ 2pt - - true - true - - - - - Sello digital del CFDI: - - - - - - - - - =Parameters!SelloCFDI.Value - - - - - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 7.91712in - 0.18258in - 1.2in - 1.2in - 8 - - - - true true @@ -2252,7 +2100,7 @@ 0.38395cm 0.95951in 3.73231in - 9 + 7 @@ -2463,7 +2311,7 @@ 9.91989cm 0.95951in 3.78138in - 11 + 9 @@ -2980,7 +2828,7 @@ 0.33883cm 1.12062cm 18.83224cm - 13 + 11 @@ -3009,10 +2857,10 @@ Textbox3 15.54129cm - 0.16845in + 0.19092in 0.5cm 7.52776in - 14 + 12 @@ -3461,7 +3309,7 @@ 0.42248cm 0.45862cm 9.43197cm - 22 + 20 = IIF( len(Parameters!RemolquePlaca1.Value) > 0,False, True) @@ -3522,7 +3370,7 @@ 9.94339cm 0.45862cm 9.5996cm - 23 + 21 = IIF( len(Parameters!RemolquePlaca2.Value) > 0,False, True) @@ -3912,7 +3760,7 @@ 0.31265cm 1.71919cm 19.23572cm - 24 + 22 =IIf(CountRows("DataSet5") = 0, True, False) @@ -3922,56 +3770,6 @@ - - External - =Parameters!QRCCP.Value - FitProportional - 7.91712in - 6.46004in - 1.2in - 1.2in - 25 - - - - - - true - true - - - - - QR Carta Porte - - - - - - - Textbox46 - 19.54966cm - 16.76139cm - 0.46104cm - 2.5cm - 26 - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -3996,7 +3794,7 @@ 4.92883cm 0.78571cm 9.73471cm - 27 + 23 @@ -4151,7 +3949,7 @@ 5.8484in 0.5cm 1.83161in - 30 + 26 @@ -4385,7 +4183,7 @@ - =Parameters!UsoCFDi.Value + + + + =Parameters!TelDestino.Value + + + + @@ -5345,7 +5162,7 @@ + + + + + + + + + + + + true + true + + + + + Sello digital del CFDI: + + + + + + + + + =Parameters!SelloCFDI.Value + + + + + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + + + + + + + + + + + + + + =Parameters!CFDIVersion.Value + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 0.2in + 0.16845in + 1.2in + 1.2in + 1 + + + + + + External + =Parameters!QRCCP.Value + FitProportional + 0.2in + 6.44591in + 1.2in + 1.2in + 2 + + + + + + true + true + + + + + QR Carta Porte + + + + + + + Textbox46 + 0.02931cm + 16.89267cm + 0.46104cm + 2.5cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 19.47094cm + 0.10398cm + 3.556cm + 19.66645cm + 30 + + + + - 18.06576in + 18.0263in @@ -297,22 +350,30 @@
+
- - + + + + Producto/Servicio + + +
+
+
- + @@ -320,7 +381,7 @@ - + @@ -328,7 +389,7 @@ - + @@ -336,7 +397,7 @@ - + @@ -344,7 +405,7 @@ - + @@ -352,7 +413,7 @@ - + @@ -360,7 +421,7 @@ - + @@ -368,7 +429,7 @@ - + @@ -376,7 +437,7 @@ - + @@ -384,7 +445,7 @@ - + @@ -392,7 +453,7 @@ - + @@ -400,7 +461,7 @@ - + @@ -408,7 +469,7 @@ - + @@ -416,7 +477,7 @@ - + @@ -424,7 +485,7 @@ - + @@ -432,7 +493,7 @@ - + @@ -440,7 +501,7 @@ - + @@ -448,7 +509,7 @@ - + @@ -456,7 +517,7 @@ - + @@ -464,7 +525,7 @@ - + @@ -472,7 +533,7 @@ - + @@ -480,7 +541,7 @@ - + @@ -488,7 +549,7 @@ - + @@ -496,7 +557,7 @@ - + @@ -504,7 +565,7 @@ - + @@ -512,7 +573,7 @@ - + @@ -520,7 +581,7 @@ - + @@ -528,7 +589,7 @@ - + @@ -536,7 +597,7 @@ - + @@ -544,7 +605,7 @@ - + @@ -552,7 +613,7 @@ - + @@ -560,7 +621,7 @@ - + @@ -568,7 +629,7 @@ - + @@ -576,7 +637,7 @@ - + @@ -584,7 +645,7 @@ - + @@ -592,7 +653,7 @@ - + @@ -600,7 +661,7 @@ - + @@ -608,7 +669,7 @@ - + @@ -616,7 +677,7 @@ - + @@ -624,13 +685,14 @@ - +
+
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index afa404951..004c014db 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3039,12 +3039,14 @@ Partial Class Clientes If e.Row.RowIndex > -1 Then If e.Row.DBCampo("Folio") = "N/D" Then e.Row.FCLiteral("LtlFactura").Text = e.Row.DataKey("Folio") - Else - If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 Then - e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DataKey("CveIE"), e.Row.DataKey("Folio")) - Else - e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DataKey("CveVenta"), e.Row.DataKey("Folio")) - End If + Else + If e.Row.DataKey("Tipo").ToUpper().Contiene("NC", "ANT") Then + e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DataKey("CveVenta"), e.Row.DataKey("Folio")) + Else + If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 Then + e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DataKey("CveIE"), e.Row.DataKey("Folio")) + End If + End If End If End If diff --git a/Ventas/RepRemisiones.aspx.vb b/Ventas/RepRemisiones.aspx.vb index a25f9bfaf..19a3d659f 100644 --- a/Ventas/RepRemisiones.aspx.vb +++ b/Ventas/RepRemisiones.aspx.vb @@ -157,7 +157,7 @@ Partial Class RepRemisiones GvDatos.Columns(1).HeaderText = "Fecha Cirugía" CType(GvDatos.Columns(1), HyperLinkField).DataTextFormatString = "{0:dd/MM/yyyy HH:mm}" CType(GvDatos.Columns(1), HyperLinkField).ItemStyle.Width = Unit.Pixel(120) - GvDatos.Columns(15).Visible = True + GvDatos.Columns(16).Visible = True End If End Sub diff --git a/Ventas/RepVentasUtilidadPadre.aspx b/Ventas/RepVentasUtilidadPadre.aspx index 72e778979..f46aebd0c 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx +++ b/Ventas/RepVentasUtilidadPadre.aspx @@ -282,7 +282,7 @@