-- cambio en globaldtmesestiouso

This commit is contained in:
2023-07-03 12:49:50 -07:00
parent a0b41cc0d8
commit 42e0fdf79e
3 changed files with 45 additions and 22 deletions

View File

@@ -7378,7 +7378,7 @@ Partial Class PV
End If
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.DataBind()
@@ -7434,12 +7434,13 @@ Partial Class PV
CveMarca = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
Dim ImportePagarCliente As Decimal = 0
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
If ObjAcum.DtResultados.Rows.Count > 0 Then
Dim dtt As DataTable = GlobalDTAcumGarantiasTipoUsoMeses(UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero)
If dtt IsNot Nothing Then
If dtt.Rows.Count > 0 Then
''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 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
TxtPorcentajeAjuste.Text = (drg("Valor").ToString.ToDouble / 100).ToString
@@ -7498,7 +7499,7 @@ Partial Class PV
Else
Alert("No se tiene especificado tabla de garantía")
End If
ObjAcum.Dispose()
Else
If DdlPSAjuste.SelectedValue.ToEntero <= 0 Then
Alert("Especificar el producto a recibir")