From 783c39633e2b825669ea442fa21aa9dcbcba0b35 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 15 Mar 2023 15:07:22 -0700 Subject: [PATCH] -- mejora en etiquetas para meses en ajuste --- Ventas/PV.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 15461fbff..b23d73cab 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -7422,7 +7422,7 @@ Partial Class PV Alert("No se ha especificado producto de ajuste a entregar") Exit Sub End If - If TxtEtiqueta.Text <> "" OrElse TxtEtiqueta.Text.Length <> 4 Then + If TxtEtiqueta.Text = "" OrElse TxtEtiqueta.Text.Length <> 4 Then Alert("No se ha especificado la etiqueta.") Exit Sub End If @@ -7441,8 +7441,8 @@ Partial Class PV If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then If ObjAcum.DtResultados.Rows.Count > 0 Then ''obtener siempre y cuando la fecha de inicio sea mayor - Dim strDate As Date = ($"01/{TxtEtiqueta.Text.Substring(0, 2)}/{TxtEtiqueta.Text.Substring(2, 2)}").ToDate - Dim drg As DataRow = ObjAcum.DtResultados.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# > FechaInicioVigencia ", "FechaInicioVigencia") + 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") If drg IsNot Nothing Then TxtPorcentajeAjuste.Text = (drg("Valor").ToString.ToDouble / 100).ToString