From 5e788afd3e7f7ddec39f139df06c62f8ee4519b1 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 1 Jul 2024 19:20:41 -0700 Subject: [PATCH] Ventas.aspx: --En acciones para el rol de mostrador, Quitar de acciones --Billetito no debe de salir Promociones.aspx: --Si tiene clasificacion, excluya el ps, Si tiene ps. que excluya la clasificacion. --- Ventas/Promociones.aspx.vb | 11 +++++++++-- Ventas/Ventas.aspx | 9 ++++++--- Ventas/Ventas.aspx.vb | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/Ventas/Promociones.aspx.vb b/Ventas/Promociones.aspx.vb index 6aea352cf..73170657e 100644 --- a/Ventas/Promociones.aspx.vb +++ b/Ventas/Promociones.aspx.vb @@ -377,9 +377,16 @@ Partial Class Ventas_Promociones Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs) - If UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then + If DdlClasificacion.SelectedValue.ToEntero <= 0 Then + If DdlPS.SelectedValue.ToEntero <= 0 Then + Alert("Debe seleccionar una clasificacion o un producto y/o servicio", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + + If DdlPS.SelectedValue.ToEntero <= 0 Then If DdlClasificacion.SelectedValue.ToEntero <= 0 Then - Alert("Debe seleccionar una clasificacion", TipoMensaje.MsgAdvertencia) + Alert("Debe seleccionar una clasificacion o un producto y/o servicio", TipoMensaje.MsgAdvertencia) Exit Sub End If End If diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index b48a74e8c..981d27d71 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -10561,12 +10561,16 @@ function FnCambiaAnt(chk, txt, saldo) { - debugger; - var Total = ToDouble($get('TxtSubTotal').value); + let Total = ToDouble($get('TxtSubTotal').value); + let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val(); let importeTxt = parseFloat(txt.value.replace(/,/g, '')); + if (TipoAnticipo == '4') { + Total = ToDouble($get('TxtTotal').value); + } + if (isNaN(importeTxt)) { importeTxt = 0; } else { @@ -10580,7 +10584,6 @@ saldo = (importeTxt > saldo) ? saldo : importeTxt; - var SaldoCompra = (Total - FnSumaValoresAnt() + ToDouble(txt.value)).toFixed(2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2)); if (SaldoCompra < 0) txt.value = SaldoCompra - txt.value; //minimo entre saldocompra y el saldoanticipo diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 7d910641f..ea5dbd214 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -7047,6 +7047,12 @@ Partial Class Ventas End If If Not EsModuloCotizacion Then LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva() + If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(60) Then + LnkCotizaciones.Visible = False + LnkPedido2SinFacturar.Visible = False + LnkRemisiones.Visible = False + LnkOCs.Visible = False + End If End If End If @@ -8237,6 +8243,13 @@ Partial Class Ventas End If If Not EsModuloCotizacion Then LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva() + + If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(60) Then + LnkCotizaciones.Visible = False + LnkPedido2SinFacturar.Visible = False + LnkRemisiones.Visible = False + LnkOCs.Visible = False + End If End If End If @@ -16759,6 +16772,7 @@ Partial Class Ventas GVAnticipos.DataBind() End If UpAnticipos.Update() + UpPS.Update() End Sub Protected Sub GVAnticipos_RowCreated(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAnticipos.RowCreated @@ -18265,6 +18279,15 @@ Partial Class Ventas ImgAntiPend.Visible = True End If + If ImgAntiPend.Visible Then + If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then + Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC') ", "")}") + If DtMovtos.Rows.Count = 0 Then + ImgAntiPend.Visible = False + End If + End If + End If + TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString @@ -18300,6 +18323,15 @@ Partial Class Ventas ImgAntiPend.Visible = True End If + If ImgAntiPend.Visible Then + If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then + Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC') ", "")}") + If DtMovtos.Rows.Count = 0 Then + ImgAntiPend.Visible = False + End If + End If + End If + MostrarOpcionesPaqueteria() TrAtencionA.Visible = True