From 078183ec772630a4670fe39f4c6b7878798d2980 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 24 Dec 2024 10:23:05 -0700 Subject: [PATCH 1/8] --Validaciones Garantias --- Inventarios/RecepcionUsados.aspx.vb | 41 ++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 33304926c..b84f1214f 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -3195,16 +3195,47 @@ Partial Class Inventarios_RecepcionUsados Try If DdlAlmacen.SelectedValue.ToEntero() <= 0 Then + TxtPorcentajeAjuste.Text = "" + TxtImporteAjuste.Text = "0.00" + Alert("Debe seleccionar un almacen de tipo garantía", TipoMensaje.MsgAdvertencia) Exit Sub End If - If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" Then - Dim CveMarca As Integer = -1 + If String.IsNullOrEmpty(TxtEtiqueta.Text.Trim) Then + TxtPorcentajeAjuste.Text = "" + TxtImporteAjuste.Text = "0.00" - CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero + Alert("Es necesario llenar el campo 'Etiqueta'", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If TxtEtiqueta.Text.Trim.Length <> 4 Then + TxtPorcentajeAjuste.Text = "" + TxtImporteAjuste.Text = "0.00" + + Alert("La etiqueta no es valida", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" Then + Dim CveMarca As Integer = -1, Marca As String = "" + + Dim rowPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("") + + CveMarca = rowPS("CveMarca").ToString().ToEntero + Marca = rowPS("Marca").ToString() Dim DtAcumMeses As DataTable = GlobalDTAcumGarantiasTipoUsoMeses(UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) + + If DtAcumMeses IsNot Nothing AndAlso DtAcumMeses.Rows.Count = 0 Then + TxtPorcentajeAjuste.Text = "" + TxtImporteAjuste.Text = "0.00" + + Alert($"No se encontraron datos de garantias con los siguientes datos:
Tipo de Uso :{DdlTipoUso.SelectedItem.Text}
Meses :{TxtMesesUso.Text}
Marca :{Marca}", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + Dim Dtt As DataTable = Nothing If DtAcumMeses IsNot Nothing Then ''obtener siempre y cuando la fecha de inicio sea mayor @@ -3256,6 +3287,8 @@ Partial Class Inventarios_RecepcionUsados 'cuando no está registrada, no da ajuste TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo" TxtImporteAjuste.Text = "0.00" + + Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia) End If End If @@ -3330,7 +3363,7 @@ Partial Class Inventarios_RecepcionUsados CalculaMesesUso() End Sub Protected Sub BtnCalcularImporteAjuste_Click(sender As Object, e As EventArgs) - CalculaPorcentajeAjuste() + CalculaMesesUso() End Sub Private Sub CalculaMesesUso() From 594a9977f7743e851fc0e26b8c9d72939cc1eb37 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 24 Dec 2024 10:23:19 -0700 Subject: [PATCH 2/8] =?UTF-8?q?Manejo=20de=20p=C3=BAblico=20general.=20alt?= =?UTF-8?q?a=20r=C3=A1pida=20de=20cliente,=20en=20Ventas.aspx,=20tomando?= =?UTF-8?q?=20en=20cuenta=20los=20datos=20de=20la=20sucursal=20cuando=20es?= =?UTF-8?q?=20rfc=20gen=C3=A9rico.=20y=20b=C3=BAscar=20RFC/Nombre,=20y=20s?= =?UTF-8?q?i=20hay=20una=20sola=20coincidencia,=20cerrar=20modal,=20=20si?= =?UTF-8?q?=20hay=20varias=20seleccionar=20el=20cliente,=20sino=20hay=20ni?= =?UTF-8?q?nguna=20poner=20la=20opci=C3=B3n=20de=20crear=20nuevo,=20(sugir?= =?UTF-8?q?iendo=20datos=20de=20la=20sucursal)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx | 74 +++++++++++++++++++++++++++++++++---------- Ventas/Ventas.aspx.vb | 73 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 128 insertions(+), 19 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 56cb30369..317269edc 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -405,9 +405,9 @@ - + - + @@ -944,7 +944,7 @@ - + Se timbró:  @@ -1094,8 +1094,8 @@ P.U.  - - Costo
+ Costo +
Utilidad Desc @@ -1413,7 +1413,7 @@ <%--10--%> - +
@@ -1971,23 +1971,23 @@
- + - + - - - - - - - + + + + + + + @@ -8207,7 +8207,7 @@ +
@@ -666,11 +656,11 @@ - +
- +