-- cambio en globaldtmesestiouso
This commit is contained in:
@@ -4101,29 +4101,51 @@ Public Class ClsPaginas
|
|||||||
HttpContext.Current.Application(AppNombre) = value
|
HttpContext.Current.Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTAcumGarantiasMesesTipoUso(CveEmpresa As Integer, CveMarca As Integer, CveTipoUso As Integer, Mes As Integer) As DataTable
|
|
||||||
|
Property GlobalDTAcumGarantiasTipoUso(CveEmpresa As Integer, CveMarca As Integer, CveTipoUso As Integer) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = $"GlobalDTAcumGarantiasMesesTipoUso-{CveEmpresa}"
|
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUso-{CveEmpresa}"
|
||||||
If Application(AppNombre) Is Nothing Then
|
If Application(AppNombre) Is Nothing Then
|
||||||
Dim ObjAcumuladores As New ClsAcumuladores()
|
Dim ObjAcumuladores As New ClsAcumuladores()
|
||||||
If ObjAcumuladores.GarantiasMesesGet(-1, CveEmpresa) Then Application(AppNombre) = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"})
|
If ObjAcumuladores.GarantiasMesesGet(-1, CveEmpresa) Then Application(AppNombre) = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"})
|
||||||
ObjAcumuladores.Dispose()
|
ObjAcumuladores.Dispose()
|
||||||
End If
|
End If
|
||||||
If CveMarca <> -1 Then
|
|
||||||
Dim Str As StringBuilder = New StringBuilder()
|
|
||||||
If CveMarca <> -1 Then Str.AppendFormat("CveMarca = {0}", CveMarca)
|
|
||||||
If CveTipoUso <> -1 Then Str.AppendFormat("CveTipoUso = {0}", CveTipoUso)
|
|
||||||
If Mes <> -1 Then Str.AppendFormat("Mes = {0}", CveTipoUso)
|
|
||||||
|
|
||||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
Dim filtros As New List(Of String)
|
||||||
GlobalDTAcumGarantiasMesesTipoUso = Dv.ToTable
|
If CveMarca <> -1 Then filtros.Add($"CveMarca = {CveMarca}")
|
||||||
Dv.Dispose()
|
If CveTipoUso <> -1 Then filtros.Add($"CveTipoUso = {CveTipoUso}")
|
||||||
Else
|
|
||||||
GlobalDTAcumGarantiasMesesTipoUso = DirectCast(Application(AppNombre), DataTable)
|
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||||
End If
|
GlobalDTAcumGarantiasTipoUso = Dv.ToTable
|
||||||
|
Dv.Dispose()
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Dim AppNombre As String = $"GlobalDTAcumGarantiasMesesTipoUso-{CveEmpresa}"
|
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUso-{CveEmpresa}"
|
||||||
|
Application(AppNombre) = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Property GlobalDTAcumGarantiasTipoUsoMeses(CveEmpresa As Integer, CveMarca As Integer, CveTipoUso As Integer, Mes As Integer) As DataTable
|
||||||
|
Get
|
||||||
|
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUsoMeses-{CveEmpresa}"
|
||||||
|
If Application(AppNombre) Is Nothing Then
|
||||||
|
Dim ObjAcumuladores As New ClsAcumuladores()
|
||||||
|
If ObjAcumuladores.GarantiasMesesGet(-1, CveEmpresa) Then Application(AppNombre) = ObjAcumuladores.DtResultados
|
||||||
|
ObjAcumuladores.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim filtros As New List(Of String)
|
||||||
|
If CveMarca <> -1 Then filtros.Add($"CveMarca = {CveMarca}")
|
||||||
|
If CveTipoUso <> -1 Then filtros.Add($"CveTipoUso = {CveTipoUso}")
|
||||||
|
If Mes <> -1 Then filtros.Add($"Mes = {Mes}")
|
||||||
|
|
||||||
|
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||||
|
GlobalDTAcumGarantiasTipoUsoMeses = Dv.ToTable
|
||||||
|
Dv.Dispose()
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUsoMeses-{CveEmpresa}"
|
||||||
Application(AppNombre) = value
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|||||||
@@ -3089,7 +3089,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
DdlTipoUso.Items.Clear()
|
DdlTipoUso.Items.Clear()
|
||||||
DdlTipoUso.DataSource = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca, -1, -1)
|
DdlTipoUso.DataSource = GlobalDTAcumGarantiasTipoUso(UsuarioActual.CveEmpresa, CveMarca, -1)
|
||||||
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlTipoUso.DataBind()
|
DdlTipoUso.DataBind()
|
||||||
|
|
||||||
@@ -3246,7 +3246,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
|
CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
|
||||||
|
|
||||||
Dim dtt As DataTable = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero)
|
Dim dtt As DataTable = GlobalDTAcumGarantiasTipoUsoMeses(UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero)
|
||||||
|
|
||||||
If dtt IsNot Nothing Then
|
If dtt IsNot Nothing Then
|
||||||
If dtt.Rows.Count > 0 Then
|
If dtt.Rows.Count > 0 Then
|
||||||
|
|||||||
@@ -7378,7 +7378,7 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
DdlTipoUso.Items.Clear()
|
DdlTipoUso.Items.Clear()
|
||||||
DdlTipoUso.DataSource = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca)
|
DdlTipoUso.DataSource = GlobalDTAcumGarantiasTipoUso(UsuarioActual.CveEmpresa, CveMarca, -1)
|
||||||
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlTipoUso.DataBind()
|
DdlTipoUso.DataBind()
|
||||||
|
|
||||||
@@ -7434,12 +7434,13 @@ Partial Class PV
|
|||||||
|
|
||||||
CveMarca = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
|
CveMarca = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
|
||||||
Dim ImportePagarCliente As Decimal = 0
|
Dim ImportePagarCliente As Decimal = 0
|
||||||
Dim ObjAcum As New ClsAcumuladores
|
Dim dtt As DataTable = GlobalDTAcumGarantiasTipoUsoMeses(UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero)
|
||||||
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
|
||||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
If dtt IsNot Nothing Then
|
||||||
|
If dtt.Rows.Count > 0 Then
|
||||||
''obtener siempre y cuando la fecha de inicio sea mayor
|
''obtener siempre y cuando la fecha de inicio sea mayor
|
||||||
Dim strDate As Date = ($"20{TxtEtiqueta.Text.Substring(2, 2)}/{TxtEtiqueta.Text.Substring(0, 2)}/01").ToDate
|
Dim strDate As Date = ($"20{TxtEtiqueta.Text.Substring(2, 2)}/{TxtEtiqueta.Text.Substring(0, 2)}/01").ToDate
|
||||||
Dim drg As DataRow = ObjAcum.DtResultados.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
|
Dim drg As DataRow = dtt.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
|
||||||
If drg IsNot Nothing Then
|
If drg IsNot Nothing Then
|
||||||
|
|
||||||
TxtPorcentajeAjuste.Text = (drg("Valor").ToString.ToDouble / 100).ToString
|
TxtPorcentajeAjuste.Text = (drg("Valor").ToString.ToDouble / 100).ToString
|
||||||
@@ -7498,7 +7499,7 @@ Partial Class PV
|
|||||||
Else
|
Else
|
||||||
Alert("No se tiene especificado tabla de garantía")
|
Alert("No se tiene especificado tabla de garantía")
|
||||||
End If
|
End If
|
||||||
ObjAcum.Dispose()
|
|
||||||
Else
|
Else
|
||||||
If DdlPSAjuste.SelectedValue.ToEntero <= 0 Then
|
If DdlPSAjuste.SelectedValue.ToEntero <= 0 Then
|
||||||
Alert("Especificar el producto a recibir")
|
Alert("Especificar el producto a recibir")
|
||||||
|
|||||||
Reference in New Issue
Block a user