diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 40d578ba6..aeab054b8 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1106,9 +1106,16 @@ Public Class ClsBancos dttpagosimpuestos = DtResultados End If + + Dim FechaPago As Date = dr("FechaDocumento").ToString.ToDate + + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + FechaPago = dr("FechaEmision").ToString.ToDate + End If + Timbre = Timbrado.PreparaTimbrePago40(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal, RFCCliente, dr("NombreCliente").ToString, dr("ClienteCP").ToString, dr("CodigoRegimenFiscal").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago, - dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal, + FechaPago, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal, UsuarioActual.Empresa.CP, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, dttpagosimpuestos, CFDIRelacionado:=CFDIRelacionado, RfcACuentaTerceros:=dr("RfcACuentaTerceros").ToString, NombreACuentaTerceros:=dr("NombreACuentaTerceros").ToString, RegimenFiscalACuentaTerceros:=dr("RegimenFiscalACuentaTerceros").ToString, DomicilioFiscalACuentaTerceros:=dr("DomicilioFiscalACuentaTerceros").ToString) @@ -1480,7 +1487,7 @@ Public Class ClsBancos Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1, Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False, Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1, Optional ImporteDeduccionesPago As Decimal = -1, - Optional AnticipoPuntual As Boolean = False) As Integer + Optional AnticipoPuntual As Boolean = False, Optional FechaEmision As Date = MinFecha) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Banc_IEAdd") @@ -1522,6 +1529,7 @@ Public Class ClsBancos .Add("@CveOCAnticipo", SqlDbType.Int).Value = CveOCAnticipo .Add("@ImporteDeduccionesPago", SqlDbType.Money).Value = ImporteDeduccionesPago .Add("@AnticipoPuntual", SqlDbType.Bit).Value = AnticipoPuntual + .Add("@FechaEmision", SqlDbType.Date).Value = FechaEmision End With Try diff --git a/App_Code/ClsClasificaciones.vb b/App_Code/ClsClasificaciones.vb index 5c81d9f0c..6bc2a73ac 100644 --- a/App_Code/ClsClasificaciones.vb +++ b/App_Code/ClsClasificaciones.vb @@ -273,7 +273,7 @@ Public Class ClsClasificaciones End Function Public Function AddClasificaciones(Clasificacion As String, Codigo As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = False, Optional RequiereAFInsumo As Boolean = False, Optional RequierePersonal As Boolean = False, - Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean + Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1, Optional PorMaximoDescuento As Decimal = 0) As Boolean Dim Retorno As Boolean = False Me.CveClasificacion = -1 @@ -302,6 +302,7 @@ Public Class ClsClasificaciones .Add("@TopCompras", SqlDbType.Bit).Value = TopCompras .Add("@TopVentas", SqlDbType.Bit).Value = TopVentas .Add("@PrecioBaseCosto", SqlDbType.Money).Value = PrecioBaseCosto + .Add("@PorMaximoDescuento", SqlDbType.Money).Value = PorMaximoDescuento .Add("@CveClasificacion", SqlDbType.Int).Direction = ParameterDirection.Output @@ -371,7 +372,7 @@ Public Class ClsClasificaciones End Function Public Function UpdateClasificacion(Clasificacion As String, Codigo As String, Estatus As Boolean, Afectable As Boolean, CveCategoria As Integer, CveUsuario As Integer, CveClasificacion As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True, - Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean + Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1, Optional PorMaximoDescuento As Decimal = 0) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClasificacionesUpdate") @@ -400,6 +401,7 @@ Public Class ClsClasificaciones .Add("@TopCompras", SqlDbType.Bit).Value = TopCompras .Add("@TopVentas", SqlDbType.Bit).Value = TopVentas .Add("@PrecioBaseCosto", SqlDbType.Money).Value = PrecioBaseCosto + .Add("@PorMaximoDescuento", SqlDbType.Money).Value = PorMaximoDescuento End With diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 388078978..b69978eb7 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -161,8 +161,10 @@ Public Class ClsClientes Public Property CveAlmacenAlterno As Integer = -1 Public Property CveAlmacenConsignacion As Integer = -1 Public Property UsaProductoAlterno As Boolean = False + Public Property CreditoRegistroFirmas As String Public Property EnDemanda As Boolean = False Public Property EnQuebranto As Boolean = False + Public Property GastosEnvio As Decimal = 0 #End Region @@ -415,8 +417,10 @@ Public Class ClsClientes _CveAlmacenConsignacion = Data(0)("CveAlmacenConsignacion").ToString.ToEntero _UsaProductoAlterno = CBool(Data(0)("UsaProductoAlterno")) - _EnDemanda = CBool(Data(0)("UsaProductoAlterno")) + _EnDemanda = CBool(Data(0)("EnDemanda")) _EnQuebranto = CBool(Data(0)("EnQuebranto")) + _CreditoRegistroFirmas = Data(0)("CreditoRegistroFirmas").ToString + _GastosEnvio = Data(0)("GastosEnvio").ToString.ToDecimal End If Retorno = True @@ -535,7 +539,7 @@ Public Class ClsClientes Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False, Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional UsaProductoAlterno As Boolean = False, - Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False) As Boolean + Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0) As Boolean Dim Retorno As Boolean = False @@ -669,6 +673,8 @@ Public Class ClsClientes .Add("@UsaProductoAlterno", SqlDbType.Bit).Value = UsaProductoAlterno .Add("@EnDemanda", SqlDbType.Bit).Value = EnDemanda .Add("@EnQuebranto", SqlDbType.Bit).Value = EnQuebranto + .Add("@CreditoRegistroFirmas", SqlDbType.VarChar).Value = CreditoRegistroFirmas + .Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio End With Try SqlAdapter.Fill(Data) @@ -715,7 +721,7 @@ Public Class ClsClientes Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False, Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional UsaProductoAlterno As Boolean = False, - Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False) As Boolean + Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0) As Boolean Dim Retorno As Boolean = False @@ -859,6 +865,8 @@ Public Class ClsClientes .Add("@UsaProductoAlterno", SqlDbType.Bit).Value = UsaProductoAlterno .Add("@EnDemanda", SqlDbType.Bit).Value = EnDemanda .Add("@EnQuebranto", SqlDbType.Bit).Value = EnQuebranto + .Add("@CreditoRegistroFirmas", SqlDbType.VarChar).Value = CreditoRegistroFirmas + .Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 376513ad8..723c9861d 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -1728,7 +1728,7 @@ Public Class ClsOS Return Retorno End Function - Public Function UpdateOrdenesServiciosAsignadas(CveOSDetalle As Integer, CveUsuario As Integer, FechaCita As Date, HoraCita As DateTime, CveEmpresa As Integer) As Boolean + Public Function UpdateOrdenesServiciosAsignadas(CveOSDetalle As Integer, CveUsuarioAtendio As Integer, FechaCita As Date, HoraCita As DateTime, CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServiciosAsignadasUpdate") @@ -1737,6 +1737,7 @@ Public Class ClsOS .Add("@FechaCita", SqlDbType.Date).Value = FechaCita .Add("@HoraCita", SqlDbType.DateTime).Value = HoraCita .Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle + .Add("@CveUsuarioAtendio", SqlDbType.Int).Value = CveUsuarioAtendio .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario End With diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 5de754c67..bf49e1ed5 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7750,6 +7750,17 @@ Public Class ClsPaginas params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, ImageToBase64(Drawing.Image.FromFile(FirmaAut.FullName), Drawing.Imaging.ImageFormat.Png), ""))) + If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197 Then + + Dim ObjProveedor As New ClsCompProveedores + If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ObjOC.CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then + If ObjProveedor.DtResultados.Rows.Count > 0 Then + params.Add(New ReportParameter("PlazoPago", ObjProveedor.PlazoPago.ToString)) + End If + End If + + End If + If Archivo.Exists Then bytes = StreamPDF(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta), DtDetalle, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR) Else @@ -10065,6 +10076,7 @@ Public Class ClsPaginas PaginaDict.Add("/General/CatSatListado69B.aspx".ToUpper, 1038) PaginaDict.Add("/General/CatMedidaEquivalencia.aspx".ToUpper(), 773) PaginaDict.Add("/General/RepIndicadorResumen.aspx".ToUpper(), 110) + PaginaDict.Add("/General/SaldosMenores.aspx".ToUpper(), -1) #End Region #Region "GPS" PaginaDict.Add("/GPS/RepTemperatura.aspx".ToUpper(), 681) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 17d7860aa..65d76357c 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -1052,7 +1052,7 @@ Public Class ClsProductosServicios Return Retorno End Function - Public Function AddPSAdicionales(CvePS As Integer, CvePSAdicional As Integer, Cantidad As Decimal) As Boolean + Public Function AddPSAdicionales(CvePS As Integer, CvePSAdicional As Integer, Cantidad As Decimal, Tipo As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_ProductosServiciosAdicionalesAdd") @@ -1061,7 +1061,7 @@ Public Class ClsProductosServicios .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CvePSAdicional", SqlDbType.Int).Value = CvePSAdicional .Add("@Cantidad", SqlDbType.Money).Value = Cantidad - + .Add("@Tipo", SqlDbType.TinyInt).Value = Tipo End With Try @@ -1081,7 +1081,7 @@ Public Class ClsProductosServicios Return Retorno End Function - Public Function UpdatePSAdicionales(CvePS As Integer, CvePSAdicional As Integer, CvePSAdicionalAnterior As Integer, Cantidad As Decimal) As Boolean + Public Function UpdatePSAdicionales(CvePS As Integer, CvePSAdicional As Integer, CvePSAdicionalAnterior As Integer, Cantidad As Decimal, Tipo As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_ProductosServiciosAdicionalesUpdate") @@ -1091,7 +1091,7 @@ Public Class ClsProductosServicios .Add("@CvePSAdicional", SqlDbType.Int).Value = CvePSAdicional .Add("@CvePSAdicionalAnterior", SqlDbType.Int).Value = CvePSAdicionalAnterior .Add("@Cantidad", SqlDbType.Money).Value = Cantidad - + .Add("@Tipo", SqlDbType.TinyInt).Value = Tipo End With Try diff --git a/App_Code/ClsPuntoVenta.vb b/App_Code/ClsPuntoVenta.vb index cc16fe654..7ae142533 100644 --- a/App_Code/ClsPuntoVenta.vb +++ b/App_Code/ClsPuntoVenta.vb @@ -17,19 +17,25 @@ Public Class ClsPuntoVenta Private SqlCommand As SqlCommand Private SqlTransacc As SqlTransaction Private Data As DataTable + Private Dataset As DataSet 'Atributos de la clase Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'PARA REGISTRAR CONEXION - Private CveConexion As Integer = 0 - + Private CveConexion As Integer = 0 + #End Region - + #Region "Propiedades" Public ReadOnly Property DtResultados() As DataTable Get DtResultados = Data End Get + End Property + Public ReadOnly Property DataSetResultados() As DataSet + Get + DataSetResultados = Dataset + End Get End Property Public Property CveCorte As Integer @@ -219,74 +225,34 @@ Public Class ClsPuntoVenta OnError("Ocurrió un error al obtener los Cortes del Punto de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try - Return Retorno - End Function - - Public Function GetCortesDetalleVentas(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean - Dim Retorno As Boolean = False - - DataAdapter("PA_Vta_CortesDetalleVentasGet") - - With SqlAdapter.SelectCommand.Parameters - .Add("@CveCorte", SqlDbType.Int).Value = CveCorte - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@Opcion", SqlDbType.Int).Value = Opcion - End With - - Try - SqlAdapter.Fill(Data) - - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - Return Retorno End Function - 'Public Function GetCortesPorCuenta(CveCuenta As Integer, CveEmpresa As Integer) As Boolean - ' Dim Retorno As Boolean = False - - ' DataAdapter("PA_Vta_CuentaCorteGet") - - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta - ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - ' .Add("@CveCorte", SqlDbType.Int).Direction = ParameterDirection.Output - ' End With - - ' Try - ' SqlAdapter.Fill(Data) - ' CveCorte = Integer.Parse(SqlAdapter.SelectCommand.Parameters("@CveCorte").Value.ToString) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al obtener los cuenta de corte", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - - ' Return Retorno - 'End Function - - - Public Function GetVta_ReporteCortes(CveEmpresa As Integer, FechaI As Date, FechaF As Date, Optional CveSubProyecto As Integer = -1, Optional CveCorte As Integer = -1) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Vta_ReporteCortesGet") - - SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - SqlAdapter.SelectCommand.Parameters.Add("@FechaInicio", SqlDbType.Date).Value = FechaI - SqlAdapter.SelectCommand.Parameters.Add("@FechaFin", SqlDbType.Date).Value = FechaF - SqlAdapter.SelectCommand.Parameters.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - SqlAdapter.SelectCommand.Parameters.Add("@CveCorte", SqlDbType.Int).Value = CveCorte - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el Reporte de Cortes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - - Return Retorno - End Function - + + + 'Public Function GetCortesPorCuenta(CveCuenta As Integer, CveEmpresa As Integer) As Boolean + ' Dim Retorno As Boolean = False + + ' DataAdapter("PA_Vta_CuentaCorteGet") + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' .Add("@CveCorte", SqlDbType.Int).Direction = ParameterDirection.Output + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' CveCorte = Integer.Parse(SqlAdapter.SelectCommand.Parameters("@CveCorte").Value.ToString) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener los cuenta de corte", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + 'End Function + + Public Function GetVta_MetodosPago(CveCorte As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_MetodosPagoGet") @@ -388,44 +354,6 @@ Public Class ClsPuntoVenta Return Retorno End Function - Public Function GetVta_MovimientosCajas(CveCorte As Integer, TipoMovimiento As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Vta_MovimientosCajasGet") - - With SqlAdapter.SelectCommand.Parameters - .Add("@CveCorte", SqlDbType.Int).Value = CveCorte - .Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento - End With - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener los Movimientos de Caja del Cortes del Punto de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - - Return Retorno - End Function - - Public Function GetVta_MovimientosCajasReporte(CveCorte As Integer, TipoMovimiento As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Vta_MovimientosCajasRepGet") - - With SqlAdapter.SelectCommand.Parameters - .Add("@CveCorte", SqlDbType.Int).Value = CveCorte - .Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento - End With - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el reporte de caja del cortes del punto de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - - Return Retorno - End Function - Public Function GetVta_VentasPago(CveCorte As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasPagoGet") @@ -450,7 +378,8 @@ Public Class ClsPuntoVenta If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not Dataset Is Nothing Then Dataset.Dispose() : Dataset = Nothing If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 6255262da..a79bf4f32 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -3450,39 +3450,71 @@ Public Class ClsVentas #End Region #Region "Punto Venta" - - Public Function AddVtaCortesDetalles(CveCorte As Integer, CveMetodoPago As Integer, Importe As Double) As Boolean + Public Function GetVta_ReporteCortes(CveEmpresa As Integer, FechaI As Date, FechaF As Date, Optional CveSubProyecto As Integer = -1, Optional CveCorte As Integer = -1) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Vta_CortesDetallesAdd") - - - If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc + DataAdapter("PA_Vta_ReporteCortesGet") With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaInicio", SqlDbType.Date).Value = FechaI + .Add("@FechaFin", SqlDbType.Date).Value = FechaF + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveCorte", SqlDbType.Int).Value = CveCorte - .Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago - .Add("@Importe", SqlDbType.Money).Value = Importe End With Try SqlAdapter.Fill(Data) Retorno = True - Catch ex As SqlException - OnError("Ocurrió un error al guardar el Detalle del Corte de Turno.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + Catch ex As Exception + OnError("Ocurrió un error al obtener el Reporte de Cortes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno End Function - Public Function GetCortesDetalleVentasResumen(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean + + ''' + ''' Desglose del reporte de cortes, resumen e IVA + ''' + ''' + ''' + ''' + ''' + ''' + Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer, Optional ConsultaIVA As Boolean = False) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Vta_CortesDetalleVentasResumenGet") + DataAdapter("PA_Vta_ReporteCortesDetalleGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveCorte", SqlDbType.Int).Value = CveCorte .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@ConsultaIVA", SqlDbType.Bit).Value = ConsultaIVA + End With + + Try + Dataset = New DataSet() + SqlAdapter.Fill(Dataset) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function GetCortesDetalleVentas(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Vta_CortesDetalleVentasGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCorte", SqlDbType.Int).Value = CveCorte + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try @@ -3496,28 +3528,112 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetCortesDetalleVentasResumenIVA(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Vta_CortesDetalleVentasResumenIVAGet") + 'Public Function AddVtaCortesDetalles(CveCorte As Integer, CveMetodoPago As Integer, Importe As Double) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_Vta_CortesDetallesAdd") + + + ' If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveCorte", SqlDbType.Int).Value = CveCorte + ' .Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago + ' .Add("@Importe", SqlDbType.Money).Value = Importe + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As SqlException + ' OnError("Ocurrió un error al guardar el Detalle del Corte de Turno.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + 'End Function + + 'Public Function GetCortesDetalleVentasResumen(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean + ' Dim Retorno As Boolean = False + + ' DataAdapter("PA_Vta_CortesDetalleVentasResumenGet") + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveCorte", SqlDbType.Int).Value = CveCorte + ' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + ' .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 detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + 'End Function + Public Function GetVta_MovimientosCajas(CveCorte As Integer, TipoMovimiento As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_MovimientosCajasGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveCorte", SqlDbType.Int).Value = CveCorte - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento End With Try SqlAdapter.Fill(Data) - Retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + OnError("Ocurrió un error al obtener los Movimientos de Caja del Cortes del Punto de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno End Function + Public Function GetVta_MovimientosCajasReporte(CveCorte As Integer, TipoMovimiento As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_MovimientosCajasRepGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCorte", SqlDbType.Int).Value = CveCorte + .Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de caja del cortes del punto de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + + 'Public Function GetCortesDetalleVentasResumenIVA(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean + ' Dim Retorno As Boolean = False + + ' DataAdapter("PA_Vta_CortesDetalleVentasResumenIVAGet") + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveCorte", SqlDbType.Int).Value = CveCorte + ' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + ' .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 detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + 'End Function + Public Function GetCortesDetalleDepositosCaja(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -4334,7 +4450,8 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetRepAnticiposNCIXCDetalle(CveCliente As Integer, CveSubProyecto As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, ConSaldo As Integer, Tipo As Integer, CveMoneda As Integer, FechaICorte As Date, FechaFCorte As Date, TipoCambio As Integer, TCEspecifico As Double, Optional CveVendedor As Integer = -1) As Boolean + Public Function GetRepAnticiposNCIXCDetalle(CveCliente As Integer, CveSubProyecto As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, ConSaldo As Integer, Tipo As Integer, CveMoneda As Integer, FechaICorte As Date, FechaFCorte As Date, TipoCambio As Integer, TCEspecifico As Double, Optional CveVendedor As Integer = -1, + Optional SaldoMayorA As Decimal = -999999999999, Optional SaldoMenorA As Decimal = 999999999999) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepAnt-NC-IXCDetalle") With SqlAdapter.SelectCommand.Parameters @@ -4351,6 +4468,8 @@ Public Class ClsVentas .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@SaldoMayorA", SqlDbType.Money).Value = SaldoMayorA + .Add("@SaldoMenorA", SqlDbType.Money).Value = SaldoMenorA End With Try SqlAdapter.Fill(Data) @@ -6899,7 +7018,7 @@ Public Class ClsVentas End Function - Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuario As Integer, CveTipoVenta As Integer, Opcion As Integer) As Boolean + Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuario As Integer, CveTipoVenta As Integer, FechaInicioPago As Date, FechaFinPago As Date) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_ComisionesMedicasRepGet") @@ -6914,7 +7033,8 @@ Public Class ClsVentas .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta - .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@FechaInicioPago", SqlDbType.Date).Value = FechaInicioPago + .Add("@FechaFinPago", SqlDbType.Date).Value = FechaFinPago End With @@ -6934,7 +7054,7 @@ Public Class ClsVentas #Region "VENTAS MEDICAS COMISIONES ESPECIALES" - Public Function GetComisionesMedicasEsPeciales(CveMedico As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean + Public Function GetComisionesMedicasEspeciales(CveMedico As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_ComisionesMedicasEspecialesGet") diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index 60c6dc724..54179530f 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -2590,6 +2590,11 @@ concep.DescripcionesEspecificas.NumeroSerie) cfdi.CartaPorte30IdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PesoBrutoVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM) + If Carta.Mercancias.Mercancias.Max(Function(x) x.MaterialPeligroso) = "" Then 'si no hay material peligro se limpian los valores + Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = "" + Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente = "" + End If + cfdi.CartaPorte30Seguros(Carta.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.NombreSeguroCarga, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroCarga, diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index 4c914b2eb..bd34dbf6f 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -67,7 +67,7 @@ Public Class E141 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe If ObjUsuarios.DtResultados.Rows.Count > 0 Then Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() - UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, CveEmpresa:=CveEmpresa) + UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, CveEmpresa:=CveEmpresa, GenerarMenu:=False) UsuarioActual.CveEmpresa = CveEmpresa HttpContext.Current.Session("UsuarioSIG") = UsuarioActual CreaObjetoEmpresa(UsuarioActual) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index e606c32b5..dde388876 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -811,6 +811,19 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim retorno As String = "" Dim DtRetorno As DataTable = Nothing + Dim Estatus = IfNull(context.Request("estatus"), "-1").ToString.ToEntero + + Dim filtro As String = "" + + If Estatus = 1 Then + filtro = " Estatus = 'Activo' " + End If + + If Estatus = 0 Then + filtro = " Estatus = 'Inactivo' " + End If + + Dim usuario As Usuario = UsuarioActual(context) Dim CveEmpresa As Integer If IsNothing(usuario) Then @@ -819,7 +832,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState CveEmpresa = usuario.CveEmpresa Dim Name = IfNull(context.Request("Name"), "-1").ToString - Dim dt As DataTable = ClsPaginas.GlobalDTCompProveedores(CveEmpresa) + Dim dt As DataTable = ClsPaginas.GlobalDTCompProveedores(CveEmpresa).FiltraParametros(filtro) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then DtRetorno = dt.FiltraParametros(String.Format("NombreCortoProveedor like '%{0}%'", Name)) End If diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 518ea5655..b24b9059c 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -628,14 +628,14 @@ function txtSumaCuentaRetorno(txt) { debugger; var comision2 = ToDouble($('#C_TxtCuentaRetorno').val()); - if (comision2 > ValorTotalSeleccionado) { - $('#C_TxtCuentaRetorno').val(descuento) - alert("No es posible poner un IVA superior a lo seleccionado") - } else { + //if (comision2 > ValorTotalSeleccionado) { + // $('#C_TxtCuentaRetorno').val(descuento) + // alert("No es posible poner un IVA superior a lo seleccionado") + //} else { saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario; $('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); descuento = ToDouble($('#C_TxtCuentaRetorno').val()) - } + //} } diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 2f1a1fdcd..7542fe598 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -157,6 +157,11 @@ Partial Class Bancos_DepositosCaja Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click + + If Not Validaciones() Then + Exit Sub + End If + Dim TotalImporte As Decimal = 0 Dim TotalImportePrePoliza As Decimal Dim Comision As Decimal = TxtComision.Text.ToDecimal @@ -172,13 +177,13 @@ Partial Class Bancos_DepositosCaja Exit Sub End If - + Dim tContador As Integer = 0 For Each Gvr As GridViewRow In GvFacturas.Rows If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal Next - If TotalImporte = 0 Then - Alert("Seleccion una factura para realizar el depósito", TipoMensaje.MsgAdvertencia) + If TotalImporte = 0 AndAlso CuentaRetorno <> 0 Then + Alert("Seleccione una factura para realizar el depósito", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -465,8 +470,58 @@ Partial Class Bancos_DepositosCaja lblValorTotalSeleccionado.Text = "0.0" CargaDatos() ObjConta.Dispose() - End Sub - + End Sub + + Private Function Validaciones() As Boolean + + Dim Respuesta As Boolean = True + + If Not ValidaCobranza() Then + Respuesta = False + End If + + Return Respuesta + + End Function + + + Private Function ValidaCobranza() As Boolean + Dim Respuesta As Boolean = False + + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + + Dim ObjMovtos As New ClsMovimientos() + Dim FechaI, FechaF As Date + FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha) + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1) + + If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, FechaI, FechaF) Then + Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario}) AND TipoDocto IN ('Ing','Rem')") + 'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario} ") + 'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta + + If dtt.Rows.Count = 0 Then + Respuesta = True + Else + Respuesta = False + Alert("No se puede realizar el depósito, ya que hay cobros pendientes por aplicar.", TipoMensaje.MsgAdvertencia) + End If + + Else + Alert("Error al consultarcobros pendientes.", TipoMensaje.MsgAdvertencia) + Respuesta = False + End If + + ObjMovtos.Dispose() + + Else + Respuesta = True + End If + + Return Respuesta + End Function + + Private Sub ObtenerTotalImporta() Dim Total As Double = 0 diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 14c0c445b..3aa0660a9 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -3636,9 +3636,9 @@ Partial Class Bancos_IE End If 'Apartado Nueva Modalidad de INGPC Charlie - If RBL.SelectedValue = "C" AndAlso Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("INGPC", "DEV") Then - DivIvaIxC.Visible = True - End If + 'If RBL.SelectedValue = "C" AndAlso Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("INGPC", "DEV") Then + ' DivIvaIxC.Visible = True + 'End If UpDatos.Update() diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index e2eb1826e..7326ad20b 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -7,6 +7,10 @@ .row { margin: 0 -10px; } + .calendar-extender-popup { + position: absolute; + z-index: 10000; /* Asegura que se muestre sobre otros elementos */ + } @@ -535,10 +539,44 @@ - - diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 1b32c63d8..f8f7db127 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -1110,6 +1110,18 @@ Partial Class Bancos_PopIEVentas #Region "G U A R D A R" Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click + Dim FechaEmision As Date = MinFecha + + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + FechaEmision = TxtFechaEmision.Text.ToDate + + If FechaEmision <= MinFecha Then + Alert("Fecha de Emisión no valida", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + End If + If ChkComplementoPago.Checked Then Dim objGral As New ClsGralFolios Dim SalirDeMetodo As Boolean = False @@ -1248,7 +1260,9 @@ Partial Class Bancos_PopIEVentas Select Case RBLContado.SelectedValue Case "1" ' Banco - CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte) + CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", + True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, + Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte, FechaEmision:=FechaEmision) If CveIE > 0 Then Pago.ImportePago = ImportePagado @@ -1523,4 +1537,11 @@ Partial Class Bancos_PopIEVentas End Sub + + Protected Sub ChkComplementoPago_CheckedChanged(sender As Object, e As EventArgs) + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + DvFechaEmision.Visible = ChkComplementoPago.Checked + UpGuardar.Update() + End If + End Sub End Class \ No newline at end of file diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index bd784469f..091ecb714 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -79,11 +79,11 @@ Partial Class Bancos_RepCortes Dim FechaI As Date = If(txtFechaVI.Text <> "", txtFechaVI.Text.ToDate, MinFecha) Dim FechaF As Date = If(txtFechaVF.Text <> "", txtFechaVF.Text.ToDate, MaxFecha) - Dim ObjPuntoVenta As New ClsPuntoVenta - If ObjPuntoVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaI, FechaF, DdlSubProyectos.SelectedValue.ToEntero) Then - DtCortes = ObjPuntoVenta.DtResultados.Copy() + Dim ObjVenta As New ClsVentas + If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaI, FechaF, DdlSubProyectos.SelectedValue.ToEntero) Then + DtCortes = ObjVenta.DtResultados.Copy() End If - ObjPuntoVenta.Dispose() + ObjVenta.Dispose() If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then GvDatos.Columns(3).Visible = True @@ -111,6 +111,17 @@ Partial Class Bancos_RepCortes If DtCortes IsNot Nothing Then e.Row.FCLiteral("LtlImporteInicial").Text = DtCortes.SUMD("ImporteInicial").FormatoNumero(2) End If + Else + If UsuarioActual.CveRol = 1 Then + If e.Row.DBCampo("VentasCorte").ToDecimal.RoundSQL <> e.Row.DBCampo("VentaTotalIngreso").ToDecimal + e.Row.DBCampo("VentaTotalRemision").ToDecimal.RoundSQL Then + e.Row.Cells(2).ForeColor = Drawing.Color.Red + e.Row.Cells(2).ToolTip = (e.Row.DBCampo("VentasCorte").ToDecimal - (e.Row.DBCampo("VentaTotalIngreso").ToDecimal + e.Row.DBCampo("VentaTotalRemision").ToDecimal)).ToString + End If + If e.Row.DBCampo("VentasCorte").ToDecimal.RoundSQL <> e.Row.DBCampo("VentasContado").ToDecimal + e.Row.DBCampo("VentasCredito").ToDecimal.RoundSQL Then + e.Row.Cells(6).ForeColor = Drawing.Color.Red + e.Row.Cells(6).ToolTip = (e.Row.DBCampo("VentasCorte").ToDecimal - (e.Row.DBCampo("VentasContado").ToDecimal + e.Row.DBCampo("VentasCredito").ToDecimal)).ToString + End If + End If End If End If End Sub @@ -182,38 +193,67 @@ Partial Class Bancos_RepCortes Dim Finalizado As Integer = gvr.DataKey("Finalizado").ToString.ToEntero Fecha = gvr.DataKey("FechaInicial").ToString Nombre = gvr.DataKey("Nombre").ToString - Dim ObjPuntoVenta As New ClsPuntoVenta - Dim ObjVentas As New ClsVentas + + 'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then + ' DtCortesVentas = ObjPuntoVenta.DtResultados.Copy() + ' GvD.DataSource = DtCortesVentas + + ' divDetalle.Visible = True + 'End If + + 'If ObjVentas.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + ' GvP.DataSource = ObjVentas.DtResultados + ' DtCortesVentasResumen = ObjVentas.DtResultados + 'End If + + 'If UsuarioActual.CveEmpresa.Contiene(190, 192) Then + ' DivIVA.Visible = True + ' If ObjVentas.GetCortesDetalleVentasResumenIVA(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + ' GvPorIVA.DataSource = ObjVentas.DtResultados + ' End If + 'End If + + Dim ObjVentas As New ClsVentas + If ObjVentas.GetVta_ReporteCortesDetalle(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion:=2, ConsultaIVA:=UsuarioActual.CveEmpresa.Contiene(190, 192)) Then + Dim DsDatos = ObjVentas.DataSetResultados.Copy() + If DsDatos IsNot Nothing Then + 'DESGLOSE + DtCortesVentas = DsDatos.Tables(0) + GvD.DataSource = DtCortesVentas - If ObjVentas.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - GvP.DataSource = ObjVentas.DtResultados - DtCortesVentasResumen = ObjVentas.DtResultados - End If + divDetalle.Visible = True + 'RESUMEN + DtCortesVentasResumen = DsDatos.Tables(1) + GvP.DataSource = DtCortesVentasResumen - If UsuarioActual.CveEmpresa.Contiene(190, 192) Then - DivIVA.Visible = True - If ObjVentas.GetCortesDetalleVentasResumenIVA(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - GvPorIVA.DataSource = ObjVentas.DtResultados + 'RESUMEN - IVA + If UsuarioActual.CveEmpresa.Contiene(190, 192) Then + DivIVA.Visible = True + GvPorIVA.DataSource = DsDatos.Tables(2) + Dim tsum As Decimal = DsDatos.Tables(2).SUMD("IVA16") + DsDatos.Tables(2).SUMD("IVA0") + If Math.Abs(tsum - DtCortesVentasResumen.MAX("Importe").ToDecimal) > 1 Then + GvPorIVA.ForeColor = Drawing.Color.Red + GvPorIVA.ToolTip = (tsum - DtCortesVentasResumen.MAX("Importe").ToDecimal).ToString + Else + GvPorIVA.ForeColor = Drawing.Color.Black + End If + End If + End If End If + If ObjVentas.GetVta_MovimientosCajasReporte(CveCorte, -1) Then + GvIngresosRetiros.DataSource = ObjVentas.DtResultados.Copy() + End If + + If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVentas.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then GvDep.DataSource = ObjVentas.DtResultados If ObjVentas.DtResultados.Rows.Count > 0 Then DivDep.Visible = True End If - End If - - If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then - DtCortesVentas = ObjPuntoVenta.DtResultados.Copy() - GvD.DataSource = DtCortesVentas - - divDetalle.Visible = True - End If - - If ObjPuntoVenta.GetVta_MovimientosCajasReporte(CveCorte, -1) Then - GvIngresosRetiros.DataSource = ObjPuntoVenta.DtResultados.Copy() End If + ObjVentas.Dispose() If (DtCortesVentasResumen IsNot Nothing AndAlso DtCortesVentasResumen.Rows.Count > 0) Or (DtCortesVentas IsNot Nothing AndAlso DtCortesVentas.Rows.Count > 0) Then HplDownPDF.Visible = True @@ -224,9 +264,6 @@ Partial Class Bancos_RepCortes HplDownPDF.Visible = False HplDownEXCEL.Visible = False End If - ObjVentas.Dispose() - ObjPuntoVenta.Dispose() - GvD.DataBind() GvP.DataBind() @@ -234,12 +271,6 @@ Partial Class Bancos_RepCortes GvPorIVA.DataBind() GvIngresosRetiros.DataBind() - - GvD.DataBind() - GvP.DataBind() - GvDep.DataBind() - GvPorIVA.DataBind() - If UsuarioActual.CveEmpresa.Contiene(189, 193, 195, 196, 197) Then DivAnexo.Visible = True Dim CveCuenta As Integer = 0 diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 2beb02694..8480b35d7 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6,6 +6,7 @@ Imports System.Xml Imports System.Diagnostics Imports System.Globalization Imports System.IO +Imports System.IO Imports System.Threading.Tasks Imports Newtonsoft.Json Imports Extensiones @@ -3594,13 +3595,10 @@ Partial Class Compras_Compras End If End If -<<<<<<< HEAD - CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion) - CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion) CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion) CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion) ->>>>>>> GDiaz 2024.05.21 + LbAgregar.Enabled = True UpPSS.Update() @@ -3647,11 +3645,7 @@ Partial Class Compras_Compras PorcentajeProntoPago = ObjProveedor.PorcentajeProntoPago End If -<<<<<<< HEAD -======= - ->>>>>>> GDiaz 2024.05.21 Else Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia) End If @@ -3659,9 +3653,6 @@ Partial Class Compras_Compras -<<<<<<< HEAD -======= ->>>>>>> GDiaz 2024.05.21 If UsuarioActual.Empresa.Funcionalidad(560) = "1" Then If ObjProveedor.GetProveedoresEvaluacionPediente(Me.CveProveedor, UsuarioActual.CveEmpresa) Then If ObjProveedor.DtResultados.Rows.Count > 0 Then @@ -9790,7 +9781,7 @@ Partial Class Compras_Compras - + Dim TCAnt As Decimal = If(DdlMoneda.SelectedValue = "1", 1, If(CveCompra > 0, LblTC.Text.ToDecimal, TxtTC.Text.ToDecimal)) If UsuarioActual.Empresa.CveEmpresa.Contiene(13, 83) Then @@ -9802,7 +9793,7 @@ Partial Class Compras_Compras e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TCCompra").ToDouble, DdlMoneda.SelectedValue, - IIf(DdlMoneda.SelectedValue = "1", 1, TxtTC.Text), + TCAnt, e.Row.FCTextBox("TxtComision").ClientID )) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO @@ -9834,7 +9825,7 @@ Partial Class Compras_Compras e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TCCompra").ToDouble, DdlMoneda.SelectedValue, - IIf(DdlMoneda.SelectedValue = "1", 1, TxtTC.Text) + TCAnt )) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO e.Row.FCTextBox("TxtAnticipo").Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1},{2},{3},{4},{5});", @@ -11745,7 +11736,42 @@ Partial Class Compras_Compras End Sub Protected Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged CambiaTipoPago(True) + + ValidaRegistroSinXML() + End Sub + + Private Sub ValidaRegistroSinXML() + + If CveFactura <= 0 And CveCompra <= 0 Then + + If UsuarioActual.Empresa.Funcionalidad(123) <> "" And Not UsuarioActual.TienePermisoProceso(156) Then + If Not ValidaCierrePeriodo() Then + Alert("El periodo de la compra actual ya se encuentra cerrado. No podra registrar la compra.", TipoMensaje.MsgAdvertencia) + BtnGuardar.Visible = False + UpFacturar.Update() + Exit Sub + End If + End If + + If UsuarioActual.TienePermisoProceso(365) Then + + BtnGuardar.Visible = False + + If RBLPago.SelectedValue.ToEntero = 3 Then + BtnGuardar.Visible = True + End If + + Else + BtnGuardar.Visible = True + End If + + End If + + UpFacturar.Update() + + End Sub + Private Sub CambiaTipoPago(MostrarModal As Boolean) DdlPersonalReembolso.Visible = False DdlCuentaCajaChicaReembolso.Visible = False @@ -13144,7 +13170,7 @@ Partial Class Compras_Compras DDLDevolucion.Items.Clear() Dim dtt As DataTable = objcompras.DtResultados If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then 'solo los últimos 3 meses - dtt = dtt.FiltraParametros($"Fecha >= #{NowADS.AddMonths(-3).ToString("yyyy/MM/dd")}#") + dtt = dtt.FiltraParametros($"Fecha >= #{NowADS.AddMonths(-6).ToString("yyyy/MM/dd")}#") End If DDLDevolucion.DataSource = dtt DDLDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1")) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index ebeb39d24..ce220c9b3 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -346,7 +346,7 @@ Partial Class PopUpVerFactura Dim totalPallets As String = "" Dim totalBachas As String = "" Dim dfec As DateTime = fecha.ToDateTime() - Dim fechas As String = String.Format(New System.Globalization.CultureInfo("es-MX"), "{0dd} DE {0:MMMM} DEL {0:yyyy}", dfec).ToUpper() + Dim fechas As String = String.Format(New System.Globalization.CultureInfo("es-MX"), "{0:dd} DE {0:MMMM} DEL {0:yyyy}", dfec).ToUpper() Dim totalcajas As String = "" Dim TotalBins As String = "" @@ -1566,29 +1566,47 @@ Partial Class PopUpVerFactura If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 Then OpcionDetallado = 2 Dim ObjVenta As New ClsVentas - Dim ObjPuntoVenta As New ClsPuntoVenta - If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then - DtCortesVentasResumen = ObjVenta.DtResultados.Copy() + If ObjVenta.GetVta_ReporteCortesDetalle(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa, 2) Then + Dim DsDatos = ObjVenta.DataSetResultados.Copy() + If DsDatos IsNot Nothing Then + DtCortesVentas = DsDatos.Tables(0) + + DtCortesVentasResumen = DsDatos.Tables(1) + End If End If + ' If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then + ' DtCortesVentasResumen = ObjVenta.DtResultados.Copy() + 'End If - If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa, OpcionDetallado) Then - DtCortesVentas = ObjPuntoVenta.DtResultados.Copy() - If DtCortesVentas.Rows.Count > 0 Then - Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0") + 'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa, OpcionDetallado) Then + ' DtCortesVentas = ObjPuntoVenta.DtResultados.Copy() + ' If DtCortesVentas.Rows.Count > 0 Then + ' Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0") + ' Fecha = RowInfo("FechaInicial").ToString + ' Nombre = RowInfo("Nombre").ToString + ' End If + 'End If + + If DtCortesVentas.Rows.Count > 0 Then + Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0") + + If RowInfo IsNot Nothing Then Fecha = RowInfo("FechaInicial").ToString Nombre = RowInfo("Nombre").ToString End If + End If If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 Then - If ObjPuntoVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, CveSubProyecto, CveCorte:=CveCorte) Then - DtReporteCorte = ObjPuntoVenta.DtResultados.FiltraParametros("CveCorte > 0") + If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, CveSubProyecto, CveCorte:=CveCorte) Then + DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("CveCorte > 0") + Fecha = DtReporteCorte.FiltroPrimeroValor("FechaInicial", "") End If - If ObjPuntoVenta.GetVta_MovimientosCajas(CveCorte, -1) Then - DtIngresosRetiros = ObjPuntoVenta.DtResultados.Copy() + If ObjVenta.GetVta_MovimientosCajas(CveCorte, -1) Then + DtIngresosRetiros = ObjVenta.DtResultados.Copy() End If If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVenta.GetCortesDetalleDepositosCaja(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then @@ -1597,7 +1615,7 @@ Partial Class PopUpVerFactura End If ObjVenta.Dispose() - ObjPuntoVenta.Dispose() + Dim FechaCorte As String = $" Fecha fin {Fecha}" Dim Usuario As String = $" Usuario {Nombre}" diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb index 6774efaa5..b6fca602a 100644 --- a/Contabilidad/ContabilidadElectronica.aspx.vb +++ b/Contabilidad/ContabilidadElectronica.aspx.vb @@ -178,16 +178,16 @@ Partial Class Contabilidad_ContabilidadElectronica Dim DtCuentas As New DataTable If UsuarioActual.Empresa.TipoContabilidad = 1 Then Dim objconta As New ClsContabilidad - If objconta.GetBalanzaComprobacion(FechaI, FechaF, 1, -1, -1, -1, UsuarioActual.CveEmpresa, 0) Then + If objconta.GetBalanzaComprobacion(FechaI, FechaF, 1, 1, -1, -1, UsuarioActual.CveEmpresa, 0) Then DtCuentas = objconta.DtResultados End If objconta.Dispose() If DtCuentas IsNot Nothing Then - Dim Deudor As Decimal = DtCuentas.SUM("SaldoAD") - Dim Acreedor As Decimal = DtCuentas.SUM("SaldoAA") + Dim Deudor As Decimal = DtCuentas.SUM("SaldoAD", "Id is null") + Dim Acreedor As Decimal = DtCuentas.SUM("SaldoAA", "Id is null") If Deudor <> Acreedor Then - Alert("los Saldos Actuales no cuadran.", TipoMensaje.MsgError) + Alert("los Saldos Actuales no cuadran. " & Deudor - Acreedor, TipoMensaje.MsgError) Exit Sub End If End If diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index ab4a57400..07148d380 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1690,7 +1690,7 @@ Partial Class ContabilidadC_RegPrePolizaS End If - If DdlPlantilla.SelectedValue.ToEntero <> 53 Then + If DdlPlantilla.SelectedValue.ToEntero <> 53 And Not CvePrePoliza > 0 Then Dim x As Integer = 0 For Each gvRow As GridViewRow In GvMov.Rows @@ -1769,7 +1769,7 @@ Partial Class ContabilidadC_RegPrePolizaS DtMovimientos.AcceptChanges() - If DdlPlantilla.SelectedValue.ToEntero <> 53 Then + If DdlPlantilla.SelectedValue.ToEntero <> 53 And Not CvePrePoliza > 0 Then GvMov.DataSource = DtMovimientos GvMov.DataBind() GvPrePoliza.DataBind() diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx b/Contabilidad2/RepBalanzaComprobacion.aspx index 9d0440a3a..4decf3c06 100644 --- a/Contabilidad2/RepBalanzaComprobacion.aspx +++ b/Contabilidad2/RepBalanzaComprobacion.aspx @@ -107,7 +107,15 @@ - + Vista: +
+ + + + +
diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx.vb b/Contabilidad2/RepBalanzaComprobacion.aspx.vb index 76372a053..b68186834 100644 --- a/Contabilidad2/RepBalanzaComprobacion.aspx.vb +++ b/Contabilidad2/RepBalanzaComprobacion.aspx.vb @@ -123,10 +123,24 @@ Partial Class Contabilidad2_RepBalanzaComprobacion Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero - If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, 0, DdlNivel.SelectedValue.ToEntero) Then + If TipoReporte = 1 Then + 'mostrar cuales son las cuentas que no tienen asignado el agrupador que sean afectables + + If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then + Dim dtt As DataTable = ObjConta.DtResultados.FiltraParametros("CveAgrupadorSAT is null and not Codigo like '_%'") + If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then + Dim str As New StringBuilder + For Each dr As DataRow In dtt.Rows + str.AppendFormat(" - {0}
", dr("CtaCodigo")) + Next + Alert(str.ToString) + End If + End If + + End If + + If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, DdlVista.SelectedValue.ToEntero, DdlNivel.SelectedValue.ToEntero) Then DtDatos = ObjConta.DtResultados - - Else DtDatos = Nothing Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError) diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index 2182ca3a2..e253acd5f 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -1156,6 +1156,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1244,6 +1298,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1390,6 +1498,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1414,12 +1576,6 @@ - - - - - - diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb index 3b5505acb..3b821ada9 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb @@ -4,10 +4,8 @@ Option Strict On Imports System.Data Imports System.Drawing Imports System.IO -Imports DocumentFormat.OpenXml.VariantTypes Imports Extensiones Imports GemBox.Spreadsheet -Imports Microsoft.Reporting.WebForms Partial Class Contabilidad_RepEstadoResultadosHorizontal Inherits ClsPaginas @@ -2149,9 +2147,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Dim TxtSub As String = GlobalDTSubProyectos(-1, CveSubProyecto:=dColumn.ColumnName.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto") - - - CType(GvIngresosSubProyectoH.Columns(IndexGv), BoundField).HeaderText = TxtSub CType(GvTotalesSubProyectoH.Columns(IndexGv), BoundField).HeaderText = TxtSub CType(GvGastosSubProyectoH.Columns(IndexGv), BoundField).HeaderText = TxtSub diff --git a/Content/CustomIcons/existencia.svg b/Content/CustomIcons/existencia.svg new file mode 100644 index 000000000..77da1fa1c --- /dev/null +++ b/Content/CustomIcons/existencia.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Content/CustomIcons/existencia_verde.svg b/Content/CustomIcons/existencia_verde.svg new file mode 100644 index 000000000..1619ab133 --- /dev/null +++ b/Content/CustomIcons/existencia_verde.svg @@ -0,0 +1,16 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + \ No newline at end of file diff --git a/Content/CustomIcons/similar.svg b/Content/CustomIcons/similar.svg new file mode 100644 index 000000000..9887ee828 --- /dev/null +++ b/Content/CustomIcons/similar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Content/CustomIcons/similar_verde.svg b/Content/CustomIcons/similar_verde.svg new file mode 100644 index 000000000..17b5b55d7 --- /dev/null +++ b/Content/CustomIcons/similar_verde.svg @@ -0,0 +1,16 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + \ No newline at end of file diff --git a/Content/CustomIcons/sustituir.svg b/Content/CustomIcons/sustituir.svg new file mode 100644 index 000000000..65e193fb5 --- /dev/null +++ b/Content/CustomIcons/sustituir.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Content/CustomIcons/sustituir_azul.svg b/Content/CustomIcons/sustituir_azul.svg new file mode 100644 index 000000000..77a3dd24e --- /dev/null +++ b/Content/CustomIcons/sustituir_azul.svg @@ -0,0 +1,16 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + \ No newline at end of file diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index 6708f6071..9766d26fa 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -541,6 +541,9 @@ + + + @@ -684,6 +687,15 @@ + + + + + +
- + + + + + + +
+ + + +
+ + + +
Fecha Emisión: +
+ + + + +
+ + + + + + +
+
+
+ + + + +
+ +
+ + +
diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index a22dcc01e..1b4eb4a43 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -419,10 +419,12 @@ Partial Class RepCxCDetalle If UsuarioActual.CveEmpresa.Contiene(72, 80, 146, 119) Then ChkAnticipos.Visible = True + DdlTieneLineaAdicional.SelectedValueExist(If(Request("TieneLineaAdicional") IsNot Nothing, Request("TieneLineaAdicional").ToString, "-1").ToString) If UsuarioActual.CveEmpresa = 119 Then divLineaAdicional1.Visible = True divLineaAdicional2.Visible = True + trEnquebranto.Visible = True End If If UsuarioActual.CveEmpresa = 13 Then @@ -629,6 +631,9 @@ Partial Class RepCxCDetalle ActivaColumna(48, ChkSubTotalPend.Checked) ActivaColumna(49, ChkIVAPend.Checked) ActivaColumna(50, ChkIEPSPend.Checked) + ActivaColumna(51, ChkEnQuebranto.Checked) + ActivaColumna(52, ChkEnDemanda.Checked) + ActivaColumna(53, ChkRegistroFirmas.Checked) If SePersonalizo = 1 Then ImgExcelPersonalizado.Visible = True diff --git a/Empresas/Grales/Formatos/RepAnt-NC-IXC.rdlc b/Empresas/Grales/Formatos/RepAnt-NC-IXC.rdlc index 8e9f7001e..af774b409 100644 --- a/Empresas/Grales/Formatos/RepAnt-NC-IXC.rdlc +++ b/Empresas/Grales/Formatos/RepAnt-NC-IXC.rdlc @@ -1,1273 +1,5 @@  - - - - - - - - - - - true - true - - - - - Cliente - - - - - - - Textbox28 - - - - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - 1.4429cm - - - 1.39526cm - - - 1.23593cm - - - 1.42752cm - - - 1.53107cm - - - 1.35467cm - - - 1.34587cm - - - 1.52634cm - - - 1.22649cm - - - - - 0.46771cm - - - - - true - true - - - - - =Fields!OriginalAnticipos.Value - - - - - - - OriginalAnticipos - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!AplicadoAnticipos.Value - - - - - - - AplicadoAnticipos - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TotalAnticipos.Value - - - - - - - TotalAnticipos - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!OriginalNC.Value - - - - - - - OriginalNC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!AplicadoNC.Value - - - - - - - AplicadoNC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TotalNC.Value - - - - - - - TotalNC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!OriginalIXC.Value - - - - - - - OriginalIXC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!AplicadoIXC.Value - - - - - - - AplicadoIXC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TotalIXC.Value - - - - - - - TotalIXC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 0.46771cm - - - true - true - - - - - Original - - - - - - - Textbox6 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Aplicado - - - - - - - Textbox4 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Saldo - - - - - - - Textbox40 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Original - - - - - - - Textbox13 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Aplicado - - - - - - - Textbox15 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Saldo - - - - - - - Textbox42 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Original - - - - - - - Textbox17 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Aplicado - - - - - - - Textbox19 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Saldo - - - - - - - Textbox44 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 7.10109cm - - - true - true - - - - - =IIF(CInt(Fields!CveCliente.Value) < 1, IIF(CInt(Fields!CveMoneda.Value) = 1, "Total Pesos", "Total Dolares"), Fields!NombreComercial.Value) - - - - - - - Folio - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - DataSet1 - 1.71125cm - 0.06614cm - 0.93542cm - 19.58715cm - - - - - - true - true - - - - - =Parameters!AgrupadoPor.Value - HTML - - - - - - - Textbox1 - 0.07056cm - 0.06614cm - 0.58236cm - 19.58715cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Anticipos - - - - - - - Textbox22 - 1.04069cm - 7.16723cm - 0.6cm - 4.03881cm - 2 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - NC X Aplicar - - - - - - - Textbox22 - 1.04069cm - 11.24132cm - 0.6cm - 4.27799cm - 3 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ingresos X Comprobar - - - - - - - Textbox22 - 1.04069cm - 15.55459cm - 0.6cm - 4.0987cm - 4 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - 1.10756in - - - - - - - Textbox1 - 2.43857cm - 0.6cm - 14.68354cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE ANTICIPOS - NC X APLICAR - INGRESOS X COMPROBAR - - - - - - - - - - - - - - - - Textbox2 - 0.63528cm - 2.40329cm - 0.52945cm - 14.68354cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.06614cm - 2.22362cm - 2.33715cm - 2 - - - - - - - - - - - 1.08126cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.40041cm - 16.97887cm - 0.68085cm - 2.06587cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, "Usuario: ", "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, Parameters!UsuarioImprimio.Value, "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, "Fecha Impresión: ", "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, Parameters!FechaImpresion.Value, "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox28 + + + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 1.4429cm + + + 1.39526cm + + + 1.23593cm + + + 1.42752cm + + + 1.53107cm + + + 1.35467cm + + + 1.34587cm + + + 1.52634cm + + + 1.22649cm + + + + + 0.46771cm + + + + + true + true + + + + + =Fields!OriginalAnticipos.Value + + + + + + + OriginalAnticipos + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!AplicadoAnticipos.Value + + + + + + + AplicadoAnticipos + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TotalAnticipos.Value + + + + + + + TotalAnticipos + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!OriginalNC.Value + + + + + + + OriginalNC + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!AplicadoNC.Value + + + + + + + AplicadoNC + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TotalNC.Value + + + + + + + TotalNC + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!OriginalIXC.Value + + + + + + + OriginalIXC + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!AplicadoIXC.Value + + + + + + + AplicadoIXC + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TotalIXC.Value + + + + + + + TotalIXC + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 0.46771cm + + + true + true + + + + + Original + + + + + + + Textbox6 + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Aplicado + + + + + + + Textbox4 + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Saldo + + + + + + + Textbox40 + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Original + + + + + + + Textbox13 + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Aplicado + + + + + + + Textbox15 + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Saldo + + + + + + + Textbox42 + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Original + + + + + + + Textbox17 + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Aplicado + + + + + + + Textbox19 + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Saldo + + + + + + + Textbox44 + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 7.10109cm + + + true + true + + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, IIF(CInt(Fields!CveMoneda.Value) = 1, "Total Pesos", "Total Dolares"), Fields!NombreComercial.Value) + + + + + + + Folio + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + DataSet1 + 1.71125cm + 0.06614cm + 0.93542cm + 19.58714cm + + + + + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + + + + + Textbox1 + 0.07056cm + 0.06614cm + 0.58236cm + 19.58715cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ingresos X Comprobar + + + + + + + Textbox22 + 1.04069cm + 15.55459cm + 0.6cm + 4.0987cm + 2 + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + true + + + + + Anticipos + + + + + + + Textbox22 + 0.6cm + 4.03881cm + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + true + 1.04069cm + 7.20603cm + 0.6cm + 4.03881cm + 3 + + + + + + + + true + + + + + NC X Aplicar + + + + + + + Textbox22 + 0cm + 0.6cm + 4.27799cm + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + true + 1.04069cm + 11.26954cm + 0.6cm + 4.27799cm + 4 + + + + + + 1.46173in + + + + + + + Textbox1 + 2.43857cm + 0.6cm + 14.68354cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE ANTICIPOS - NC X APLICAR - INGRESOS X COMPROBAR + + + + + + + + + + + + + + + + Textbox2 + 0.63528cm + 2.40329cm + 0.52945cm + 14.68354cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 2 + + + + + + + + + + + 1.08126cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.40041cm + 16.97887cm + 0.68085cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, "Usuario: ", "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, Parameters!UsuarioImprimio.Value, "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, "Fecha Impresión: ", "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, Parameters!FechaImpresion.Value, "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm +
@@ -29,7 +35,7 @@ - +
@@ -125,6 +131,15 @@
+
+ +
+
+ +
+
+ +
diff --git a/Ventas/RepAnticipo-NC-IXC.aspx.cs b/Ventas/RepAnticipo-NC-IXC.aspx.cs index 2cd819006..021cee834 100644 --- a/Ventas/RepAnticipo-NC-IXC.aspx.cs +++ b/Ventas/RepAnticipo-NC-IXC.aspx.cs @@ -146,7 +146,14 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); - para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Cliente}{Sucursal}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}")); + para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Cliente}{Sucursal}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}")); + + + + para.Add(new ReportParameter("MostarAnticipos", ChkAnticipos.Checked ?"1":"0" )); + para.Add(new ReportParameter("MostarNCxAplicar", ChkNCxAplicar.Checked ? "1" : "0")); + para.Add(new ReportParameter("MostarIngresosxComprobar", ChkIngresosxComprobar.Checked ? "1" : "0")); + if (Imagen.Exists) { para.Add(new ReportParameter("LogoPath", logouri)); diff --git a/Ventas/RepComisionesSMS.aspx b/Ventas/RepComisionesSMS.aspx index 172a5b8ed..9fce7ed34 100644 --- a/Ventas/RepComisionesSMS.aspx +++ b/Ventas/RepComisionesSMS.aspx @@ -66,8 +66,7 @@
- Fecha Fin: - + Fecha Fin:
@@ -84,32 +83,62 @@
- -
- - -
- - -
- - -
- - -
- - -
- - - +
+ Fecha I. Pago: +
+
+
+ + + + +
+ + + + + + +
+
+ Fecha F. Pago: +
+
+
+ + + + +
+ + + + + + +
@@ -130,7 +159,7 @@ EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None"> - + @@ -138,14 +167,15 @@ - - + + + diff --git a/Ventas/RepComisionesSMS.aspx.vb b/Ventas/RepComisionesSMS.aspx.vb index 5ec007988..2ed9fb216 100644 --- a/Ventas/RepComisionesSMS.aspx.vb +++ b/Ventas/RepComisionesSMS.aspx.vb @@ -2,10 +2,7 @@ Option Strict On Imports System.Data -Imports System.Data.Entity Imports Extensiones -Imports Microsoft.EntityFrameworkCore - Partial Class Ventas_RepComisionesSMS Inherits ClsPaginas @@ -37,7 +34,10 @@ Partial Class Ventas_RepComisionesSMS Private Sub CargaCombos() - + 'If UsuarioActual.TienePermisoProceso(376) Then + ' DdlTecnico.Enabled = False + ' DdlTecnico.SelectedValueExist(UsuarioActual.CveUsuario) + 'End If 'If UsuarioActual.Empresa.Funcionalidad(302) = "1" AndAlso DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then ' DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros(String.Format("VendedorTipo IN (1,4) AND (CveSubProyecto IS NULL OR CveSubProyecto = {0})", DdlSubProyectoDatos.SelectedValue)) 'Else @@ -45,7 +45,10 @@ Partial Class Ventas_RepComisionesSMS 'End If DdlVendedor.DataBind() DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1")) - + If UsuarioActual.CveVendedor > 0 Then + DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor) + DdlVendedor.Enabled = False + End If DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ") DdlMedico.DataBind() @@ -62,10 +65,12 @@ Partial Class Ventas_RepComisionesSMS Public Sub CargaDatos() LnkExportar.Visible = False + Dim FechaIPago As Date = If(TxtFechaIPago.Text.ToDate < MinFecha, MinFecha, TxtFechaIPago.Text.ToDate) + Dim FechaFPago As Date = If(TxtFechaFPago.Text.ToDate < MinFecha, MaxFecha, TxtFechaFPago.Text.ToDate) Dim ObjVentas As New ClsVentas - If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, 1) Then + If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, FechaIPago, FechaFPago) Then GvDatos.DataSource = ObjVentas.DtResultados If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then @@ -76,9 +81,10 @@ Partial Class Ventas_RepComisionesSMS End If ObjVentas.Dispose() - GvDatos.DataBind() + If UsuarioActual.CveVendedor = 0 Then GvDatos.Columns(15).Visible = True 'columna de comisiones de gerente + UpDatos.Update() End Sub @@ -270,7 +276,7 @@ Partial Class Ventas_RepComisionesSMS Dim ObjVentas As New ClsVentas GvComisionesEspeciales.DataSource = Nothing - If ObjVentas.GetComisionesMedicasEsPeciales(-1, -1, UsuarioActual.CveEmpresa) Then + If ObjVentas.GetComisionesMedicasEspeciales(-1, -1, UsuarioActual.CveEmpresa) Then GvComisionesEspeciales.DataSource = ObjVentas.DtResultados End If ObjVentas.Dispose() @@ -345,7 +351,12 @@ Partial Class Ventas_RepComisionesSMS Dim ObjVentas As New ClsVentas If ObjVentas.AddComisionesMedicasEspeciales(DdlModalMedico.SelectedValue.ToEntero, DdlModalPS.SelectedValue.ToEntero, DdlModalTipoComision.SelectedValue.ToEntero, Comision, UsuarioActual.CveUsuario) Then - Alert("Comisión agregada correctamente") + Alert("Comisión agregada correctamente", TipoMensaje.ToastInformacion) + DdlModalPS.SelectedValue = "-1" + DdlModalPS.SelectedValue = "" + DdlModalPS.SelectedText = "" + TxtModalComision.Text = "" + DdlModalPS.Focus() Else errorProceso = True End If @@ -354,7 +365,16 @@ Partial Class Ventas_RepComisionesSMS If Not errorProceso Then CargaComisionesEspeciales() - ReiniciaModalComisionesEspeciales() + 'ReiniciaModalComisionesEspeciales() + End If + + End Sub + + Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DBCampo("SerieFolio") = "" Then + e.Row.CssClass = "SubTotales" + End If End If End Sub diff --git a/Ventas/RepVencimientosCredito.aspx b/Ventas/RepVencimientosCredito.aspx index 6e137229f..c29f49f8f 100644 --- a/Ventas/RepVencimientosCredito.aspx +++ b/Ventas/RepVencimientosCredito.aspx @@ -77,13 +77,12 @@ -
Estatus:
+
Tipo Linea:
- - - <%-- --%> - - + + + +
Agrupador:
diff --git a/Ventas/RepVencimientosCredito.aspx.cs b/Ventas/RepVencimientosCredito.aspx.cs index bcd923158..2bb092c17 100644 --- a/Ventas/RepVencimientosCredito.aspx.cs +++ b/Ventas/RepVencimientosCredito.aspx.cs @@ -1,6 +1,4 @@ using System; using System.Web.UI.WebControls; using Extensiones; using System.Data; using static Extensiones.ModExtensiones; -using System.Collections.Generic; -using System.IO; using System.Web.UI; @@ -66,17 +64,15 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas private void InicializaValores() { - txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = NowADS().ToShortDateString(); + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().LastDayOfMonth().ToShortDateString(); DdlClientes.setEsWebService(true); DdlClientes.Attributes.Add("data-metodo", "getcliente"); DdlClientes.SelectedText = "Todos"; - DdlClientes.SelectedValue = "-1"; - + DdlClientes.SelectedValue = "-1"; } - protected void BtnConsultar_Click(object sender, EventArgs e) { CargaDatos(); @@ -89,7 +85,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas ClsVentas objVentas = new ClsVentas(); - if (objVentas.GetLineasAdicionalesVencimientos( DdlClientes.SelectedValue.ToEntero(), -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveEmpresa)) + if (objVentas.GetLineasAdicionalesVencimientos( DdlClientes.SelectedValue.ToEntero(), DdlTipoLinea.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), -1, UsuarioActual.CveEmpresa)) { GvD.DataSource = objVentas.DtResultados; @@ -104,99 +100,17 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas GvD.DataBind(); UpLineasAdicionales.Update(); } - - - protected void LnkCargarComprobante_Click(object sender, EventArgs e) - { - GridViewRow GvRow = (GridViewRow) ((LinkButton) sender).NamingContainer; - - CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero(); - CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero(); - LineaAdicionalComprobante = GvRow.DataKey("LineaAdicionalComprobante").ToString(); - - RegistraScript("$('#ModalComprobante').modal('show');",""); - } - - + protected void LnkDescargaExcel_Click(object sender, EventArgs e) - { - if(TipoLinea == 1) - { - GridView gvTemp = GvD; - //gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString()); - gvTemp.ExportToExcelGembox("RepLineasAdicionales", UsuarioActual, "Rep Lineas Adicionales", AnchoImagen: 150); - } + { + GridView gvTemp = GvD; + //gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString()); + gvTemp.ExportToExcelGembox("RepVencimientos", UsuarioActual, "Rep Vencimientos de líneas", AnchoImagen: 150); + } - - protected void GvLAPO_RowDataBound(object sender, GridViewRowEventArgs e) - { - if (e.Row.RowType == DataControlRowType.DataRow) - { + - LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus"); - LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante"); - LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante"); + public override void VerifyRenderingInServerForm(Control control) { } - if (e.Row.DataKey("CveLineaAdicional")=="") - { - if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "") - { - e.Row.CssClass = "SubTotales2"; - if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "" && e.Row.DataKey("CveProveedor") != "") - { - e.Row.Cells[0].Text = ""+ e.Row.DBCampo("Proveedor") +""; - } - } - else - { - e.Row.CssClass = "SubTotales"; - } - LnkCambiarEstatus.Visible = false; - LnkCargarComprobante.Visible = false; - LnkDescargaComprobante.Visible = false; - } - else - { - if (e.Row.DataKey("CveVenta").ToEntero() > 0 && e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 1) - { - - if (UsuarioActual.TienePermisoProceso(356)) LnkCambiarEstatus.Visible = true; - LnkCargarComprobante.Visible = true; - } - - if (e.Row.DataKey("LineaAdicionalComprobante").Length > 0 && e.Row.DataKey("CveVenta").ToEntero() > 0) - { - FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("LineaAdicionalComprobante")}"); - - if (fi.Exists) - { - LnkDescargaComprobante.Visible = true; - ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaComprobante); - } - } - } - } - } - - protected void LnkDescargaComprobante_Click(object sender, EventArgs e) - { - GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer; - string Comprobante = GvRow.DataKey("LineaAdicionalComprobante"); - FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{Comprobante}"); - - if (fi.Exists) - { - Response.Clear(); - Response.AddHeader("Content-Disposition", "attachment; filename=" + fi.Name); - Response.AddHeader("Content-Length", fi.Length.ToString()); - Response.ContentType = "text/octet-stream"; - Response.Flush(); - Response.TransmitFile(fi.FullName); - Response.End(); - } - } - - - } \ No newline at end of file diff --git a/Ventas/RepVentasUtilidadPadre.aspx b/Ventas/RepVentasUtilidadPadre.aspx index 0b3c08446..c3d496d27 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx +++ b/Ventas/RepVentasUtilidadPadre.aspx @@ -233,6 +233,9 @@ + + + diff --git a/Ventas/RepVentasUtilidadPadre.aspx.vb b/Ventas/RepVentasUtilidadPadre.aspx.vb index ebf3144c8..2e58d4ef0 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx.vb +++ b/Ventas/RepVentasUtilidadPadre.aspx.vb @@ -252,7 +252,7 @@ Partial Class Ventas_RepVentasUtilidadPadre e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria")) e.Row.Cells(0).Text = String.Format("{2}", Css, Liga, e.Row.Cells(0).Text) Else - e.Row.Cells(10).BackColor = Drawing.Color.LightGray + e.Row.Cells(12).BackColor = Drawing.Color.LightGray End If diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 00999f431..2c702be69 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -758,12 +758,12 @@ Fecha:
- + - + - + @@ -1160,7 +1160,9 @@ - + + +