diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 0ad493781..1fbcf36dd 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -925,10 +925,10 @@ Public Class ClsAcumuladores OnError("Ocurrió un al eliminar poliza virtual. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function + End Function #End Region - - Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Decimal, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer, + + Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Decimal, CveTamaño As Integer, Puntos As Decimal, ImporteCargo As Decimal, ImporteBonificacion As Decimal, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer, CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String, FechaIng As DateTime, Optional CveMovimiento As Integer = -1, Optional CveVentaBonificacion As Integer = -1, Optional FacturadoBonificacion As Boolean = False) As Boolean Dim Retorno As Boolean = False @@ -940,6 +940,9 @@ Public Class ClsAcumuladores .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad .Add("@CveTamaño", SqlDbType.Int).Value = CveTamaño + .Add("@Puntos", SqlDbType.Money).Value = Puntos + .Add("@ImporteCargo", SqlDbType.Money).Value = ImporteCargo + .Add("@ImporteBonificacion", SqlDbType.Money).Value = ImporteBonificacion .Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto .Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario @@ -961,7 +964,8 @@ Public Class ClsAcumuladores Return Retorno End Function - Public Function DistribuidorMovtosGet(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional CveVentaRNCCargo As Integer = -1, Optional CveConcepto As Integer = -1) As Boolean + Public Function DistribuidorMovtosGet(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, + Optional CveVentaRNCCargo As Integer = -1, Optional CveVentaRNCBonificacion As Integer = -1, Optional CveConcepto As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -973,6 +977,7 @@ Public Class ClsAcumuladores .Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@CveVentaRNCCargo", SqlDbType.Int).Value = CveVentaRNCCargo + .Add("@CveVentaRNCBonificacion", SqlDbType.Int).Value = CveVentaRNCBonificacion .Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto End With diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index f71c30878..e7a7280d6 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -264,7 +264,8 @@ Public Class ClsClientes End Sub Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1, - Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveUsuarioConsulta As Integer = -1) As Boolean + Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveUsuarioConsulta As Integer = -1, + Optional Cuenta As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClientesGet") @@ -287,6 +288,8 @@ Public Class ClsClientes .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro .Add("@TopSelect", SqlDbType.Int).Value = TopSelect + .Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta + End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index d2fe94141..b7d21d2e4 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -2264,16 +2264,18 @@ Public Class ClsContPAQi StrSQL.AppendLine(" @Folio INT,") StrSQL.AppendLine(" @NumMovto INT,") StrSQL.AppendLine(" @IdDiario INT,") + StrSQL.AppendLine(" @SegNegMovtos INT,") StrSQL.AppendLine(" @Fecha DATETIME,") StrSQL.AppendLine(" @IDEjercicio INT,") StrSQL.AppendLine(" @TimeStamp NVARCHAR (200);") StrSQL.AppendLine(" SET NOCOUNT ON;") StrSQL.AppendLine(" ") - StrSQL.AppendLine(" SET @Id = dbo.FNC_GetCounter ('Id_MovimientoPoliza');") + StrSQL.AppendLine(" SET @Id = dbo.FNC_GetCounter ('Id_MovimientoPoliza');") StrSQL.AppendLine(" SET @NumMovto = dbo.FNC_GetNumMovto (@IdPoliza);") - StrSQL.AppendLine(" SET @Fecha = @FechaMov;") + StrSQL.AppendLine(" SET @Fecha = @FechaMov;") StrSQL.AppendLine(" SET @IdDiario = 0;") - StrSQL.AppendLine(" SELECT @Ejercicio = P.Ejercicio, @Periodo = P.Periodo, @TipoPol = TipoPol, @Folio = P.Folio FROM Polizas P WHERE Id = @IdPoliza;") + StrSQL.AppendLine(" SELECT @Ejercicio = P.Ejercicio, @Periodo = P.Periodo, @TipoPol = TipoPol, @Folio = P.Folio FROM Polizas P WHERE Id = @IdPoliza;") + StrSQL.AppendLine(" SELECT @SegNegMovtos = SegNegMovtos FROM Cuentas C WHERE Id = @IdCuenta;") StrSQL.AppendLine("") StrSQL.AppendLine(" BEGIN TRY") StrSQL.AppendLine(" ") @@ -2306,7 +2308,7 @@ Public Class ClsContPAQi 'StrSQL.AppendLine("END") StrSQL.AppendLine(" INSERT INTO MovimientosPoliza (Id, RowVersion, IdPoliza, Ejercicio, Periodo, TipoPol, Folio, NumMovto, IdCuenta, TipoMovto, Importe, ImporteME, Referencia, Concepto, IdDiario, Fecha, IdSegNeg, SIGReferencia, TimeStamp, Guid)") - StrSQL.AppendLine(" VALUES (@Id, @RowVersion, @IdPoliza, @Ejercicio, @Periodo, @TipoPol, @Folio, @NumMovto, @IdCuenta, @TipoMovto, @Importe, @ImporteME, @Referencia, @Concepto, @IdDiario, @Fecha, @IdSegNeg, @SIGReferencia, @TimeStamp, @GUID);") + StrSQL.AppendLine(" VALUES (@Id, @RowVersion, @IdPoliza, @Ejercicio, @Periodo, @TipoPol, @Folio, @NumMovto, @IdCuenta, @TipoMovto, @Importe, @ImporteME, @Referencia, @Concepto, @IdDiario, @Fecha, IIF(@SegNegMovtos = 1,@IdSegNeg,0), @SIGReferencia, @TimeStamp, @GUID);") StrSQL.AppendLine(" ") ''DESCOMENTAR PARA CIERRE PERIODO @@ -3331,7 +3333,7 @@ Public Class ClsContPAQi StrSQL.Append(" INNER JOIN Cuentas C ON C.Id = A.IdSubCtade") StrSQL.Append(" )") StrSQL.Append(" SELECT Top(@RowNum) C.Id, C.Codigo, C.Nombre, C.IdAgrupadorSAT,SA.Nombre AS AgrupadorSAT, ") - StrSQL.Append(" CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS FLOAT), REPLACE (Mascarilla, 'X', '0')) ELSE C.Codigo END + ' - ' + C.Nombre AS CtaCodigo, ") + StrSQL.Append(" CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS DECIMAL(35,0)), REPLACE (Mascarilla, 'X', '0')) ELSE C.Codigo END + ' - ' + C.Nombre AS CtaCodigo, ") StrSQL.Append(" C.Tipo, C.EsBaja, C.CtaMayor, C.Afectable, C.IdMoneda, C.DigAgrup, C.NomIdioma, ") StrSQL.Append(" CASE ") StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) = '1' THEN 'Activo' ") @@ -3339,8 +3341,8 @@ Public Class ClsContPAQi StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) = '3' THEN 'Capital' ") StrSQL.Append(" WHEN SUBSTRING (C.Codigo, 1, 1) IN ('4', '5', '6', '7', '8', '9') THEN 'ER' ") StrSQL.Append(" ELSE 'Otras' ") - StrSQL.Append(" END AS Clasificacion, CAST (C.Id AS varCHAR(10)) + '||' + C.Nombre AS IdNombre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS FLOAT),REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END CuentaFormato, ") - StrSQL.Append(" CFad.Id AS IdPadre, CFad.Codigo AS CodigoPadre, CFad.Nombre AS NombrePadre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS FLOAT), REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END + ' - ' + C.Nombre + ' ' + CASE WHEN C.Afectable = 1 THEN '(Afec)' ELSE '(No Afect)' END AS CtaCodigoPadre ") + StrSQL.Append(" END AS Clasificacion, CAST (C.Id AS varCHAR(10)) + '||' + C.Nombre AS IdNombre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS DECIMAL(35,0)),REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END CuentaFormato, ") + StrSQL.Append(" CFad.Id AS IdPadre, CFad.Codigo AS CodigoPadre, CFad.Nombre AS NombrePadre, CASE WHEN ISNUMERIC (C.Codigo) = 1 THEN FORMAT (CAST (C.Codigo AS DECIMAL(35,0)), REPLACE (Mascarilla, 'X', '0') ) ELSE C.Codigo END + ' - ' + C.Nombre + ' ' + CASE WHEN C.Afectable = 1 THEN '(Afec)' ELSE '(No Afect)' END AS CtaCodigoPadre ") StrSQL.Append(" , CASE WHEN CtaSup IN ('_ACTIVO','_BPASIVO','_CAPITAL','_UTILIDAD','_RACREEDOR','_RDEUDOR','_CUADRE','_ORDEN') ") StrSQL.Append(" AND NOT SubCtade IN ('_ACTIVO','_BPASIVO','_CAPITAL','_UTILIDAD','_RACREEDOR','_RDEUDOR','_CUADRE') THEN 1 ELSE 0 END AS CtaInicial,") StrSQL.Append(" E.Nivel, E.Orden") diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index f49810f6a..fc35b6ae2 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -1075,14 +1075,14 @@ Public Class ClsContabilidad Select Case CveConcepto Case 2, 17 'Pago Proveedores - + Concepto = $"{NombreComercial} F:{SerieFolio}" Case 30 'Bancos Concepto = FolioBancario Case 4, 6 'Compra Case 1, 5 'Proveedores - Concepto = SerieFolio + Concepto = $"{NombreComercial} F:{SerieFolio}" Case 37 'Deudores @@ -1099,7 +1099,7 @@ Public Class ClsContabilidad End Select - Case 4, 7, 11, 12 + Case 4, 7, 11, 12, 122, 145 Select Case CveConcepto diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 92975bdfe..77f4301c1 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -1248,7 +1248,7 @@ Public Class ClsGenerales #End Region #Region "C O L E C T I V A S" - Public Function GetColectivas(CveColectiva As Integer, Colectiva As String, Codigo As String, Tipo As String, CveEmpresa As Integer) As Boolean + Public Function GetColectivas(Optional CveColectiva As Integer = -1, Optional Colectiva As String = "-1", Optional Codigo As String = "-1", Optional Tipo As String = "-1", Optional CveEmpresa As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_ColectivasGet") @@ -4223,15 +4223,16 @@ Public Class ClsGenerales Return Retorno End Function - Public Function AddTipoOrganico(TipoOrganico As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function AddTipoOrganico(TipoOrganico As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_TipoOrganicosAdd") With SqlAdapter.SelectCommand.Parameters .Add("@TipoOrganico", SqlDbType.VarChar).Value = TipoOrganico - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try @@ -4317,15 +4318,16 @@ Public Class ClsGenerales Return Retorno End Function - Public Function AddEmpacado(TipoEmpacado As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function AddEmpacado(TipoEmpacado As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_EmpacadosAdd") With SqlAdapter.SelectCommand.Parameters .Add("@TipoEmpacado", SqlDbType.VarChar).Value = TipoEmpacado - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 4bb50fc6d..04e539117 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -1630,6 +1630,48 @@ Public Class ClsOS Return Retorno End Function + + Public Function AddOrdenesServiciosTecnicoHorarioNoOperativo(CveUsuarioAsignado As Integer, HoraInicio As DateTime, HoraFin As DateTime, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_OS_HorariosNoOperativosAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado + .Add("@HoraInicio", SqlDbType.Time).Value = HoraInicio.TimeOfDay + .Add("@HoraFin", SqlDbType.Time).Value = HoraFin.TimeOfDay + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar el horario no operativo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + Public Function GetOrdenesServiciosTecnicoHorarioNoOperativo(CveUsuarioAsignado As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_OS_HorariosNoOperativosGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado + .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 horarios no operativos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + #End Region #Region "ESTATUS USUARIOS OS" diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index efe2c4f5d..7c3dfc1d2 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -375,61 +375,96 @@ Public Class ClsPaginas Property GlobalDTFraccionArancelaria() As DataTable Get - GlobalDTFraccionArancelaria = DirectCast(Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable + Dim AppNombre As String = "GlobalDTFraccionArancelaria" + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATFraccionArancelaria() Then Application(AppNombre) = ObjGrales.DtResultados.AsEnumerable() + ObjGrales.Dispose() + End If + GlobalDTFraccionArancelaria = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable End Get Set(value As DataTable) - Application("GlobalDTFraccionArancelaria") = value + Dim AppNombre As String = "GlobalDTFraccionArancelaria" + Application(AppNombre) = value End Set End Property Property GlobalDTIncoterm() As DataTable Get - GlobalDTIncoterm = DirectCast(Application("GlobalDTIncoterm"), DataTable) + Dim AppNombre As String = "GlobalDTIncoterm" + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATIncoterm() Then Application(AppNombre) = ObjGrales.DtResultados + ObjGrales.Dispose() + End If + GlobalDTIncoterm = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTIncoterm") = value + Dim AppNombre As String = "GlobalDTIncoterm" + Application(AppNombre) = value End Set End Property Property GlobalDTTipoOperacion() As DataTable Get - GlobalDTTipoOperacion = DirectCast(Application("GlobalDTTipoOperacion"), DataTable) + Dim AppNombre As String = "GlobalDTTipoOperacion" + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATTipoOperacion() Then Application(AppNombre) = ObjGrales.DtResultados + ObjGrales.Dispose() + End If + GlobalDTTipoOperacion = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTipoOperacion") = value + Dim AppNombre As String = "GlobalDTTipoOperacion" + Application(AppNombre) = value End Set End Property Property GlobalDTSATMotivoTraslado() As DataTable Get - GlobalDTSATMotivoTraslado = DirectCast(Application("GlobalDTSATMotivoTraslado"), DataTable) + Dim AppNombre As String = "GlobalDTSATMotivoTraslado" + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATMotivoTraslado() Then Application(AppNombre) = ObjGrales.DtResultados + ObjGrales.Dispose() + End If + GlobalDTSATMotivoTraslado = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTSATMotivoTraslado") = value + Dim AppNombre As String = "GlobalDTSATMotivoTraslado" + Application(AppNombre) = value End Set End Property Property GlobalDTUnidadAduana() As DataTable Get - GlobalDTUnidadAduana = DirectCast(Application("GlobalDTUnidadAduana"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTUnidadAduana") = value - End Set - End Property - - - Property GlobalDTGralPaises() As DataTable - Get - If Application("GlobalDTGralPaises") Is Nothing Then + Dim AppNombre As String = "GlobalDTUnidadAduana" + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATPais() Then Application("GlobalDTGralPaises") = ObjGrales.DtResultados Else Application("GlobalDTGralPaises") = Nothing + If ObjGrales.GetSATUnidadesAduana() Then Application(AppNombre) = ObjGrales.DtResultados ObjGrales.Dispose() End If - GlobalDTGralPaises = DirectCast(Application("GlobalDTGralPaises"), DataTable) + GlobalDTUnidadAduana = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTGralPaises") = value + Dim AppNombre As String = "GlobalDTUnidadAduana" + Application(AppNombre) = value + End Set + End Property + Property GlobalDTGralPaises() As DataTable + Get + Dim AppNombre As String = "GlobalDTGralPaises" + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATPais() Then Application(AppNombre) = ObjGrales.DtResultados + ObjGrales.Dispose() + End If + GlobalDTGralPaises = DirectCast(Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = "GlobalDTGralPaises" + Application(AppNombre) = value End Set End Property Property GlobalDTGralEstados(ClaveSATPais As String, Optional CvePais As Integer = -1) As DataTable @@ -437,7 +472,7 @@ Public Class ClsPaginas Dim AppNombre As String = "GlobalDTGralEstados" If Application(AppNombre) Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing + If ObjGrales.GetSATEstado("-1") Then Application(AppNombre) = ObjGrales.DtResultados ObjGrales.Dispose() End If @@ -463,7 +498,7 @@ Public Class ClsPaginas Dim AppNombre As String = "GlobalDTGralMunicipios" If Application(AppNombre) Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing + If ObjGrales.GetSATMunicipio("-1") Then Application(AppNombre) = ObjGrales.DtResultados ObjGrales.Dispose() End If @@ -490,7 +525,7 @@ Public Class ClsPaginas If Application("GlobalDTLocalidad") Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados Else Application("GlobalDTLocalidad") = Nothing + If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados ObjGrales.Dispose() End If @@ -523,14 +558,13 @@ Public Class ClsPaginas End Property - Property GlobalDTGralColonias(ClaveSATEstado As String, ClaveSATMunicipio As String, ClaveSATColonia As String, Optional CveMunicipio As Integer = -1, Optional CodigoPostal As Integer = -1, Optional CveColonia As Integer = -1) As DataTable Get Dim AppNombre As String = "GlobalDTGralColonias" If Application(AppNombre) Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados Else Application(AppNombre) = Nothing + If ObjGrales.GetSATColonia("-1", "-1", "-1") Then Application(AppNombre) = ObjGrales.DtResultados ObjGrales.Dispose() End If @@ -561,7 +595,7 @@ Public Class ClsPaginas Get If Application("GlobalDTPSATUM") Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing + If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() ObjGrales.Dispose() End If @@ -1007,18 +1041,36 @@ Public Class ClsPaginas End Property Property GlobalDTFamilias(Optional CveEmpresa As Integer = -1) As DataTable Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(Application("GlobalDTFamilias"), DataTable), String.Format("CveEmpresa = {0} ", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTFamilias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTFamilias = DirectCast(Application("GlobalDTFamilias"), DataTable) + Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGenerales As New ClsGenerales + If ObjGenerales.GetCategorias(CveEmpresa, 2) Then Application(AppNombre) = ObjGenerales.DtResultados + ObjGenerales.Dispose() End If + GlobalDTFamilias = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTFamilias") = value + Dim AppNombre As String = $"GlobalDTFamilias-{CveEmpresa}" + Application(AppNombre) = value + End Set + End Property + Property GlobalDTCategoriasPresupuestos(Optional CveEmpresa As Integer = -1) As DataTable + Get + Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGenerales As New ClsGenerales + If ObjGenerales.GetCategorias(CveEmpresa, 3) Then Application(AppNombre) = ObjGenerales.DtResultados + ObjGenerales.Dispose() + End If + + GlobalDTCategoriasPresupuestos = DirectCast(Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTCategoriasPresupuestos-{CveEmpresa}" + Application(AppNombre) = value End Set End Property @@ -1109,6 +1161,14 @@ Public Class ClsPaginas 'End Property Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable Get + Dim AppNombre As String = "GlobalDTSATUsosCFDI" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATUsosCFDI() Then Application(AppNombre) = ObjGrales.DtResultados + ObjGrales.Dispose() + End If + If EsPersonaFisica <> -1 Then Dim Tipo As New StringBuilder If EsPersonaFisica = 1 Then Tipo.Append("AplicaPersonaFisica = 1") Else Tipo.Append("AplicaPersonaMoral = 1") @@ -1117,16 +1177,17 @@ Public Class ClsPaginas Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor) End If - Dim Dv As New DataView(DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows) GlobalDTSATUsosCFDI = Dv.ToTable Dv.Dispose() Else - GlobalDTSATUsosCFDI = DirectCast(Application("GlobalDTSATUsosCFDI"), DataTable) + GlobalDTSATUsosCFDI = DirectCast(Application(AppNombre), DataTable) End If End Get - Set(ByVal value As DataTable) - Application("GlobalDTSATUsosCFDI") = value + Set(value As DataTable) + Dim AppNombre As String = "GlobalDTSATUsosCFDI" + Application(AppNombre) = value End Set End Property Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable @@ -2616,11 +2677,11 @@ Public Class ClsPaginas #Region "***********************************************************************DT GENERALES**************************************************************************************" Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable Get - Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa) + Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}" 'sino existe, recarga los datos If DirectCast(Application(AppNombre), DataTable) Is Nothing Then Dim ObjGenerales As New ClsGenerales - If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados Else Application(AppNombre) = Nothing + If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados ObjGenerales.Dispose() End If @@ -2634,54 +2695,69 @@ Public Class ClsPaginas Dv.Dispose() End Get Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa) + Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}" Application(AppNombre) = value End Set - End Property Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralCategorias2 = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralCategorias2 = DirectCast(Application("GlobalDTCategorias2"), DataTable) + Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGenerales As New ClsGenerales + If ObjGenerales.GetCategorias(CveEmpresa, 4) Then Application(AppNombre) = ObjGenerales.DtResultados + ObjGenerales.Dispose() End If + + Dim filtro As New StringBuilder + 'If CveMarca > 0 Then + ' filtro.AppendFormat(" CveMarca={0} ", CveMarca) + 'End If + + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) + GlobalDTGralCategorias2 = Dv.ToTable + Dv.Dispose() End Get Set(value As DataTable) - Application("GlobalDTCategorias2") = value + Dim AppNombre As String = $"GlobalDTGralCategorias2-{CveEmpresa}" + Application(AppNombre) = value End Set End Property - Property GlobalDTGralEscolaridades() As DataTable Get - GlobalDTGralEscolaridades = DirectCast(Application("GlobalDTGralEscolaridades"), DataTable) + Dim AppNombre As String = "GlobalDTGralEscolaridades" + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGenerales As New ClsGenerales + If ObjGenerales.GetEscolaridades() Then Application(AppNombre) = ObjGenerales.DtResultados + ObjGenerales.Dispose() + End If + GlobalDTGralEscolaridades = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTGralEscolaridades") = value + Dim AppNombre As String = "GlobalDTGralEscolaridades" + Application(AppNombre) = value End Set End Property Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralColectivas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralColectivas = DirectCast(Application("GlobalDTGralColectivas"), DataTable) + Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}" + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGenerales As New ClsGenerales + If ObjGenerales.GetColectivas(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados + ObjGenerales.Dispose() End If + GlobalDTGralColectivas = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTGralColectivas") = value + Dim AppNombre As String = $"GlobalDTGralColectivas-{CveEmpresa}" + Application(AppNombre) = value End Set End Property Property GlobalDTGralMarcas(CveEmpresa As Integer, Optional CveMarca As Integer = -1) As DataTable Get - Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa) + Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}" 'sino existe, recarga los datos If DirectCast(Application(AppNombre), DataTable) Is Nothing Then Dim ObjMarcas As New ClsProductosServicios @@ -2701,7 +2777,7 @@ Public Class ClsPaginas End Get Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTGralMarcas-{0}", CveEmpresa) + Dim AppNombre As String = $"GlobalDTGralMarcas-{CveEmpresa}" Application(AppNombre) = value End Set End Property @@ -3496,33 +3572,58 @@ Public Class ClsPaginas #Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************" Property GlobalDTAsistenciaDetalle() As DataTable Get - GlobalDTAsistenciaDetalle = DirectCast(Application("GlobalDTAsistenciaDetalle"), DataTable) + Dim AppNombre As String = "GlobalDTAsistenciaDetalle" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetAsistenciasDetalle() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTAsistenciaDetalle = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTAsistenciaDetalle") = value + Dim AppNombre As String = "GlobalDTAsistenciaDetalle" + Application(AppNombre) = value End Set End Property Property GlobalDTAsistenciasInasistencias() As DataTable Get - GlobalDTAsistenciasInasistencias = DirectCast(Application("GlobalDTAsistenciasInasistencias"), DataTable) + Dim AppNombre As String = "GlobalDTAsistenciasInasistencias" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetAsistenciasInasistencias() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTAsistenciasInasistencias = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTAsistenciasInasistencias") = value + Dim AppNombre As String = "GlobalDTAsistenciasInasistencias" + Application(AppNombre) = value End Set End Property Property GlobalDTEstatusPersonal() As DataTable Get - GlobalDTEstatusPersonal = DirectCast(Application("GlobalDTEstatusPersonal"), DataTable) + Dim AppNombre As String = "GlobalDTEstatusPersonal" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetEstatusPersonal() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTEstatusPersonal = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTEstatusPersonal") = value + Dim AppNombre As String = "GlobalDTEstatusPersonal" + Application(AppNombre) = value End Set End Property - Property GlobalDTRHPersonal(CveEmpresa As Integer, Optional CvePersonal As Integer = -1) As DataTable - Get - Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa) + Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}" 'sino existe, recarga los datos If DirectCast(Application(AppNombre), DataTable) Is Nothing Then Dim ObjPersonal As New ClsRH @@ -3530,145 +3631,239 @@ Public Class ClsPaginas ObjPersonal.Dispose() End If - If CveEmpresa <> -1 Or CvePersonal <> -1 Then - Dim Str As StringBuilder = New StringBuilder() - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CvePersonal <> -1 Then Str.AppendFormat(" {0} CvePersonal = {1}", If(Str.Length > 0, "AND", ""), CvePersonal) - - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTRHPersonal = Dv.ToTable - Dv.Dispose() - Else - GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable) - End If - + GlobalDTRHPersonal = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTRHPersonal-{0}", CveEmpresa) + Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}" Application(AppNombre) = value End Set End Property - - Property GlobalDTDepartamentos() As DataTable Get - GlobalDTDepartamentos = DirectCast(Application("GlobalDTDepartamentos"), DataTable) + Dim AppNombre As String = "GlobalDTDepartamentos" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetDepartamentos() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTDepartamentos = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTDepartamentos") = value + Dim AppNombre As String = "GlobalDTDepartamentos" + Application(AppNombre) = value End Set End Property Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTRHPuestos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTRHPuestos = DirectCast(Application("GlobalDTRHPuestos"), DataTable) + Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetPuestos(CveEmpresa) Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() End If + GlobalDTRHPuestos = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTRHPuestos") = value + Dim AppNombre As String = $"GlobalDTRHPuestos-{CveEmpresa}" + Application(AppNombre) = value End Set End Property Property GlobalDTEscolaridad() As DataTable Get - GlobalDTEscolaridad = DirectCast(Application("GlobalDTEscolaridad"), DataTable) + Dim AppNombre As String = "GlobalDTEscolaridad" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetEscolaridades() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTEscolaridad = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTEscolaridad") = value + Dim AppNombre As String = "GlobalDTEscolaridad" + Application(AppNombre) = value End Set End Property Property GlobalDTEstadoCivil() As DataTable Get - GlobalDTEstadoCivil = DirectCast(Application("GlobalDTEstadoCivil"), DataTable) + Dim AppNombre As String = "GlobalDTEstadoCivil" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetEstadoCivil() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTEstadoCivil = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTEstadoCivil") = value + Dim AppNombre As String = "GlobalDTEstadoCivil" + Application(AppNombre) = value End Set End Property Property GlobalDTDocumentos() As DataTable Get - GlobalDTDocumentos = DirectCast(Application("GlobalDTDocumentos"), DataTable) + Dim AppNombre As String = "GlobalDTDocumentos" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetDocumentos() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTDocumentos = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTDocumentos") = value + Dim AppNombre As String = "GlobalDTDocumentos" + Application(AppNombre) = value End Set End Property Property GlobalDTGenero() As DataTable Get - GlobalDTGenero = DirectCast(Application("GlobalDTGenero"), DataTable) + Dim AppNombre As String = "GlobalDTGenero" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetGeneros() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTGenero = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTGenero") = value + Dim AppNombre As String = "GlobalDTGenero" + Application(AppNombre) = value End Set End Property Property GlobalDTMotivoBaja() As DataTable Get - GlobalDTMotivoBaja = DirectCast(Application("GlobalDTMotivoBaja"), DataTable) + Dim AppNombre As String = "GlobalDTMotivoBaja" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetMotivoBaja() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTMotivoBaja = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTMotivoBaja") = value + Dim AppNombre As String = "GlobalDTMotivoBaja" + Application(AppNombre) = value End Set End Property Property GlobalDTTiposContrato() As DataTable Get - GlobalDTTiposContrato = DirectCast(Application("GlobalDTTiposContrato"), DataTable) + Dim AppNombre As String = "GlobalDTTiposContrato" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetTiposContrato() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTTiposContrato = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTiposContrato") = value + Dim AppNombre As String = "GlobalDTTiposContrato" + Application(AppNombre) = value End Set End Property Property GlobalDTRutas() As DataTable Get - GlobalDTRutas = DirectCast(Application("GlobalDTRutas"), DataTable) + Dim AppNombre As String = "GlobalDTRutas" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetRutas() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTRutas = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTRutas") = value + Dim AppNombre As String = "GlobalDTRutas" + Application(AppNombre) = value End Set End Property Property GlobalDTTurno() As DataTable Get - GlobalDTTurno = DirectCast(Application("GlobalDTTurno"), DataTable) + Dim AppNombre As String = "GlobalDTTurno" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetTurnos() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTTurno = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTurno") = value + Dim AppNombre As String = "GlobalDTTurno" + Application(AppNombre) = value End Set End Property Property GlobalDTJornadas() As DataTable Get - GlobalDTJornadas = DirectCast(Application("GlobalDTJornadas"), DataTable) + Dim AppNombre As String = "GlobalDTJornadas" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetJornadas() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTJornadas = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTJornadas") = value + Dim AppNombre As String = "GlobalDTJornadas" + Application(AppNombre) = value End Set End Property Property GlobalDTMotivosHorasExtras() As DataTable Get - GlobalDTMotivosHorasExtras = DirectCast(Application("GlobalDTMotivosHorasExtras"), DataTable) + Dim AppNombre As String = "GlobalDTMotivosHorasExtras" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetMotivoHorasExtras() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTMotivosHorasExtras = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTMotivosHorasExtras") = value + Dim AppNombre As String = "GlobalDTMotivosHorasExtras" + Application(AppNombre) = value End Set End Property Property GlobalDTTipoBuzon() As DataTable Get - GlobalDTTipoBuzon = DirectCast(Application("GlobalDTTipoBuzon"), DataTable) + Dim AppNombre As String = "GlobalDTTipoBuzon" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetTipoBuzon() Then Application(AppNombre) = ObjPersonal.DtResultados + ObjPersonal.Dispose() + End If + + GlobalDTTipoBuzon = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTTipoBuzon") = value + Dim AppNombre As String = "GlobalDTTipoBuzon" + Application(AppNombre) = value End Set End Property #End Region #Region "*********** D T - C O M B U S T I B L E S ***********" - - Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable Get If CveEmpresa <> -1 Then @@ -3884,19 +4079,20 @@ Public Class ClsPaginas End Set End Property Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTPaqueteriaGuiaTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTPaqueteriaGuiaTipos = DirectCast(Application("GlobalDTPaqueteriaGuiaTipos"), DataTable) + Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}" + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + Dim ObjGenerales As New ClsGenerales + If ObjGenerales.GetGralPaqueteriasGuiasTipo(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados + ObjGenerales.Dispose() End If + + GlobalDTPaqueteriaGuiaTipos = DirectCast(Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTPaqueteriaGuiaTipos") = value + Dim AppNombre As String = $"GlobalDTPaqueteriaGuiaTipos-{CveEmpresa}" + Application(AppNombre) = value End Set End Property Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1, @@ -4117,6 +4313,40 @@ Public Class ClsPaginas End Set End Property +#Region "CITRUS GAME" + Property GlobalDTGralEmpacados(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = $"GlobalDTGralEmpacados-{CveEmpresa}" + If Application(AppNombre) Is Nothing Then + Dim ObjGenerales As New ClsGenerales() + If ObjGenerales.GetEmpacados(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados + ObjGenerales.Dispose() + End If + + GlobalDTGralEmpacados = DirectCast(Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTGralEmpacados-{CveEmpresa}" + Application(AppNombre) = value + End Set + End Property + Property GlobalDTGralTipoOrganicos(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = $"GlobalDTGralTipoOrganicos-{CveEmpresa}" + If Application(AppNombre) Is Nothing Then + Dim ObjGenerales As New ClsGenerales() + If ObjGenerales.GetTipoOrganicos(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados + ObjGenerales.Dispose() + End If + + GlobalDTGralTipoOrganicos = DirectCast(Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTGralTipoOrganicos-{CveEmpresa}" + Application(AppNombre) = value + End Set + End Property +#End Region #End Region @@ -4125,8 +4355,6 @@ Public Class ClsPaginas DirectorioSitio = 2 eFacturasCaptcha = 3 - - RutaEmpresasJM = 500 RutaEmpresasRM = 501 RutaEmpresasPC = 502 @@ -5135,6 +5363,8 @@ Public Class ClsPaginas PaginaDict.Add("/Inventarios/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319) PaginaDict.Add("/Inventarios/CartaPorteManual.aspx".ToUpper(), 1321) + PaginaDict.Add("/Inventarios/EntradasSalidas.aspx?AL=1".ToUpper(), 1334) + #End Region @@ -10298,8 +10528,8 @@ Public Class ClsPaginas If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True - Else + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 332, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True + Else 'Agregamos Nacional If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index a6c62f462..f3ae17edc 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -762,8 +762,8 @@ Public Class ClsProductosServicios .Add("@VigenciaIndeterminadaRSCO", SqlDbType.Bit).Value = VigenciaIndeterminadaRSCO 'Nuevo MLopez 18/11/2022 - .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoOrganico - .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoEmpacado + .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado + .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico End With diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index ec9cc547c..17861b78e 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2102,12 +2102,17 @@ Namespace Modelos CveConcepto = 6 End Select 'SI ES FACTURA,NC,DEV O ES RNC DE CARGO, CANCELAR MOVIMIENTOS - If factura.TipoDocto.Contiene("Ing", "Dev", "Egs") OrElse factura.TipoDocto.Contiene("RNC") AndAlso factura.Num1 = 1 Then + If factura.TipoDocto.Contiene("Ing", "Dev", "Egs") OrElse (factura.TipoDocto.Contiene("RNC") AndAlso factura.Num1 = 1) Then + If ObjAcum.DistribuidorMovtosGet(factura.CveCliente, UsuarioActual.CveEmpresa, CveVentaRNCCargo:=factura.CveVenta, CveConcepto:=CveConcepto) Then Dim DtMovimientos As DataTable = ObjAcum.DtResultados.FiltraParametros("Cantidad > 0") If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then For Each RowSalida As DataRow In DtMovimientos.Rows Dim Cantidad As Decimal = RowSalida("Cantidad").ToString().ToDecimal() * -1 + Dim Puntos As Decimal = RowSalida("Puntos").ToString().ToDecimal() + + Dim ImporteCargo As Decimal = RowSalida("ImporteCargo").ToString().ToDecimal() + Dim ImporteBonificacion As Decimal = RowSalida("ImporteBonificacion").ToString().ToDecimal() Dim FacturadoBonificacion = False Dim CveVentaBonificacion As Integer = -1 @@ -2117,15 +2122,15 @@ Namespace Modelos FacturadoBonificacion = CBool(RowSalida("FacturadoBonificacion").ToString()) End If - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, RowSalida("CveTamaño").ToString.ToEntero, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", factura.Fecha, CveVentaBonificacion:=CveVentaBonificacion, FacturadoBonificacion:=FacturadoBonificacion) Then + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, RowSalida("CveTamaño").ToString.ToEntero, Puntos, ImporteCargo, ImporteBonificacion, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", factura.Fecha, CveVentaBonificacion:=CveVentaBonificacion, FacturadoBonificacion:=FacturadoBonificacion) Then Retorno = False Exit For End If + Next DtMovimientos.Dispose() End If End If - Else End If @@ -2138,15 +2143,25 @@ Namespace Modelos If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then If factura.TipoDocto = "Ing" AndAlso factura.Cliente.EsDistribuidor Then - Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero For Each drow As DataRow In factura.DtDetalle.Rows - If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, 2, factura.CveVenta, UsuarioActual.CveUsuario, - UsuarioActual.CveEmpresa, 0D, "", factura.Fecha) Then + If drow("CveTamaño").ToString.ToEntero > 0 Then + Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") + If DrTamanio IsNot Nothing Then + Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() + Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() + Dim Puntos As Decimal = DrTamanio("Puntos").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() + + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, Puntos, Cargo, Bonificacion, 2, factura.CveVenta, UsuarioActual.CveUsuario, + UsuarioActual.CveEmpresa, 0D, "", factura.Fecha) Then + Resultado = False + Exit For + End If + Else Resultado = False Exit For End If + End If Next @@ -2197,13 +2212,22 @@ Namespace Modelos If factura.Cliente.EsDistribuidor AndAlso factura.CveConceptoMovimiento = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Dr("Cantidad").ToString.ToDecimal(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, - UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, factura.Fecha, CveMovimiento:=CveMovimiento) Then - ' Mensaje = "Error al guardar Movimientos de distribuidor" + Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") + If DrTamanio IsNot Nothing Then + Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() + Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() + Dim Puntos As Decimal = DrTamanio("Puntos").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() + + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Dr("Cantidad").ToString.ToDecimal(), Dr("CveTamaño").ToString.ToEntero, Puntos, Cargo, Bonificacion, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, + UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, factura.Fecha, CveMovimiento:=CveMovimiento) Then + ' Mensaje = "Error al guardar Movimientos de distribuidor" + Resultado = False + Exit For + End If + Else Resultado = False Exit For End If - End If End If @@ -4867,6 +4891,11 @@ Namespace Modelos AplicaRefacturacionConPagos = True End If + 'SI NO TIENE PAGOS, DEBE SEGUIR EL CAMINO DE REFACTURACION NORMAL + If AplicaRefacturacionConPagos AndAlso ObjFactura.Pagado = 0 Then + AplicaRefacturacionConPagos = False + End If + 'VALIDA QUE LA FACTURA NO TENGA PAGOS If Not AplicaRefacturacionConPagos AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Rem") AndAlso ObjFactura.Pagado > 0 Then Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados." @@ -5380,7 +5409,10 @@ Namespace Modelos DtSalidas = DtInventario.FiltraParametros($"CvePS IS NULL AND {Filtro}") If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then - DtVirtuales = DtInventario.FiltraParametros($"CvePS IS NULL AND CveConcepto = 37 AND CveTipoAlmacen = 24") + DtVirtuales = DtInventario.FiltraParametros($"CvePS IS NULL AND CveConcepto = 37") + If ObjFactura.TipoDocto = "Dev" Then + DtVirtuales = DtInventario.FiltraParametros($"CvePS IS NULL AND CveConcepto = 36") + End If End If If ObjFactura.TipoDocto = "Ing" Then @@ -5593,7 +5625,7 @@ Namespace Modelos If DtVirtuales IsNot Nothing Then For Each RowVirtual As DataRow In DtVirtuales.Rows 'REALIZA LA DEVOLUCION AL ALMACEN VIRTUAL - If Not ErrorCancelar AndAlso Not CancelarMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowVirtual("CveMovimiento").ToString().ToEntero(), ObjInventario) Then + If Not ErrorCancelar AndAlso Not CancelarMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowVirtual("CveMovimiento").ToString().ToEntero(), ObjInventario, TipoDocto:=ObjFactura.TipoDocto) Then ErrorCancelar = True MensajeError = "Ocurrió un error al realizar la devolución del virtual. Por favor vuelva a intentar." End If @@ -6130,7 +6162,7 @@ Namespace Modelos Return Not ErrorCancelar End Function - Private Function CancelarMovimientosVirtuales(CveVenta As Integer, CveMovimientoDevolucion As Integer, CveMovimientoVirtualSalida As Integer, ByRef ObjInventario As ClsInventarios) As Boolean + Private Function CancelarMovimientosVirtuales(CveVenta As Integer, CveMovimientoDevolucion As Integer, CveMovimientoVirtualSalida As Integer, ByRef ObjInventario As ClsInventarios, Optional TipoDocto As String = "") As Boolean Dim ErrorCancelar As Boolean = False Try If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then @@ -6163,6 +6195,10 @@ Namespace Modelos End If Dim CveConceptoMovimientoVirtual As Integer = 36 + If TipoDocto = "Dev" Then + CveConceptoMovimientoVirtual = 37 + End If + Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimientoDevolucion If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then @@ -7382,6 +7418,14 @@ Namespace Modelos #End Region #Region "G L O B A L - D T" + Property GlobalDTAcumTamaños() As DataTable + Get + GlobalDTAcumTamaños = DirectCast(HttpContext.Current.Application("GlobalDTAcumTamaños"), DataTable) + End Get + Set(value As DataTable) + HttpContext.Current.Application("GlobalDTAcumTamaños") = value + End Set + End Property Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double Get If GlobalTipoCambio <= 0 Then diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index a2c82ecc4..94533a423 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1544,15 +1544,15 @@ Partial Class Bancos_IE DivOtrosIngresosEgresos.Visible = True End If - If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then - If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then - Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - BtnGuardar.Enabled = False - Else - BtnGuardar.Enabled = True - End If - UpGuardar.Update() - End If + 'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then + ' If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then + ' Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + ' BtnGuardar.Enabled = False + ' Else + ' BtnGuardar.Enabled = True + ' End If + ' UpGuardar.Update() + 'End If CargaCuentasDepositos() @@ -1600,15 +1600,15 @@ Partial Class Bancos_IE HdnProvPorRetISR.Value = "0" 'ObjProveedor.RetISR.ToString IDCtaBeneficiario = ObjPersonal.IdCtaContPersonal - If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then - If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then - Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - BtnGuardar.Enabled = False - Else - BtnGuardar.Enabled = True - End If - UpGuardar.Update() - End If + 'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then + ' If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then + ' Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + ' BtnGuardar.Enabled = False + ' Else + ' BtnGuardar.Enabled = True + ' End If + ' UpGuardar.Update() + 'End If CargaCuentasDepositos() Else diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index d9f4f41b0..fb4ab7a2d 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -550,8 +550,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas //CONTABILIZA if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) { - if (IDCtaContableAcreedor > 0 && IDCtaContableBancos > 0) - { + if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) { IDPoliza = ObjMov.ContaIdPoliza; @@ -560,18 +559,16 @@ public partial class Bancos_PagoAcreedor : ClsPaginas { Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); } - } - else - { - if (IDCtaContableAcreedor < 1) + + if (IDCtaContableAcreedor < 1 && UsuarioActual.Empresa.TipoContabilidad == 2) { Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia); } - if (IDCtaContableBancos < 1) + if (IDCtaContableBancos < 1 && UsuarioActual.Empresa.TipoContabilidad == 2) { Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia); } - } + } if (MsgError.Equals("")) diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index 697ec6c74..3a210032b 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -836,14 +836,14 @@ public partial class Bancos_PagoDeudor : ClsPaginas if (CveMoneda != 1 && UsaComplementaria) { - decimal difComplementaria = ImporteMN - (ImporteBanco + ImporteComplementaria); - - if (difComplementaria != 0) - { - ImporteComplementaria = difComplementaria > 0 ? (ImporteComplementaria+ difComplementaria) : (ImporteComplementaria- difComplementaria); - } - + //decimal difComplementaria = ImporteMN - (ImporteBanco + ImporteComplementaria); + //if (difComplementaria != 0) + //{ + // ImporteComplementaria = difComplementaria > 0 ? (ImporteComplementaria+ difComplementaria) : (ImporteComplementaria- difComplementaria); + //} + ImporteComplementaria = (ImporteBanco * TC) - ImporteBanco; + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, ImporteBanco, Ref, CveConceptoContableBancoComplementario, Conc, DateTime.Now, IDCtaContableBancosComplementario, -1, CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) { MsgError = "No se pudo insertar concepto de bancos complementaria"; diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs index e8c36bc90..fd1c1d4e8 100644 --- a/Bancos/PrestamoPersonal.aspx.cs +++ b/Bancos/PrestamoPersonal.aspx.cs @@ -379,8 +379,8 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas //CONTABILIZA if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) { - if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0) - { + //if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0) + //{ if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) { IDPoliza = ObjMov.ContaIdPoliza; @@ -389,18 +389,18 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas { Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); } - } - else - { - if (IDCtaContablePrestamo < 1) - { - Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia); - } - if (IDCtaContableBancos < 1) - { - Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia); - } - } + //} + //else + //{ + // if (IDCtaContablePrestamo < 1) + // { + // Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia); + // } + // if (IDCtaContableBancos < 1) + // { + // Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia); + // } + //} } if (MsgError.Equals("")) @@ -635,8 +635,8 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas //CONTABILIZA if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) { - if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0) - { + //if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0) + //{ if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) { IDPoliza = ObjMov.ContaIdPoliza; @@ -645,18 +645,18 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas { Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); } - } - else - { - if (IDCtaContablePrestamo < 1) - { - Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia); - } - if (IDCtaContableBancosPrestamo < 1) - { - Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia); - } - } + //} + //else + //{ + // if (IDCtaContablePrestamo < 1) + // { + // Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia); + // } + // if (IDCtaContableBancosPrestamo < 1) + // { + // Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia); + // } + //} } if (MsgError.Equals("")) diff --git a/Bancos/RepCxCCliente.aspx b/Bancos/RepCxCCliente.aspx index 283a6e5ba..4c4067ef2 100644 --- a/Bancos/RepCxCCliente.aspx +++ b/Bancos/RepCxCCliente.aspx @@ -59,7 +59,7 @@ -
+
@@ -124,10 +124,10 @@
  • Cuenta:     - +
  • Moneda: - +
  • diff --git a/Bancos/RepCxCCliente.aspx.vb b/Bancos/RepCxCCliente.aspx.vb index ffa1a3378..960811766 100644 --- a/Bancos/RepCxCCliente.aspx.vb +++ b/Bancos/RepCxCCliente.aspx.vb @@ -69,13 +69,13 @@ Partial Class Bancos_RepCxCCliente Mov.Dispose() GvCxC.DataBind() - If (GvCxC.Rows.Count > 0) Then - GvCxC.UseAccessibleHeader = True - GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader - RegistraScript("OrdenarGV();") + 'If (GvCxC.Rows.Count > 0) Then + GvCxC.UseAccessibleHeader = True + GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader + RegistraScript("OrdenarGV();") + UPDatos.Update() - UPDatos.Update() - End If + 'End If End Sub Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index eadfd1fe5..8c2a90d53 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1084,6 +1084,7 @@ Partial Class Compras_Compras #End Region + Dim DTConceptos As DataTable Private Property EmpresasOC As List(Of Integer) Get @@ -1185,6 +1186,18 @@ Partial Class Compras_Compras End Property + Private Property EsDevolucionApoyoLogistico As Boolean + Get + + If ViewState("EsDevolucionApoyoLogistico") Is Nothing Then + ViewState("EsDevolucionApoyoLogistico") = False + End If + Return CType(ViewState("EsDevolucionApoyoLogistico"), Boolean) + End Get + Set(value As Boolean) + ViewState("EsDevolucionApoyoLogistico") = value + End Set + End Property Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load @@ -1610,7 +1623,13 @@ Partial Class Compras_Compras NCSeleccionFacturasRelacionadas(UUIDSList) End If + If CveFactura > 0 AndAlso Serie Isnot nothing AndAlso Serie.ToUpper = "NL" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + EsDevolucionApoyoLogistico = True + DdlTipoComprobante.Items.Clear() + DdlTipoComprobante.Items.Add(New ListItem("Devolución", "DEV")) + DdlTipoComprobante.SelectedValueExist("DEV") + End If End If @@ -3500,7 +3519,7 @@ Partial Class Compras_Compras ViewState("IdCtaContRetIVA") = ObjProveedor.IdCtaContRetIVA ViewState("IdCtaContRetISR") = ObjProveedor.IdCtaContRetISR - If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso ObjProveedor.IdCtaContProveedores < 1 Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso ObjProveedor.IdCtaContProveedores < 1 Then Alert("El Proveedor seleccionado no tiene cuenta contable asignada.", TipoMensaje.MsgAdvertencia) End If @@ -5527,6 +5546,8 @@ Partial Class Compras_Compras If DdlTipoComprobante.SelectedValue = "Fac" Then + + For Each tCveAlmacen As Integer In ListAlmacenes If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then Continue For @@ -5553,7 +5574,7 @@ Partial Class Compras_Compras ListaMovimientosAlmacen.Add(CveMovimientoInventario) - + Dim contadorAlamcen As Integer = 0 For Each Dr As DataRow In DtInv.Rows CveProducto = Dr("CvePS").ToString.ToEntero @@ -5594,22 +5615,26 @@ Partial Class Compras_Compras End If End If - 'si no es por serie lote + ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar) - If(DdlMoneda.SelectedValue.ToEntero = 1, tDescuento, tDescuento * TipoCambioGuardar) + 'si no es por serie lote ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto) - If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then - ErrorMovInv = True - Exit For + If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then + ErrorMovInv = True + Exit For + End If End If + End If - End If - - i = i + 1 + i = i + 1 + contadorAlamcen = contadorAlamcen + 1 Next End If + + Next End If @@ -8633,6 +8658,7 @@ Partial Class Compras_Compras Pago.ImportePago = ImporteAnt Pago.OtroGastoIngreso = ImporComisionAnticipo Pago.CveMonedaPago = CveMonedaAnticipo + Pago.TCPago = TipoCambioAnt Select Case gvr.DataKey("TipoDocto") Case "NC", "DEV" @@ -8661,10 +8687,6 @@ Partial Class Compras_Compras PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal - - - - If CveMonedaAnticipo > 1 Then Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then @@ -10991,7 +11013,16 @@ Partial Class Compras_Compras e.Row.FCCheckBox("cbInv").Enabled = False End If - e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(If(DdlTipoCompra.SelectedValue.ToEntero = 9, "CveTipoAlmacen IN (21)", "CveTipoAlmacen IN (1,2,7,14,19)")) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) + + If EsDevolucionApoyoLogistico Then + e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen = 27") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) + + Else + e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(If(DdlTipoCompra.SelectedValue.ToEntero = 9, "CveTipoAlmacen IN (21)", "CveTipoAlmacen IN (1,2,7,14,19)")) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) + End If + + + e.Row.FCDropDownList("ddlEAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) e.Row.FCDropDownList("ddlEAlmacen").DataBind() 'e.Row.FCDropDownList("ddlEAlmacen").SelectedValue = If(e.Row.DBCampo("CveAlmacen").ToEntero <= 0, "-1", e.Row.DBCampo("CveAlmacen")) @@ -11103,6 +11134,10 @@ Partial Class Compras_Compras StrAlmacenes = $"Modalidad = 0" End If + If EsDevolucionApoyoLogistico Then + StrAlmacenes = " CveTipoAlmacen = 27" + End If + e.Row.FCDropDownList("ddlAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrAlmacenes) 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) e.Row.FCDropDownList("ddlAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) e.Row.FCDropDownList("ddlAlmacen").DataBind() @@ -17628,6 +17663,8 @@ Partial Class Compras_Compras 'If GlobalDTProductosServiciosEquivalencias(CvePS, CveUM).Rows.Count = 0 Then Row("CveEq") = 1 Else Row("CveEq") = 0 Row("NoDeducible") = NoDeducible + + Total = Math.Round(PU, DecimalesPermitidos) * Cantidad - Descuento Row("PU") = Math.Round(PU, DecimalesPermitidos) If CargaXml And (Version = "3.3" Or Version = "4.0") Then diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 8dec1d1af..2480da969 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -5455,7 +5455,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString)) - params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy"), ""))) + params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy hh:mm tt"), ""))) params.Add(New ReportParameter("TecnicoAsignado", dr("UsuarioAtendio").ToString)) diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index a7ae9b1c2..88ea2a459 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -498,7 +498,7 @@ Partial Class ContabilidadC_RegPrePoliza HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza")) divContabilziada.Visible = True BtnEliminar.Visible = False - If UsuarioActual.CveUsuario = 100 Then + If UsuarioActual.CveUsuario = 100 OrElse UsuarioActual.CveEmpresa.Contiene(13, 83) Then BtnContabilizar.Visible = True BtnContabilizar.Text = "Actualizar Poliza" End If diff --git a/Contabilidad2/CatCuentas.aspx b/Contabilidad2/CatCuentas.aspx index 58b1d4c79..9810d4268 100644 --- a/Contabilidad2/CatCuentas.aspx +++ b/Contabilidad2/CatCuentas.aspx @@ -125,7 +125,7 @@
    Tipo de Cuenta
    - + @@ -145,7 +145,7 @@
    Cuenta Mayor
    - + diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index 60b7fda83..c30545abe 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -537,6 +537,7 @@ + @@ -660,6 +661,13 @@ + + + + + + + diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index 86f4f7a82..25f8386d7 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -847,6 +847,13 @@ Partial Class RepCxCDetalle GvDatos.Columns(44).Visible = False End If + If ChkMostrarLineaAdicional.Checked Then + GvDatos.Columns(45).Visible = True + SePersonalizo = 1 + Else + GvDatos.Columns(45).Visible = False + End If + If SePersonalizo = 1 Then ImgExcelPersonalizado.Visible = True diff --git a/Empresas/132/Formatos/ReciboDePago.rdlc b/Empresas/132/Formatos/ReciboDePago.rdlc index 30b0a0548..e9187293e 100644 --- a/Empresas/132/Formatos/ReciboDePago.rdlc +++ b/Empresas/132/Formatos/ReciboDePago.rdlc @@ -1,4059 +1,5 @@ - - - - - - - - 2.55292cm - - - 3.0262cm - - - 9.76834cm - - - 2.55292cm - - - 2.63526cm - - - - - 0.49cm - - - - - true - true - - - - - Cantidad - - - - - - - Textbox24 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UM - - - - - - - Textbox27 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox26 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - P. Unitario - - - - - - - Textbox36 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox38 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Parameters!Cantidad.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!UnidadMedida.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Descripcion.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!PU.Value - - - - - - - Textbox37 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Parameters!Importe.Value - - - - - - - Textbox39 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - - - - - - - - - - - - - - - - - DataSet2 - 3.16535cm - 1.09cm - 20.53564cm - - - - - - - - - 5.35332cm - - - 1.8cm - - - 1.8cm - - - 1.99576cm - - - 1.8cm - - - 1.99576cm - - - 2.49576cm - - - 3.2908cm - - - - - 0.49cm - - - - - true - true - - - - - UUID - - - - - - - Textbox6 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie - - - - - - - Textbox3 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio - - - - - - - Textbox9 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Método Pago - - - - - - - Textbox13 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Moneda - - - - - - - Textbox31 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Num. Parc. - - - - - - - Textbox8 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Saldo Anterior - - - - - - - Textbox19 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Monto Pagado - - - - - - - Textbox25 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!IdDocumento.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Serie.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Folio.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!MetodoDePagoDR.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!MonedaDR.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!NumParcialidad.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImpSaldoAnt.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet2 - 5.19822cm - 1.09cm - 20.5314cm - 1 - - - - - - - - - 4.5cm - - - 1.74905cm - - - 1.5cm - - - 2.96606cm - - - 6.82934cm - - - 2.98695cm - - - - - 0.49cm - - - - - true - true - - - - - Fecha y hora de pago - - - - - - - Textbox45 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Moneda - - - - - - - Textbox21 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - TC - - - - - - - Textbox5 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cta Ordenante - - - - - - - Textbox12 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Forma de Pago - - - - - - - Textbox48 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total de Pago - - - - - - - Textbox50 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!FechaPago.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!MonedaP.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TipoCambioP.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!CtaOrdenante.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FormaDePagoP.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Monto.Value - - - - - - - Monto - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total de Pago con letra: - - - - =Parameters!CantidadLetra.Value - - - - - - - Textbox16 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - - - - - - - - - - - - - - - After - - - - - - Before - - - - DataSet1 - 6.73607cm - 1.69cm - 20.5314cm - 2 - - - - - - true - true - - - - - CFDI RELACIONADOS - - - - - - - Textbox5 - 4.70822cm - 0.01844cm - 0.49cm - 20.5314cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 3.90631in - 1.3in - 1.5in - 4 - - - - - - true - true - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - #4f81bd - - 1pt - - - #4f81bd - - 1pt - - - #4f81bd - - 1pt - - - #4f81bd - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. Certificado: - - - - - - - White - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - UUID: - - - - - - - White - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Sello.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SelloSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!NoCertificado.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UUIDPago.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Regímen: Regímen General de Ley Personas Morales, lugar de expedición C.P. 83245 Hermosillo, Sonora, México. - - - - - - - - - Éste documento es una representación impresa de un CFDi - - - - - - - Textbox171 - 15.43785cm - 3.97477cm - 0.89979cm - 16.50467cm - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Datos del Cliente: - - - - - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cliente: - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Cliente.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteDireccion.Value - - - - , - - - - =Parameters!ClienteColonia.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección: - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad: - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteCiudad.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteCP.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - CP: - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - RFC Ordenante: - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!RFCOrdenante.Value - - - - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sello: - - - - - - - White - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sello digital del SAT: - - - - - - - White - - 1pt - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - 16.75918cm - - - - - 20.54984cm - - - 2.27561cm - true - true - - - true - - - - - RECIBO DE PAGO - - - - - - - Textbox3 - 5.84339in - 0.5cm - 2.24597in - - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!SerieFolio.Value - - - - - - - Textbox3 - 0.20833in - 5.84339in - 0.60856cm - 2.24597in - 1 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Fecha Timbre - - - - - - - - - - - - - - - - Textbox3 - 0.44792in - 5.84339in - 0.5cm - 2.24597in - 2 - - - #2c2e42 - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FechaTimbre.Value - - - - - - - Textbox3 - 0.64477in - 5.84339in - 0.25114in - 2.24597in - 3 - - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - - #2c2e42 - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo - FitProportional - 2.27561cm - 2.55292cm - 4 - - - - - - true - - - - - SOLUCIONES EN TELEMEDICIÓN JAR S.A DE C.V. - - - - - - - - - R.F.C. - - - - STJ180705IV4 - - - - - - - - - contacto@soteljar.com - - - - - - - Textbox4 - 1.77165in - 0.57533in - 4.00199in - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - - - - - - - - Textbox10 - 0.64477in - 2.84635in - 0.25114in - 1.93508in - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.84667cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 0.17639cm - 17.56289cm - 0.41981cm - 2.94979cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + Textbox24 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UM + + + + + + + Textbox27 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox26 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P. Unitario + + + + + + + Textbox36 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox38 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!Cantidad.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!UnidadMedida.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!PU.Value + + + + + + + Textbox37 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox39 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + + + + + + DataSet2 + 3.16535cm + 1.09cm + 20.53564cm + + + + + + + + + 4.5cm + + + 1.74905cm + + + 1.5cm + + + 2.96606cm + + + 6.82934cm + + + 2.98695cm + + + + + 0.49cm + + + + + true + true + + + + + Fecha y hora de pago + + + + + + + Textbox45 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + + Textbox21 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TC + + + + + + + Textbox5 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cta Ordenante + + + + + + + Textbox12 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Forma de Pago + + + + + + + Textbox48 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total de Pago + + + + + + + Textbox50 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!FechaPago.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MonedaP.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TipoCambioP.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!CtaOrdenante.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FormaDePagoP.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Monto.Value + + + + + + + Monto + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total de Pago con letra: + + + + =Parameters!CantidadLetra.Value + + + + + + + Textbox16 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DataSet1 + 6.76782cm + 1.69cm + 20.5314cm + 1 + + + + + + true + true + + + + + CFDI RELACIONADOS + + + + + + + Textbox5 + 4.42247cm + 0.01844cm + 0.49cm + 20.5314cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 3.91881in + 1.3in + 1.5in + 3 + + + + + + true + true + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + #4f81bd + + 1pt + + + #4f81bd + + 1pt + + + #4f81bd + + 1pt + + + #4f81bd + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. Certificado: + + + + + + + White + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + UUID: + + + + + + + White + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Sello.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SelloSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NoCertificado.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UUIDPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regímen: Regímen General de Ley Personas Morales, lugar de expedición C.P. 83245 Hermosillo, Sonora, México. + + + + + + + + + Éste documento es una representación impresa de un CFDi + + + + + + + Textbox171 + 15.4696cm + 3.97477cm + 0.89979cm + 16.50467cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Datos del Cliente: + + + + + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cliente: + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Cliente.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteDireccion.Value + + + + , + + + + =Parameters!ClienteColonia.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección: + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ciudad: + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteCiudad.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteCP.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + CP: + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + RFC Ordenante: + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!RFCOrdenante.Value + + + + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello: + + + + + + + White + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello digital del SAT: + + + + + + + White + + 1pt + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.13038cm + + + 1.64459cm + + + 1.80415cm + + + 1.76995cm + + + 1.8cm + + + 1.8cm + + + 1.8cm + + + 1.99576cm + + + 2.49576cm + + + 3.2908cm + + + + + 0.56938cm + + + + + true + true + + + + + UUID + + + + + + + Textbox6 + + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + Serie + + + + + + + Textbox3 + + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio + + + + + + + Textbox9 + + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + + Textbox31 + + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Num. Parc. + + + + + + + Textbox8 + + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldo Anterior + + + + + + + Textbox19 + + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Monto Pagado + + + + + + + Textbox25 + + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.36915cm + + + + + true + true + + + + + =Fields!IdDocumento.Value + + + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + 4 + + + + + + + + + true + true + + + + + =Fields!Serie.Value + + + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Folio.Value + + + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MonedaDR.Value + + + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NumParcialidad.Value + + + + + + + NumParcialidad + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpSaldoAnt.Value + + + + + + + ImpSaldoAnt + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + Impuesto + + + + + + + Textbox108 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + Top + + + + + + + + true + true + + + + + Tipo + + + + + + + Textbox109 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + Top + + + + + + + + true + true + + + + + Base + + + + + + + Textbox110 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + Top + + + + + + + + true + true + + + + + Tipo Factor + + + + + + + Textbox111 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + Top + + + + + + + + true + true + + + + + Tasa/Cuota + + + + + + + Textbox112 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + Top + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox113 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + Top + + + + + + + + true + true + + + + + + + + + + + + Textbox114 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + Top + + + + + + + + true + true + + + + + + + + + + + + Textbox115 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0 Or Fields!Tra002BaseDR.Value > 0 Or Fields!Tra003BaseDR.Value > 0 Or Fields!Ret001BaseDR.Value > 0 Or Fields!Ret002BaseDR.Value > 0 Or Fields!Ret003BaseDR.Value > 0, False, True) + + + + Top + + + + + + + + true + true + + + + + + + + + + + Top + + + + + + + + true + true + + + + + + + + + + + Top + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Tra001TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Tra001TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Tra001ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + + + + + + + + Textbox4 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox13 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Tra002TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Tra002TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Tra002ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + + + + + + + + Textbox67 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox68 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox61 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Tra003TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Tra003TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Tra003ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + + + + + + + + Textbox51 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox55 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Ret001TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Ret001TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Ret001ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + + + + + + + + Textbox75 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox76 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Ret002TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Ret002TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Ret002ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + + + + + + + + Textbox85 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox86 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox59 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Ret003TipoFactorDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Ret003TasaOCuotaDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + + + + + + + true + true + + + + + =Fields!Ret003ImporteDR.Value + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + + #2c2e42 + + + es-MX + + + + + + + + true + true + + + + + + + + + + + + Textbox95 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + Textbox96 + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003BaseDR.Value > 0, False, True) + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + + + + + + + + + + + DataSet2 + 5.09906cm + 0.02337cm + 1.49415cm + 20.53139cm + 26 + + + + + + 16.36939cm + + + + + 20.55476cm + + + 2.27561cm + true + true + + + true + + + + + RECIBO DE PAGO + + + + + + + Textbox3 + 5.84339in + 0.5cm + 2.24597in + + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!SerieFolio.Value + + + + + + + Textbox3 + 0.20833in + 5.84339in + 0.60856cm + 2.24597in + 1 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha Timbre + + + + + + + + + + + + + + + + Textbox3 + 0.44792in + 5.84339in + 0.5cm + 2.24597in + 2 + + + #2c2e42 + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!FechaTimbre.Value + + + + + + + Textbox3 + 0.64477in + 5.84339in + 0.25114in + 2.24597in + 3 + + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + + #2c2e42 + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo + FitProportional + 2.27561cm + 2.55292cm + 4 + + + + + + true + + + + + SOLUCIONES EN TELEMEDICIÓN JAR S.A DE C.V. + + + + + + + + + R.F.C. + + + + STJ180705IV4 + + + + + + + + + contacto@soteljar.com + + + + + + + Textbox4 + 1.77165in + 0.57533in + 4.00199in + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + + + + + + + + Textbox10 + 0.64477in + 2.84635in + 0.25114in + 1.93508in + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.84667cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0.17639cm + 17.56289cm + 0.41981cm + 2.94979cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 1.27cm + - - - - - true - true - - - - - Recibió - - - - Textbox34 - 6.98296cm - 3.99525cm - 0.6cm - 2.5cm - 1 - - true - - - - 2pt - 2pt - 2pt - 2pt - - - - 8.48254cm - 3.11891cm - 0cm - 4.11396cm - 2 - - true - - - - - - - true - true - - - - - Solicitó - - - - Textbox34 - 6.98296cm - 12.70798cm - 0.6cm - 2.5cm - 3 - - true - - - - 2pt - 2pt - 2pt - 2pt - - - - 8.48254cm - 11.99039cm - 0cm - 4.27271cm - 4 - - true - - - - - - - true - true - - - - - =Parameters!Solicito.Value - - - - - - - Textbox36 - 8.54576cm - 11.99039cm - 0.6cm - 4.27271cm - 5 - - true - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Recibio.Value - - - - - - - Textbox37 - 8.54576cm - 3.11891cm - 0.6cm - 4.11396cm - 6 - - true - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Material Utilizado - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 0.72729cm - - - 1.5428cm - - - 12.86353cm - - - - - 0.44125cm - - - - - true - true - - - - - # - - - - - - - Textbox23 - - - - Black - 1pt - - - Black - 1pt - - - Black - 1pt - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cantidad - - - - - - - Textbox25 - - - - Black - 1pt - - - Black - 1pt - - - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox12 - - - - Black - 1pt - - - Black - 1pt - - - - - - Black - 1pt - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - - - true - true - - - - - =RowNumber(Nothing) - - - - - - - Textbox24 - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - - Black - 1pt - - - Black - 1pt - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - - Black - 1pt - - - Black - 1pt - - - - - - Black - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.20312cm - - - - - true - true - - - - - - - - - - - - Black - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox29 - - - - Black - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Black - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - - - - - - Before - - - - DataSet2 - 5.17719cm - 0.06614cm - 1.08562cm - 15.13362cm - 8 - - true - + 16.3748cm @@ -1052,7 +354,7 @@ 0.08599cm 0.50475cm 3.16146cm - 9 + 1 @@ -1086,7 +388,7 @@ 0.08599cm 0.56825cm 5.22521cm - 10 + 2 @@ -1123,7 +425,7 @@ 0.08599cm 0.56825cm 5.22521cm - 11 + 3 @@ -1161,7 +463,7 @@ 5.3112cm 0.56825cm 4.54835cm - 12 + 4 @@ -1195,7 +497,7 @@ 0.08599cm 0.56825cm 5.22521cm - 13 + 5 @@ -1228,6 +530,264 @@ 5.3112cm 0.56825cm 4.54835cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Compra de Acumulador a Valor lleno + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No paga servicio de diagnóstico + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Venta por Ajuste/Garantía + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Paga valor de ajuste + diagnóstico + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Servicios de Carga Lenta + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Paga al término del servicio cuando se entreguemos su acumulador + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Estimado Cliente confirmamos nuestras tarifas de Servicio a Domicilio + + + + + + + Textbox3 + 13.03323cm + 1.71132cm + 0.41479cm + 17.14791cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nota: todo servicio de carga lenta requiere 12 horas de carga nocturna + diagnóstico de acumulador + + + + + + true + true + + + + + Producto o Servicio + + + + + + + Textbox3 + 15.83257cm + 1.65364cm + 0.56825cm + 12.09326cm + 15 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Precio + + + + + + + Textbox3 + 15.83257cm + 13.7469cm + 0.56825cm + 4.54835cm + 16 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + DIAGNOSTICO A DOMICILIO SERVICIO LOCAL O RED LTH + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 180.00 + + + + + + + Textbox3 + 16.40082cm + 13.7469cm + 0.4095cm + 4.54835cm + 18 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + SERVICIO PASE DE CORRIENTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 180.00 + + + + + + + Textbox3 + 16.84559cm + 13.7469cm + 0.4095cm + 4.54835cm + 20 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IAGNOSTICO Y CARGA LENTA SER A DOM ACUM NUESTRAS MARCAS + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 280.00 + + + + + + + Textbox3 + 17.25509cm + 13.7469cm + 0.4095cm + 4.54835cm + 22 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + DIAGNOSTICO Y CARGA LENTA SER A DOM ACUM OTRAS MARCAS + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + 350.00 + + + + + + + Textbox3 + 17.69986cm + 13.7469cm + 0.4095cm + 4.54835cm + 24 + + + 2pt + 2pt + 2pt + 2pt + + - 3.60069in + 7.12967in - 0.15872cm + 0.15871cm 0.08599cm 0cm 20.21078cm diff --git a/Global.asax b/Global.asax index 10ae25b9a..e8091ab91 100644 --- a/Global.asax +++ b/Global.asax @@ -9,36 +9,37 @@ diff --git a/OS/RepServicioDomicilio.aspx.vb b/OS/RepServicioDomicilio.aspx.vb index 825438e5c..33a77efd2 100644 --- a/OS/RepServicioDomicilio.aspx.vb +++ b/OS/RepServicioDomicilio.aspx.vb @@ -9,6 +9,7 @@ Imports Telerik.Web.UI Imports APP_Code_CSharp Imports AjaxControlToolkit.AsyncFileUpload.Constants Imports System +Imports System.Globalization Partial Class OS_RepServicioDomicilio Inherits ClsPaginas @@ -740,7 +741,7 @@ Partial Class OS_RepServicioDomicilio DdlTecnicoAsignar.SelectedValueExist(ObjOS.CveUsuarioAtendio) CveTecnicoAsignarOrioginal = ObjOS.CveUsuarioAtendio FechaInicioOriginal = ObjOS.FechaInicio - TxtModalFechaOS.Text = ObjOS.FechaInicio.ToString.ToDate.ToString("dd/MM/yyyy hh:mm") + TxtModalFechaOS.Text = ObjOS.FechaInicio.ToString.ToDate.ToString("dd/MM/yyyy HH:mm") DvModalSubProyecto.Visible = True 'TSTimeSelector.Hour = If(ObjOS.FechaInicio.Hour > 12, ObjOS.FechaInicio.Hour - 12, ObjOS.FechaInicio.Hour) 'TSTimeSelector.Minute = ObjOS.FechaInicio.Minute @@ -971,11 +972,11 @@ Partial Class OS_RepServicioDomicilio Dim CorreoAsignado As String = GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero).Rows(0)("Correo").ToString If Not TieneError And CorreoAsignado.Trim.Length > 0 AndAlso DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then CorreoAsignado = GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero).Rows(0)("Correo").ToString - MandaCorreOS(CveOSAsignar, CorreoAsignado) + MandaCorreOS(CveOS, CorreoAsignado) End If If Not TieneError And TxtEmail.Text.Trim.Length > 0 AndAlso DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then - MandaCorreOS(CveOSAsignar, TxtEmail.Text, True) + MandaCorreOS(CveOS, TxtEmail.Text, True) End If If Not TieneError Then @@ -1092,7 +1093,7 @@ Partial Class OS_RepServicioDomicilio params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString)) - params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy"), ""))) + params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy hh:mm tt"), ""))) params.Add(New ReportParameter("TecnicoAsignado", dr("UsuarioAtendio").ToString)) @@ -1126,7 +1127,7 @@ Partial Class OS_RepServicioDomicilio Dim lrds As New List(Of ReportDataSource) Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS} - Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS} + Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTMaterialesOS} lrds.Add(rds) lrds.Add(rds2) @@ -1247,4 +1248,149 @@ Partial Class OS_RepServicioDomicilio End Sub + + + Protected Sub LnkHorariosNoOperativos_Click(sender As Object, e As EventArgs) + RegistraScript("$('#DVModalOSHorarioNoOperativo').modal('show');") + + DdlTecnicoAsignarHorario.Items.Clear() + + DdlTecnicoAsignarHorario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'") + DdlTecnicoAsignarHorario.DataBind() + DdlTecnicoAsignarHorario.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + DdlTecnicoAsignarHorario.SelectedValueExist("-1") + + TxtHorarioInicio.SetTime(0, 0, 0, MKB.TimePicker.TimeSelector.AmPmSpec.AM) + TxtHorarioFin.SetTime(0, 0, 1, MKB.TimePicker.TimeSelector.AmPmSpec.AM) + + UpModalHorariosNoOperativos.Update() + + End Sub + + + Protected Sub DdlTecnicoAsignarHorario_SelectedIndexChanged(sender As Object, e As EventArgs) + + + TxtHorarioInicio.SetTime(0, 0, 0, MKB.TimePicker.TimeSelector.AmPmSpec.AM) + TxtHorarioFin.SetTime(0, 0, 1, MKB.TimePicker.TimeSelector.AmPmSpec.AM) + + + If DdlTecnicoAsignarHorario.SelectedValue.ToEntero > 0 Then + Dim objOS As New ClsOS + Dim DTHorarios As New DataTable + + If objOS.GetOrdenesServiciosTecnicoHorarioNoOperativo(DdlTecnicoAsignarHorario.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + DTHorarios = objOS.DtResultados + End If + + objOS.Dispose() + + + + + If DTHorarios IsNot Nothing AndAlso DTHorarios.Rows.Count > 0 Then + + Dim HoraInicio As String = DTHorarios.Rows(0)("HoraInicio").ToString + Dim HoraFin As String = DTHorarios.Rows(0)("HoraFin").ToString + + TxtHorarioInicio.SetTime(HoraInicio.ToDateTime.Hour, HoraInicio.ToDateTime.Minute, HoraInicio.ToDateTime.Second, If(HoraInicio.ToDateTime.ToString("tt", CultureInfo.InvariantCulture) = "PM", MKB.TimePicker.TimeSelector.AmPmSpec.PM, MKB.TimePicker.TimeSelector.AmPmSpec.AM)) + TxtHorarioFin.SetTime(HoraFin.ToDateTime.Hour, HoraFin.ToDateTime.Minute, HoraFin.ToDateTime.Second, If(HoraFin.ToDateTime.ToString("tt", CultureInfo.InvariantCulture) = "PM", MKB.TimePicker.TimeSelector.AmPmSpec.PM, MKB.TimePicker.TimeSelector.AmPmSpec.AM)) + + + End If + + + End If + + UpModalHorariosNoOperativos.Update() + + End Sub + + + Protected Sub LnkGuardarHorarioNoOpeartivo_Click(sender As Object, e As EventArgs) + + If DdlTecnicoAsignarHorario.SelectedValue.ToEntero > 0 Then + Dim HoraInicio = $"{TxtHorarioInicio.Hour}:{TxtHorarioInicio.Minute}:{TxtHorarioInicio.Second} {TxtHorarioInicio.AmPm}".ToDateTime + Dim HoraFin = $"{TxtHorarioFin.Hour}:{TxtHorarioFin.Minute}:{TxtHorarioFin.Second} {TxtHorarioFin.AmPm}".ToDateTime + + + If HoraInicio > HoraFin Then + Alert("La hora final no debe ser mayor a la hora inicial", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If HoraFin = HoraInicio Then + Alert("la hora de inicio y la hora fin no pueden ser iguales", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + Dim objOS As New ClsOS + + If objOS.AddOrdenesServiciosTecnicoHorarioNoOperativo(DdlTecnicoAsignarHorario.SelectedValue.ToEntero, HoraInicio, HoraFin, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + Alert("Horario no operativo guardado correntamente.") + RegistraScript("$('#DVModalOSHorarioNoOperativo').modal('hide');") + End If + + objOS.Dispose() + + + + + End If + + + + End Sub + + + + + Protected Sub DdlTecnicoAsignar_SelectedIndexChanged1(sender As Object, e As EventArgs) + ValidaHorarioNoOperativo() + End Sub + + + Protected Sub LnkValidaHorarioNoOperativo_Click(sender As Object, e As EventArgs) + ValidaHorarioNoOperativo() + End Sub + + Private Sub ValidaHorarioNoOperativo() + If DdlTecnicoAsignar.SelectedValue.ToEntero > 0 Then + + + + + Dim objOS As New ClsOS + Dim DTHorarios As New DataTable + + + + + If objOS.GetOrdenesServiciosTecnicoHorarioNoOperativo(DdlTecnicoAsignar.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + DTHorarios = objOS.DtResultados + End If + + objOS.Dispose() + + If DTHorarios IsNot Nothing AndAlso DTHorarios.Rows.Count > 0 Then + + Dim HoraInicio As TimeSpan = DTHorarios.Rows(0)("HoraInicio").ToString.ToDate.TimeOfDay + Dim HoraFin As TimeSpan = DTHorarios.Rows(0)("HoraFin").ToString.ToDate.TimeOfDay + Dim HoraAsignacion As TimeSpan = TxtModalFechaOS.Text.ToDate.TimeOfDay + + If HoraAsignacion >= HoraInicio And HoraAsignacion <= HoraFin Then + Alert($"La hora especificada esta dentro del horario no operativo del Técnico {HoraInicio.ToString()} a {HoraFin.ToString()} .", TipoMensaje.MsgAdvertencia) + End If + + + + End If + + + 'ViewState("Validando") = Nothing + + End If + End Sub + + End Class diff --git a/RH/CatDocumentos.aspx b/RH/CatDocumentos.aspx index 39c160e78..8b286199b 100644 --- a/RH/CatDocumentos.aspx +++ b/RH/CatDocumentos.aspx @@ -50,7 +50,8 @@ + DataKeyNames="CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Estatus,CveDocumentacionTipo,DocumentacionTipo,Requerido,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento" + EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None" > @@ -111,7 +112,8 @@ - + diff --git a/RH/CatDocumentos.aspx.vb b/RH/CatDocumentos.aspx.vb index 61d32c97d..530066dbc 100644 --- a/RH/CatDocumentos.aspx.vb +++ b/RH/CatDocumentos.aspx.vb @@ -418,8 +418,11 @@ Partial Class RH_CatDocumentos If e.Row.RowType = DataControlRowType.DataRow Then Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero - Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString - Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad") + Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString + + 'Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad") + Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato") + Dim separado As Char() = {"."} Dim array() As String = DocumetacionFormato.Split(separado) Dim extencion As String = "" @@ -430,27 +433,50 @@ Partial Class RH_CatDocumentos If DocumetacionFormato.Trim.Length > 0 Then - Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & _CveDocumentacion & "_" & DocumetacionFormato - Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato - If File.Exists(linkDescargaArchivo) Then - ImgDownLoad.Visible = True - If extencion.Length > 0 Then - ImgDownLoad.Text = String.Format(" ", linkDescarga, DocumetacionFormato) - Else - ImgDownLoad.Text = String.Format(" ", linkDescarga, DocumetacionFormato) - End If - Else - ImgDownLoad.Visible = False - End If - - Else - ImgDownLoad.Visible = False - End If + Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato + Dim FileD = New FileInfo(PathDescargaArchivo) + If FileD.Exists Then + ImgDownLoadFormato.Visible = True + ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato) + End If + + + End If + + + End If End Sub + Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs) + + + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + 'Dim Adjunto As String = GvRow.DataKey("Adjunto") + + Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString.ToEntero + Dim DocumetacionFormato As String = GvRow.DataKey("DocumentacionFormato").ToString + + Dim PathDescargaArchivo = UsuarioActual.Empresa.Ruta & "\Formatos\" & _CveDocumentacion & "_" & DocumetacionFormato + + Dim FileD = New FileInfo(PathDescargaArchivo) + + If FileD.Exists Then + + Response.Clear() + Response.AddHeader("Content-Disposition", "attachment; filename=" + FileD.Name) + Response.AddHeader("Content-Length", FileD.Length.ToString()) + Response.ContentType = "text/octet-stream" + Response.Flush() + Response.TransmitFile(FileD.FullName) + Response.End() + + End If + + End Sub + #End Region @@ -670,5 +696,7 @@ Partial Class RH_CatDocumentos RegistraScript(String.Format("$('#{0}').modal('show');", "DVParametros")) End Sub + + End Class diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index e806ed1dc..ba8e4ec33 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1641,7 +1641,346 @@
    -
    + + +
    + +
    +
    +
    + + Parametros +
    + +
    + + +
    + +
    +
    + + + + + +
    +
    +
    + +
    +
    +
    +
    + + Estado de Cuenta +
    +
    + +
    +
    +
    + + +
    +
    + +
    + + + + + + + +
    +
    +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + +
    +
    +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + +
    + +
    + + + + + + + + + + + <%-- + + + + + --%> +
    +
    +
    +
    + +
    +
    +
    +
    + +    +
    +
    + + + + +
    +
    +
    + +
    +
    + + + <%--
    @@ -1668,7 +2007,7 @@ - <%-- --%> +
    @@ -1783,66 +2122,13 @@
    - <%-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --%> +
    - - <%----%> +
    @@ -1851,8 +2137,7 @@
    - - <%----%> +
    @@ -1867,8 +2152,7 @@
    - - <%----%> +
    @@ -1877,45 +2161,21 @@
    - <%--
    - - -
    - -
    - - -
    - -
    - -
    - - -
    - - -
    - -
    -
    --%> +
    - - <%----%> +
    - - <%----%> +
    - - <%----%> +
    @@ -1947,10 +2207,7 @@
    - <%-- - Cuentas por Cobrar - Anticipos / NC - --%> +
    @@ -2021,12 +2278,7 @@ - <%-- - - - - - --%> +
    @@ -2052,11 +2304,13 @@
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    + --%> + + + +
    +
    @@ -2085,6 +2339,15 @@
    + +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + +
    +
    - <%----%> + @@ -6800,7 +7063,19 @@
    -
    +
    +
    + + + + + + +
    + +
    +
    @@ -6819,18 +7094,7 @@
    -
    -
    - - - - - - -
    - -
    +
    diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 9bc11695d..ec502615f 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -513,12 +513,26 @@ Partial Class Clientes Set(value As Integer) ViewState("CveLineaAdicional") = value End Set - End Property - + End Property + Private Property FechaIngLineaAdicional As DateTime + Get + If ViewState("FechaIngLineaAdicional") Is Nothing Then + ViewState("FechaIngLineaAdicional") = MinFecha + End If + Return ViewState("FechaIngLineaAdicional").ToString().ToDateTime() + End Get + Set(value As DateTime) + ViewState("FechaIngLineaAdicional") = value + End Set + End Property + + + + #End Region - + #Region "Documentacion" Private Property DTDocumentacion As DataTable Get @@ -750,9 +764,11 @@ Partial Class Clientes If UsuarioActual.TienePermisoProceso(162) Then ChkPermiteCredito.Enabled = True TxtLimiteCreditoSucursal.Enabled = True + TxtFechaLimiteCredito.Enabled = True Else ChkPermiteCredito.Enabled = False TxtLimiteCreditoSucursal.Enabled = False + TxtFechaLimiteCredito.Enabled = False End If ChkEstado.Enabled = False If UsuarioActual.TienePermisoProceso(180) Then @@ -941,10 +957,10 @@ Partial Class Clientes LnkAgregarLineaAdicional.Visible = True GetLineasAdicionales() - End If - - - + End If + + + End If 'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017 @@ -1621,6 +1637,9 @@ Partial Class Clientes ChkRequiereOC.Checked = ObjClientes.RequiereOC ChkEsDistribuidor.Checked = Boolean.Parse(ObjClientes.DtResultados(0)("EsDistribuidor").ToString()) CobranzaTelefono = ObjClientes.CobranzaTelefono + + TxtFechaLimiteCredito.Text = If(ObjClientes.DtResultados.Rows(0)("FechaLimiteCredito").ToString.ToDate = New Date(1900, 1, 1), "", ObjClientes.DtResultados.Rows(0)("FechaLimiteCredito").ToString.ToDate.ToString("dd/MM/yyyy")) + If CobranzaTelefono.Length = 10 Then BtnCobranzaSMS.ToolTip = $"El mensaje SMS será enviado al número celular {CobranzaTelefono}
    con #referencia ""{If(UsuarioActual.CveEmpresa = 4, TxtNombreCorto.Text, CodigoCliente)}""" End If @@ -2085,15 +2104,15 @@ Partial Class Clientes UpAgregarSucursal.Update() UpDatos.Update() End Sub - Public Sub CargaAFAsignados() - 'Dim ObjAF As New ClsAF() - 'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "-1", CveCliente) Then - ' GvAFAsignado.DataSource = ObjAF.DtResultados - 'Else - ' GvAFAsignado.DataSource = Nothing - 'End If - 'ObjAF.Dispose() - 'GvAFAsignado.DataBind() + Public Sub CargaAFAsignados() + 'Dim ObjAF As New ClsAF() + 'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "-1", CveCliente) Then + ' GvAFAsignado.DataSource = ObjAF.DtResultados + 'Else + ' GvAFAsignado.DataSource = Nothing + 'End If + 'ObjAF.Dispose() + 'GvAFAsignado.DataBind() End Sub Private Sub CargaMetodosPago33() DdlMetodoPago33.Items.Clear() @@ -2670,6 +2689,10 @@ Partial Class Clientes Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False) + + Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1)) + + If CveCliente = -1 Then Dim ErrorAC As Boolean = False Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero() @@ -2733,7 +2756,7 @@ Partial Class Clientes CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), - CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim()) Then + CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito) Then ViewState("CveCliente") = ObjClientes.CveCliente @@ -2830,7 +2853,7 @@ Partial Class Clientes ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), - NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim()) Then + NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito) Then ObjClientes.LimpiaImpuestosLocales(CveCliente) @@ -4068,10 +4091,10 @@ Partial Class Clientes Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF") Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.rpt", UsuarioActual.Empresa.Ruta)) - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - - 'OBTENEMOS LOS DATOS + Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + 'OBTENEMOS LOS DATOS Dim DtCxCFact As DataTable = Nothing Dim FI = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text) @@ -4277,16 +4300,16 @@ Partial Class Clientes Else If Archivo.Exists Then Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta)) - If ArchivoSti.Exists Then - Dim listass As New List(Of ReportParameter) - For Each item As CrystalParametro In lista - listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) - Next - ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) - Else - ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) - End If - + If ArchivoSti.Exists Then + Dim listass As New List(Of ReportParameter) + For Each item As CrystalParametro In lista + listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) + Next + ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) + Else + ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) + End If + Else ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If @@ -4329,16 +4352,16 @@ Partial Class Clientes DtCxCFact2.Rows.Add(drr) If Archivo.Exists Then - Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta)) - If ArchivoSti.Exists Then - Dim listass As New List(Of ReportParameter) - For Each item As CrystalParametro In lista - listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) - Next - ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) - Else - ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) - End If + Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta)) + If ArchivoSti.Exists Then + Dim listass As New List(Of ReportParameter) + For Each item As CrystalParametro In lista + listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) + Next + ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) + Else + ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) + End If Else ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If @@ -4361,9 +4384,9 @@ Partial Class Clientes End Using End If - End Sub + End Sub #End Region - + #Region "E N V I O C O R R E O" Private Sub EnviaCorreo(Liga As String, LigaActivar As String) @@ -4431,11 +4454,11 @@ Partial Class Clientes a.GuardaLog() Dim Mail As New ClsSisMail() Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) - End Sub + End Sub #End Region - + #Region " COTIZACIONES " - + Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs) If BtnVerMasCot.Text = "Ver Más" Then CargaCotizaciones(-1) @@ -4505,11 +4528,11 @@ Partial Class Clientes HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}" End If End If - End Sub + End Sub #End Region - + #Region "D I R E C C I O N E N V I O " - + Private Sub CargaCombosDirecionesClientesSAT() CargaDirClientePais() CargaDirClienteEstado() @@ -4732,12 +4755,12 @@ Partial Class Clientes End If CargaDireccionesEnvio() - End Sub - + End Sub + #End Region - + #Region " IMPORTAR SALDOS " - + Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click CargaClientesImportarSaldos() RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos")) @@ -4841,9 +4864,9 @@ Partial Class Clientes e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo"))) e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"))) End If - End Sub + End Sub #End Region - + #Region "Cuentas/Equipos" Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs) HdnModalidad.Value = "I" @@ -5431,9 +5454,9 @@ Partial Class Clientes End If Return Retorno - End Function + End Function #End Region - + #Region "GPS" Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click If hdnArrayDispositivo.Value.Length > 0 Then @@ -5574,10 +5597,10 @@ Partial Class Clientes UpMoverDispositivo.Update() RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});") - End Sub - + End Sub + #End Region - + #Region "Sucursales" Public Sub CreaDTSucursales() @@ -5811,14 +5834,14 @@ Partial Class Clientes End If End If End If - End Sub - + End Sub + #End Region - + #Region "G P S" - - - + + + Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String) Try @@ -5889,16 +5912,16 @@ Partial Class Clientes End If ObjClientes.Dispose() - End Sub - - + End Sub + + #End Region - + #Region "C O N T R A T O S" - - - - + + + + Private Sub CargaDatosContrato() If CveCliente <= 0 Then Exit Sub @@ -5943,10 +5966,10 @@ Partial Class Clientes e.Row.CssClass = "Totales white" End If End If - End Sub - + End Sub + #End Region - + #Region "M E T O D O S " Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then @@ -6356,13 +6379,13 @@ Partial Class Clientes End If - End Sub - + End Sub + #End Region - + #Region "IMPRIMIR GVHistorial" - - + + Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) Dim retorno As Byte() = Nothing Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") @@ -6437,18 +6460,18 @@ Partial Class Clientes ObjClientes.Dispose() Return retorno - End Function - - + End Function + + #End Region - + #Region "C O B R A N Z A" Public Sub Visitas_Click(sender As Object, e As EventArgs) RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas")) - End Sub - + End Sub + #End Region - + #Region "Usuarios" Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero() @@ -6483,12 +6506,12 @@ Partial Class Clientes e.Row.Cells(5).Visible = False End If End If - End Sub + End Sub #End Region - - + + #Region "C U E N T A S - B A N C A R I A S" - + Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False) If CveCliente <= 0 Then Exit Sub @@ -6661,8 +6684,8 @@ Partial Class Clientes TxtNumeroCuenta2.Text = "" TxtConvenioCIE2.Text = "" TxtReferencia2.Text = "" - End Sub - + End Sub + #Region "GRIDVIEW - CUENTAS BANCARIAS" Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -6718,10 +6741,10 @@ Partial Class Clientes GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing End If - End Sub - + End Sub + #End Region - + Private Sub CargaPSGridCuentasBancos() If CveCliente > 0 Then GvBancosCuentas.DataSource = DTCuentasBancos @@ -6779,9 +6802,9 @@ Partial Class Clientes divestatus.Visible = True UpAddBancos.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias")) - End Sub + End Sub #End Region - + #Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel" Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click GenerarPDF("Excel") @@ -6803,11 +6826,11 @@ Partial Class Clientes ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato) - End Sub + End Sub #End Region - + #Region "VENTAS" - + Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte() Dim ObjVentas As New ClsVentas Dim Vta As Modelos.Factura = Nothing @@ -7038,10 +7061,10 @@ Partial Class Clientes ObjVentas.Dispose() Return PdfFactura(Vta) - End Function - + End Function + #End Region - + #Region "COMERCIO EXTERIOR" Public Sub CargaCombosComercioExterior() @@ -7165,12 +7188,12 @@ Partial Class Clientes End Sub Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) CargaColonia() - End Sub - + End Sub + #End Region - + #Region "D O C U M E N T A C I O N " - + Private Sub CargaDocumentacionCliente() Dim objRH As New ClsEdocumentacion() @@ -7808,12 +7831,12 @@ Partial Class Clientes RegistraScript("Download('" & baseUrl & "')") - End Sub - + End Sub + #End Region - + #Region "D O C U M E N T O S V E N T A S" - + Private Sub CargaDocumentosVenta(tCveCliente As Integer) Dim objInv As New ClsEdocumentacion @@ -7984,11 +8007,11 @@ Partial Class Clientes objRH.Dispose() - End Sub - - + End Sub + + #End Region - + #Region "PERSONA FISICA" Protected Sub LnkPersonaFisica_Click(sender As Object, e As EventArgs) RegistraScript("$('#DivModalPersonaFisica').modal();") @@ -8013,9 +8036,9 @@ Partial Class Clientes ObjCliente.Dispose() UpDatos.Update() - End Sub + End Sub #End Region - + #Region "USUARIOS PLATAFORMA CLIENTE - 6 " Protected Sub CargaUsuariosPortalCliente() Dim objUsuario As ClsSisUsuarios = New ClsSisUsuarios @@ -8024,19 +8047,19 @@ Partial Class Clientes GvUsuarios.DataBind() End If objUsuario.Dispose() - End Sub + End Sub #End Region - + #Region " DEVOLVER DINERO ANT/NC " Private Sub InicializaDevolverDinero() If UsuarioActual.TienePermisoProceso(247) Then GVAnticipos.Columns(6).Visible = True End If - End Sub + End Sub #End Region - + #Region "MODAL GRAFICA/PEDIDOS" - + Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs) If CargaDatatables() Then RegistraScript("$('#DivModalGrafica').modal('show')") @@ -8373,13 +8396,13 @@ Partial Class Clientes RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55") UPModalProd.Update() - End Sub - - + End Sub + + #End Region - + #Region "TAB - COMPORTAMIENTO DE VENTAS" - + Private Sub CargaGrupo() DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3")) DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4")) @@ -8563,12 +8586,12 @@ Partial Class Clientes ObjVentas.Dispose() GvComportamientoVenta.DataBind() UpDatosComportamientoVenta.Update() - End Sub - + End Sub + #End Region - + #Region "DISPOSITIVOS" - + Protected Sub LnkMoverDispositivo_Click(sender As Object, e As EventArgs) Dim CveDispositivo As Integer = HdnCveDispositivoMover.Value.ToEntero() Dim CveCliente As Integer = DdlClienteDispositivo.SelectedValue.ToEntero() @@ -8606,10 +8629,10 @@ Partial Class Clientes CargaEventoBitacora() NombreDispositivo = "" RegistraScript("$('#DivMoverDispositivo').modal('hide');") - End Sub - + End Sub + #End Region - + #Region "CRM" Protected Sub CargaDatosCRM() Dim ObjCRM = New ClsCRM() @@ -8709,9 +8732,9 @@ Partial Class Clientes Alert("Se Unificó correctamente al Cliente con la Empresa CRM.") End If End If - End Sub + End Sub #End Region - + #Region "PORCENTAJE PRECIO DE MARCAS" Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas")) @@ -8936,9 +8959,9 @@ Partial Class Clientes ObjPS.Dispose() - End Sub + End Sub #End Region - + #Region "PORCENTAJE PRECIO DE PRODUCTOS" Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios")) @@ -9174,12 +9197,12 @@ Partial Class Clientes Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs) DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2) - End Sub + End Sub #End Region - + #Region " A C U M U L A D O R E S" - - + + Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs) 'CveVentaNota = 0 @@ -9822,11 +9845,11 @@ Partial Class Clientes ' ObjFactura.Timbre = PreParaTimbre(ObjFactura) - End Sub - - + End Sub + + #End Region - + #Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel" Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones") @@ -9889,15 +9912,13 @@ Partial Class Clientes End Sub Private Sub LnkUsadosReset_Click(sender As Object, e As EventArgs) Handles LnkUsadosReset.Click - Dim Acum As New ClsAcumuladores Dim Puntos As Decimal = -GvUsadosResumen.Rows.Cast(Of GridViewRow).Where(Function(x) x.RowType = DataControlRowType.DataRow).FirstOrDefault(Function(gvr) gvr.RowIndex = 3).DataKey("Puntos").ToEntero() - If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado", Now) Then + If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, Puntos, 0, 0, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado", Now) Then Alert("Puntuación Inicializada") End If Acum.Dispose() - - End Sub + End Sub #End Region Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs) If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then @@ -10406,6 +10427,8 @@ Partial Class Clientes Protected Sub LnkAgregarLineaAdicional_Click(sender As Object, e As EventArgs) CveLineaAdicional = -1 + FechaIngLineaAdicional = Nothing + RegistraScript("$('#DVLineasAdicionales').modal('show')") LtlLineasAdicionalesTotuloModal.Text = "Agregar Linea Adicional" AgregarLineaAdicionalLimpiarControles() @@ -10437,11 +10460,13 @@ Partial Class Clientes ' Exit Sub 'End If - Dim ObjVentas As New ClsVentas + If CveLineaAdicional > 0 Then + + If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then + TxtFechaVencimientoLineaAdicionalModal.Text = FechaIngLineaAdicional.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy") + End If - - If CveLineaAdicional > 0 Then If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal, DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then @@ -10449,7 +10474,11 @@ Partial Class Clientes Else Alert("Linea Adicional Actualizada Correctamente") End If - Else + Else + If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then + TxtFechaVencimientoLineaAdicionalModal.Text = Now.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy") + End If + If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal, DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero, DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then @@ -10476,6 +10505,7 @@ Partial Class Clientes CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero + FechaIngLineaAdicional = GvRow.DataKey("FechaIng").ToDateTime() TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional") DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor") DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor") @@ -10520,6 +10550,7 @@ Partial Class Clientes Protected Sub DdlTipoLineaAdicionalModal_SelectedIndexChanged(sender As Object, e As EventArgs) DvLineaAdicionalDiasVenciemientoModal.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, True, False) + DvFechaVencimiento.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, False, True) UpLineaAdicionalmodal.Update() End Sub diff --git a/Ventas/PopUpBuscarClientes.aspx b/Ventas/PopUpBuscarClientes.aspx index 11b583660..727fb9ca2 100644 --- a/Ventas/PopUpBuscarClientes.aspx +++ b/Ventas/PopUpBuscarClientes.aspx @@ -73,6 +73,19 @@ + + + + Cuenta: + + + + + + + + + diff --git a/Ventas/PopUpBuscarClientes.aspx.vb b/Ventas/PopUpBuscarClientes.aspx.vb index fa8690108..58141167d 100644 --- a/Ventas/PopUpBuscarClientes.aspx.vb +++ b/Ventas/PopUpBuscarClientes.aspx.vb @@ -2,6 +2,8 @@ Option Strict On Imports Extensiones +Imports Microsoft.Owin.Security.Provider + Partial Class PopUpBuscarClientes Inherits ClsPaginas @@ -74,13 +76,17 @@ Partial Class PopUpBuscarClientes Dim ObjClientes As New ClsClientes() Dim CveUsuarioConsulta As Integer + + Dim Cuenta As String = If(TxtCuenta.Text = "", "-1", TxtCuenta.Text) + If UsuarioActual.TienePermisoProceso(322) Then CveUsuarioConsulta = UsuarioActual.CveVendedor Else CveUsuarioConsulta = -1 End If If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, - DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100, CveUsuarioConsulta:=CveUsuarioConsulta) Then + DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100, CveUsuarioConsulta:=CveUsuarioConsulta, Cuenta:=Cuenta) Then + If ObjClientes.DtResultados.Rows.Count > 0 Then LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0) GV.DataSource = ObjClientes.DtResultados @@ -150,6 +156,7 @@ Partial Class PopUpBuscarClientes If TxtMail.Text.Trim <> String.Empty Then Return True If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True + If TxtCuenta.Text.Trim.Length > 0 Then Return True Return False End Function diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 3d24b25b9..dd685d23e 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -438,21 +438,12 @@ Partial Class ProductosyServicios End Sub Private Sub CargaPanelCitricos() - Dim ObjGral As New ClsGenerales() - If ObjGral.GetEmpacados(UsuarioActual.CveEmpresa) Then - DdlEmpacado.DataSource = ObjGral.DtResultados - End If - If ObjGral.GetTipoOrganicos(UsuarioActual.CveEmpresa) Then - DdlTipoOrganico.DataSource = ObjGral.DtResultados - End If - ObjGral.Dispose() - + DdlEmpacado.DataSource = GlobalDTGralEmpacados(UsuarioActual.CveEmpresa) + DdlTipoOrganico.DataSource = GlobalDTGralTipoOrganicos(UsuarioActual.CveEmpresa) DdlEmpacado.DataBind() DdlTipoOrganico.DataBind() - End Sub - Private Sub MuestraPanel(Optional AfterPageLoad As Boolean = False) If AfterPageLoad Then RegistraScript("window.onload = function MuestraPanel() { document.getElementById(""C_BtnMostrarPanel"").click(); }") diff --git a/Ventas/RepLineasAdicionales.aspx b/Ventas/RepLineasAdicionales.aspx index 97e27ec8b..3953c6bda 100644 --- a/Ventas/RepLineasAdicionales.aspx +++ b/Ventas/RepLineasAdicionales.aspx @@ -136,8 +136,11 @@ + + + - +
    diff --git a/Ventas/RepPS.aspx b/Ventas/RepPS.aspx index 799e44502..450c95c44 100644 --- a/Ventas/RepPS.aspx +++ b/Ventas/RepPS.aspx @@ -132,6 +132,7 @@
    +
    diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 7d8ca3e9e..8a0583f6d 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -4702,6 +4702,15 @@ Partial Class Ventas If AplicaCancelarRemision AndAlso CveEstatus.Contiene(2, 3) AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then DivCanRem.Visible = True VentaSaldoAlmacen = DbRowVenta("SaldoAlmacen").ToString().ToDecimal + If DbRowVenta("TipoDocto").ToString().Contiene("Rem", "Dev") AndAlso VentaSaldoAlmacen <> 0 Then + ChkDevAlm.Checked = True + LiDevolucionAlmacen.Visible = True + If DbRowVenta("TipoDocto").ToString() = "Dev" Then + LblDevAlm.Text = "Salida de almacen" + End If + End If + + If CveEstatus = 5 Then LbCancelarDocumento.Enabled = False 'If CveEstatus = 20 Then ' LbCancelarDocumentoManual.Visible = True @@ -9471,6 +9480,7 @@ Partial Class Ventas Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL()) Dim ObjDocCliente As New ClsEdocumentacion(ObjVentas.IniciaTransacSQL()) Dim ObjGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL()) + Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL()) Dim ObjContPaq As ClsContPAQi = Nothing 'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL()) @@ -9541,7 +9551,7 @@ Partial Class Ventas Dim CveTimbreCartaPorte As Integer = -1 - GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS, + GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS, ObjEventos, ObjCGame, ObjClientes, EsNCAmortizacion:=EsNCAmortizacion, CveAnticipoPadre:=CveAnticipoPadre) If ErrorList.Count = 0 AndAlso ChkEmitirCartaPorte.Checked AndAlso ObjFactura.TipoDocto = "Ing" Then @@ -9668,7 +9678,7 @@ Partial Class Ventas If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse (ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) Then CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento) - If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, Nothing, + If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, Nothing, Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDesc, IndexNC:=(If(DtVentasNC IsNot Nothing, DtVentasNC.Rows.Count - 1, 0))) Then ListaNotasCreditoGeneradas.Add(ObjFacturaDevolucion) End If @@ -9681,7 +9691,7 @@ Partial Class Ventas End If CreaObjetosVentaBonificacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento) - If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaBonificacion, ObjBancos, Nothing, + If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjContPaq, ObjFacturaBonificacion, ObjBancos, Nothing, Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCBonificacion, IndexNC:=(DtVentasNC.Rows.Count - 1)) Then ListaNotasCreditoGeneradas.Add(ObjFacturaBonificacion) End If @@ -9839,12 +9849,6 @@ Partial Class Ventas End If If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then - - - - - - ObjVentas.Commit() 'ENVIAR POLIZA VIRTUAL @@ -9854,7 +9858,6 @@ Partial Class Ventas End If End If - 'ContPAQ El movimiento 1 es el de Venta Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" @@ -9891,7 +9894,6 @@ Partial Class Ventas OnError("Ocurrió un error al contabilizar la factura", ex) End Try - Try 'RMF, cuando es pedido, se manda autorización. If ObjFactura.TipoDocto.Contiene("PA") Then @@ -10133,12 +10135,8 @@ Partial Class Ventas If ArchivoCotRdlc.Exists Or ArchivoCotMrt.Exists Then MensajeAlert.AppendFormat("
    ", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))) - - If ChkEnviarFacturaCRM.Checked AndAlso CorreoContactoCRM.Trim.Length > 0 Then - Try - Dim pdfCRM As Byte() = Nothing 'If CveVenta > 0 Then ' ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False) @@ -10151,16 +10149,10 @@ Partial Class Ventas GeneraPDFCotizacion(True, CorreoContactoCRM:=CorreoContactoCRM, pdfCRM:=pdfCRM, SerieFolioCRM:=SerieFolioCRM, TipoDoctoCRM:=TipoDoctoCRM) End If - Catch ex As Exception OnError("Ocurrió un error al enviar el PDF", ex) End Try - End If - - - - Else MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ") End If @@ -10178,9 +10170,6 @@ Partial Class Ventas End If End If - - - 'ERROR DE NO TIMBRADO If Not SeTimbro And (DdlTipoComprobante.SelectedValue = "Ing" Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Or DdlTipoComprobante.SelectedValue = "Ant") Then MensajeAlert.AppendFormat("La factura no se pudo timbrar. Por favor intentelo de nuevo a traves del boton Emitir.") @@ -10202,12 +10191,10 @@ Partial Class Ventas End Select - If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}'", "Imprimir") End If - 'DESCARGAR PDF DE CICOVISA 'If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 Then ' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then @@ -10235,8 +10222,6 @@ Partial Class Ventas End If GeneraPDFCotizacion(ChkEnviarFactura.Checked) ' MANDA CORREO - Else - 'Enviar pore correo cot CRM End If ElseIf DdlTipoComprobante.SelectedValue = "Rem" Then If UsuarioActual.CveEmpresa.Contiene(81, 109) Then @@ -10311,7 +10296,6 @@ Partial Class Ventas Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False) End If - MensajeAlert.Clear() Try @@ -10324,7 +10308,6 @@ Partial Class Ventas OnError("Ocurrió un error al limpiar los datos", ex) End Try - Else ObjVentas.RollBack() If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack() @@ -10343,6 +10326,7 @@ Partial Class Ventas ObjCGame.Dispose() ObjContr.Dispose() ObjDocCliente.Dispose() + ObjAcum.Dispose() 'ObjFolios.Dispose() ErrorList.Clear() ErrorList = Nothing @@ -10986,24 +10970,27 @@ Partial Class Ventas End Sub - Private Function RegistrarNCAmortizacion(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi, + Private Function RegistrarNCAmortizacion(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjAcum As ClsAcumuladores, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ObjBancos As ClsBancos, TmpDTconceptos As DataTable, ByRef ObjEventos As ClsOIEventos, Optional NCDescuento As Boolean = False, Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional IndexNC As Integer = 0) As Boolean Dim ProcesoCorrecto As Boolean = True 'GENERAMOS EL NUEVO FOLIO - Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL()) + 'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL()) - If ObjFolios.GetFolios(factura.TipoDocto, UsuarioActual.CveEmpresa) Then - Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue.ToEntero())) - If DT.Rows.Count > 0 Then - factura.Serie = DT.Rows(0)("Serie").ToString() - factura.Folio = DT.Rows(0)("FActual").ToString().ToEntero() - Else - ProcesoCorrecto = False - End If - DT.Dispose() - End If + 'If ObjFolios.GetFolios(factura.TipoDocto, UsuarioActual.CveEmpresa) Then + ' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue.ToEntero())) + ' If DT.Rows.Count > 0 Then + ' factura.Serie = DT.Rows(0)("Serie").ToString() + ' factura.Folio = DT.Rows(0)("FActual").ToString().ToEntero() + ' Else + ' ProcesoCorrecto = False + ' End If + ' DT.Dispose() + 'End If + + factura.Serie = "-1" + factura.Folio = -1 If NCDescuento Then @@ -11019,7 +11006,7 @@ Partial Class Ventas factura.CveVentaPadre = Me.CveVenta 'Registramos la venta - GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, factura, factura.DtDetalle, -1, ObjContPaq, ObjBancos, EsNCAmortizacion:=False, NCDescuento:=True, ListaNCDescuento:=ListaNCDescuento) + GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, factura, factura.DtDetalle, -1, ObjContPaq, ObjBancos, EsNCAmortizacion:=False, NCDescuento:=True, ListaNCDescuento:=ListaNCDescuento) Else 'GENERO LOS DATOS DE LA NC @@ -11158,7 +11145,7 @@ Partial Class Ventas ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion) 'Registramos la venta - GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, factura, tmpcon, -1, ObjContPaq, ObjBancos, EsNCAmortizacion:=True) + GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, factura, tmpcon, -1, ObjContPaq, ObjBancos, EsNCAmortizacion:=True) Else ErrorList.Add("No se encontró un producto para generar la nota de crédito") @@ -12916,7 +12903,7 @@ Partial Class Ventas #Region " GUARDAR - VENTA, PREPOLIZAS, INV, ESTIMACIONES, AC, NOTA DE CRÉDITO " - Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, + Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjAcum As ClsAcumuladores, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False, Optional ListaNCDescuento As List(Of Modelos.Factura) = Nothing, Optional CveAnticipoPadre As Integer = -1) @@ -13128,11 +13115,11 @@ Partial Class Ventas 'SI ES REFACTURACION, NO DEBE AFECTAR LOS USADOS If Not NuevaFactura.Contiene(1) Then If ObjFactura.TipoDocto = "Ing" Then - If Not GuardarUsados(2, ObjVentas.IniciaTransacSQL, factura) Then + If Not GuardarUsados(2, ObjVentas.IniciaTransacSQL, factura, ObjAcum) Then ErrorList.Add("Error al guardar usados") End If ElseIf ObjFactura.TipoDocto = "Dev" Then - If Not GuardarUsados(1, ObjVentas.IniciaTransacSQL, factura) Then + If Not GuardarUsados(1, ObjVentas.IniciaTransacSQL, factura, ObjAcum) Then ErrorList.Add("Error al guardar usados") End If End If @@ -13238,7 +13225,6 @@ Partial Class Ventas Dim ListaRNC As List(Of Modelos.Factura) = Nothing If NCDescuento Then - EsCargo = (Not ListaNCDescuento.Any(Function(RNC) RNC.Num2 = 1)) ListaRNC = ListaNCDescuento Else EsCargo = RblRNCTipo.SelectedValue = "1" @@ -13246,26 +13232,93 @@ Partial Class Ventas End If 'SI SE FACTURAN RNC DE CARGO, SE AGREGA EL CONCEPTO DE ACREDITAMIENTO - If ListaRNC IsNot Nothing AndAlso ClienteEsDistribuidor AndAlso EsCargo AndAlso Not factura.EsGarantia Then - Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL()) - + If ListaRNC IsNot Nothing AndAlso ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then Dim CvePSCargo As Integer = -1 - For Each RNC In ListaRNC - CvePSCargo = RNC.DtDetalle.FiltroPrimeroValor("CvePS", $"CveVentaDetalle={Row("CveVentaDetalleRNC").ToString()}").ToEntero() - If CvePSCargo > 0 Then - Exit For + Dim CveVentaRNC As Integer = -1 + + For Each RNC As Modelos.Factura In ListaRNC + + If NCDescuento Then + EsCargo = (Not RNC.Num1 = 2) End If + + CvePSCargo = RNC.DtDetalle.FiltroPrimeroValor("CvePS", $"CveVentaDetalle={Row("CveVentaDetalleRNC").ToString()}").ToEntero() + CveVentaRNC = RNC.DtDetalle.FiltroPrimeroValor("CveVenta", $"CveVentaDetalle={Row("CveVentaDetalleRNC").ToString()}").ToEntero() + + If EsCargo Then + If Not ObjAcum.DistribuidorMovtosGet(Me.CveCliente, UsuarioActual.CveEmpresa, CveVentaRNCCargo:=CveVentaRNC) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then + ErrorList.Add("Ocurrió un error al obtener los movimientos del distribuidor.") + Exit For + End If + + Dim RowMovto As DataRow = ObjAcum.DtResultados.FiltroPrimero($"CvePSCargo={CvePSCargo}") + + If RowMovto IsNot Nothing Then + 'OBTIENE LOS IMPORTES ORIGINALES EN BASE A LO QUE HABIA EN EL MOVIMIENTO + Dim ImporteCargoOriginal = (RowMovto("ImporteCargo").ToString().ToDecimal() / RowMovto("Cantidad").ToString().ToDecimal()).RoundSQL(2) + 'Dim ImporteBonificacionOriginal = (RowMovto("ImporteBonificacion").ToString().ToDecimal() / RowMovto("Cantidad").ToString().ToDecimal()).RoundSQL(2) + Dim PuntosOriginales = (RowMovto("Puntos").ToString().ToDecimal() / RowMovto("Cantidad").ToString().ToDecimal()).RoundSQL(2) + + Dim CveTamanio As Integer = RowMovto("CveTamaño").ToString().ToEntero() + Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal() + + Dim Puntos As Decimal = Cantidad * PuntosOriginales + Dim Cargo As Decimal = Cantidad * ImporteCargoOriginal + Dim Bonificacion As Decimal = 0 + + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then + ErrorList.Add("Ocurrió un error al agregar el movimiento de distribuidor.") + Exit For + End If + End If + + Else + + Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo={CvePSCargo}") + + If DrTamanio IsNot Nothing Then + 'OBTIENE LOS IMPORTES ORIGINALES EN BASE A LO QUE HABIA EN EL MOVIMIENTO + Dim ImporteBonificacion = Row("Total").ToString().ToDecimal().RoundSQL(2) + Dim CveTamanio As Integer = DrTamanio("CveTamaño").ToString().ToEntero() + Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal() + + Dim Puntos As Decimal = 0 + Dim Cargo As Decimal = 0 + + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, ImporteBonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then + ErrorList.Add("Ocurrió un error al agregar el movimiento de distribuidor.") + Exit For + End If + + End If + + End If + + + Next - Dim CveTamanio As Integer = GlobalDTAcumTamaños().FiltroPrimeroValor("CveTamaño", $"CvePSCargo={CvePSCargo}").ToEntero() + 'Dim RowTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CvePSCargo={CvePSCargo}") - If CveTamanio > 0 Then - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Row("Cantidad").ToString().ToDecimal(), CveTamanio, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then - ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.") - Exit For - End If - End If + 'If RowTamanio IsNot Nothing Then + ' Dim CveTamanio As Integer = RowTamanio("CveTamaño").ToString().ToEntero() + ' Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal() + ' Dim Puntos As Decimal = Cantidad * RowTamanio("Puntos").ToString().ToDecimal() + ' Dim Cargo As Decimal = Cantidad * RowTamanio("Cargo").ToString().ToDecimal() + ' Dim Bonificacion As Decimal = Cantidad * RowTamanio("Bonificacion").ToString().ToDecimal() + ' If EsCargo Then + ' Bonificacion = 0 + ' Else + ' Puntos = 0 + ' Cargo = 0 + ' End If + + ' If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then + ' ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.") + ' Exit For + ' End If + 'End If End If End If @@ -24786,9 +24839,9 @@ Partial Class Ventas ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion - If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Rem" Then - ChkDevAlm.Checked = True - End If + 'If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Rem", "Dev") Then + ' ChkDevAlm.Checked = True + 'End If If UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Rem" Then ChkDevAlm.Checked = True @@ -29314,13 +29367,15 @@ Partial Class Ventas End If UltimoRenglonRNC += 1 + Dim CveVentaDetalleRNC As Integer = RNCBonificacion.DtDetalle.FiltroPrimeroValor("CveVentaDetalle").ToEntero() + 'SOLO AGREGA SI LA CANTIDAD ES MAYOR CERO If Cantidad.RoundSQL(6) > 0D AndAlso ImportePU.RoundSQL(6) > 0 Then AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA, RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1, - DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString()) + DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=CveVentaDetalleRNC, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString()) End If Next @@ -32935,29 +32990,36 @@ Partial Class Ventas End If End Sub - Private Function GuardarUsados(CveConcepto As Integer, SqlTransaccion As SqlClient.SqlTransaction, factura As Modelos.Factura) As Boolean + Private Function GuardarUsados(CveConcepto As Integer, SqlTransaccion As SqlClient.SqlTransaction, factura As Modelos.Factura, ObjAcum As ClsAcumuladores) As Boolean Dim Resultado As Boolean = True - If ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then - Dim ObjAcum As New ClsAcumuladores(SqlTransaccion) + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + If ClienteEsDistribuidor AndAlso Not factura.EsGarantia Then + For Each drow As DataRow In factura.DtDetalle.Rows + If drow("CveTamaño").ToString.ToEntero > 0 Then + Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") + If DrTamanio IsNot Nothing Then + Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() + Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() + Dim Puntos As Decimal = DrTamanio("Puntos").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() - Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero - - For Each drow As DataRow In factura.DtDetalle.Rows - If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario, + If drow("CveTamaño").ToString.ToEntero > 0 Then + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, Puntos, Cargo, Bonificacion, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then - Resultado = False - Exit For + Resultado = False + Exit For + End If + End If + Else + Resultado = False + Exit For + End If End If - End If - Next - Else - Resultado = True + Next + End If End If Return Resultado - End Function @@ -36023,6 +36085,9 @@ Partial Class Ventas Protected Sub DdlLineaAdicional_SelectedIndexChanged(sender As Object, e As EventArgs) + TxtFechaPago.Enabled = True + imgCalendario.Visible = True + If DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then RBLPago.SelectedValue = "1" RBLPago.Enabled = False @@ -36037,6 +36102,8 @@ Partial Class Ventas 'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL If RowLinea("TipoLinea").ToString() = "2" Then TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy") + TxtFechaPago.Enabled = False + imgCalendario.Visible = False End If Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero()