From e816e416286c242dc9d9d2c8f9b8c6a60bdfcd40 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 24 Oct 2024 21:41:12 -0700 Subject: [PATCH] Nuevo GlobalDT parametro de addventa, estatusturno --- App_Code/ClsPaginas.vb | 22 ++++++++++++++++++++++ App_Code/ClsVentas.vb | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index f8ce9cbce..8dfb1d23d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -2844,6 +2844,28 @@ Public Class ClsPaginas End Set End Property + Public Shared Property GlobalDTVtaCobranzaTurnos(CveEmpresa As Integer, Optional CveCobranzaTurno As Integer = -1) As DataTable + Get + Dim AppNombre As String = $"GlobalDTVtaCobranzaTurnos-{CveEmpresa}" + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjVentas As New ClsVentas + If ObjVentas.GetCobranzaTurnoEstatus(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados + ObjVentas.Dispose() + End If + If CveCobranzaTurno <> -1 Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveCobranzaTurno = {CveCobranzaTurno}", "", DataViewRowState.CurrentRows) + GlobalDTVtaCobranzaTurnos = Dv.ToTable + Dv.Dispose() + Else + GlobalDTVtaCobranzaTurnos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End If + End Get + Set(value As DataTable) + Dim AppNombre As String = $"GlobalDTVtaCobranzaTurnos-{CveEmpresa}" + HttpContext.Current.Application(AppNombre) = value + End Set + End Property + Public Shared Property GlobalDTVtaComplementoCFDI() As DataTable Get Dim AppNombre As String = "GlobalDTVtaComplementoCFDI" diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 262aed25e..f532a44af 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -455,7 +455,7 @@ Public Class ClsVentas Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False, Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1", Optional EsFacturaGlobal As Boolean = False, Optional CveSATPeriodicidad As Integer = -1, Optional CveSATMes As Integer = -1, Optional SATAnio As Integer = -1, Optional CveMotivoDevolucion As Integer = -1, - Optional Addenda As String = "") As Boolean + Optional CveCobranzaEstatusTurno As Integer = -1, Optional Addenda As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasAdd") @@ -570,6 +570,7 @@ Public Class ClsVentas .Add("@SATAnio", SqlDbType.Int).Value = SATAnio .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion + .Add("@CveCobranzaEstatusTurno", SqlDbType.Int).Value = CveCobranzaEstatusTurno .Add("@Addenda", SqlDbType.VarChar).Value = Addenda End With 'SqlTypes.SqlDateTime.Null