From 3e21f6f80ef77b994e4ee6130914bd45e0acf1a0 Mon Sep 17 00:00:00 2001 From: JPerez Date: Wed, 2 Jul 2025 12:52:32 -0700 Subject: [PATCH 1/5] --FIX moneda en anticipo --- Ventas/ClientesAbonar.aspx.vb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index a1ac6178e..0edbb82d6 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -1330,13 +1330,15 @@ Partial Class Ventas_ClientesAbonar If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TxtAnticipo.Text.ToDecimal > 0 AndAlso MsgError = "" Then '' si es empresa GDiaz 'generar un anticipo y registrarle el pago. - Dim tCveMoneda As Integer = 1 + Dim tCveMoneda As Integer = Me.CveMoneda Dim tCveFormaPago As Integer = GlobalDTTipoTransacciones().FiltroPrimeroValor("CveFormaPago", $"CveTipoTransaccion={DdlTipoTransaccion.SelectedValue}").ToEntero Dim tCvePS As Integer Dim tCveUM As Integer = 0 Dim tCveSub As Integer = DdlSubProyectos.SelectedValue.ToEntero ObjFacturaAnt = Modelos.Factura.CrearVentaNueva(UsuarioActual, tCveSub, CveCliente, tCveMoneda, "Ant") ObjFacturaAnt.CveMoneda = tCveMoneda + ObjFacturaAnt.TipoCambio = If(tCveMoneda = 1, 1, TxtTCDolares.Text.ToDecimal()) + ObjFacturaAnt.TipoCambioDolares = If(tCveMoneda = 1, 1, TxtTCDolares.Text.ToDecimal()) ObjFacturaAnt.CveFormaPago = tCveFormaPago ObjFacturaAnt.CveMetodoPago = 1 ObjFacturaAnt.ClaveMetodoPagoSAT = "PUE" @@ -1355,7 +1357,7 @@ Partial Class Ventas_ClientesAbonar RespAnt = ObjFacturaAnt.EmitirFactura(False, Transac:=ObjMov.IniciaTransacSQL(), Modulo:="Ventas/ClientesAbonarAnt", MostrarURL:=True) RespAnt.Factura = ObjFacturaAnt - If RespAnt IsNot Nothing AndAlso RespAnt.Factura IsNot Nothing Then + If RespAnt IsNot Nothing AndAlso RespAnt.Factura IsNot Nothing AndAlso RespAnt.Factura.CveVenta > 0 Then Dim VentaActual As New Venta(UsuarioActual) VentaActual.CveVenta = RespAnt.Factura.CveVenta @@ -1365,7 +1367,7 @@ Partial Class Ventas_ClientesAbonar VentaActual.TipoDocto = "Ant" VentaActual.SerieFolio = RespAnt.Factura.SerieFolio VentaActual.ClienteNombre = NombreComercial - VentaActual.TC = 1 + VentaActual.TC = If(tCveMoneda = 1, 1, TxtTCDolares.Text.ToDecimal()) VentaActual.Total = TxtAnticipo.Text.ToDecimal VentaActual.IVA = (tPorIVA * tPU).RoundSQL(2) @@ -1381,6 +1383,8 @@ Partial Class Ventas_ClientesAbonar Pago.ImportePagoVenta = TxtAnticipo.Text.ToDecimal Pago.Referencia = TxtFolio.Text Pago.TipoPago = "XXX" + Pago.TCPago = If(tCveMoneda = 1, 1, TxtTCDolares.Text.ToDecimal()) + 'If RblTipoPago.SelectedValue = "3" Then ' Pago.TipoPago = "I" ' Pago.FechaDocumentoRelacionado = FechaIngreso @@ -1390,6 +1394,8 @@ Partial Class Ventas_ClientesAbonar If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then MsgError = "No se pudo insertar la póliza" End If + Else + MsgError = "Ocurrió un error al generar el anticipo" End If End If From 7fba323ed95abfa0e8cc525092698c6f2b6e76d7 Mon Sep 17 00:00:00 2001 From: JPerez Date: Wed, 2 Jul 2025 12:52:50 -0700 Subject: [PATCH 2/5] --FIX Global de estatus de cobranza --- Ventas/CatCobranzaEstatus.aspx.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Ventas/CatCobranzaEstatus.aspx.vb b/Ventas/CatCobranzaEstatus.aspx.vb index 5dbf30f6d..c35642c8c 100644 --- a/Ventas/CatCobranzaEstatus.aspx.vb +++ b/Ventas/CatCobranzaEstatus.aspx.vb @@ -79,6 +79,8 @@ Partial Class Vta_CatCobranzaEstatus Alert("Error al actualizar") End If End If + + GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) = Nothing End Sub Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting @@ -92,6 +94,8 @@ Partial Class Vta_CatCobranzaEstatus Alert("Estatus de cobranza eliminado") End If ObjVentas.Dispose() + + GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) = Nothing End Sub Private Sub CargaDatosTurno() From e075b69f059481f9ea198ddbf443329fc3277f3f Mon Sep 17 00:00:00 2001 From: JPerez Date: Wed, 2 Jul 2025 12:53:04 -0700 Subject: [PATCH 3/5] --Cambios en metas de vendedores --- Ventas/CatMetasVendedores.aspx | 94 ++++++++++++++++--------------- Ventas/CatMetasVendedores.aspx.vb | 93 ++++++++++++++++++++++-------- 2 files changed, 120 insertions(+), 67 deletions(-) diff --git a/Ventas/CatMetasVendedores.aspx b/Ventas/CatMetasVendedores.aspx index f4a31b5c6..a449a738d 100644 --- a/Ventas/CatMetasVendedores.aspx +++ b/Ventas/CatMetasVendedores.aspx @@ -33,13 +33,13 @@
- -
+ +
- -
+ +
@@ -54,8 +54,8 @@
- -
+ +
@@ -70,7 +70,7 @@ - + @@ -162,48 +162,54 @@ Metas Vendedores