From c412b161295f25a83ac7b387d336a61eb7f510d7 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 17 Feb 2025 21:49:45 -0700 Subject: [PATCH] =?UTF-8?q?--=20considerar=20los=20importes=20de=20educaci?= =?UTF-8?q?=C3=B3n=20del=20m=C3=A9dico,=20desde=20la=20venta,=20si=20tiene?= =?UTF-8?q?=20dato?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/RepComisionesSMS.aspx | 10 ++++++---- Ventas/RepComisionesSMS.aspx.vb | 27 +++++++++++++-------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/Ventas/RepComisionesSMS.aspx b/Ventas/RepComisionesSMS.aspx index 551a5035a..05185b7d7 100644 --- a/Ventas/RepComisionesSMS.aspx +++ b/Ventas/RepComisionesSMS.aspx @@ -179,14 +179,16 @@ - + + + + + + - - - diff --git a/Ventas/RepComisionesSMS.aspx.vb b/Ventas/RepComisionesSMS.aspx.vb index 5c8d9dee1..fcb3dce7a 100644 --- a/Ventas/RepComisionesSMS.aspx.vb +++ b/Ventas/RepComisionesSMS.aspx.vb @@ -2,6 +2,7 @@ Option Strict On Imports System.Data +Imports System.Data.SqlClient Imports Extensiones Partial Class Ventas_RepComisionesSMS @@ -47,6 +48,7 @@ Partial Class Ventas_RepComisionesSMS DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor) DdlVendedor.Enabled = False GvDatos.Columns(16).Visible = False 'gerente + GvDatos.Columns(19).Visible = False 'pagada End If DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ") @@ -62,6 +64,7 @@ Partial Class Ventas_RepComisionesSMS GvDatos.Columns(16).Visible = False 'gerente GvDatos.Columns(17).Visible = False 'ed.medica GvDatos.Columns(18).Visible = False 'fecha pago + GvDatos.Columns(19).Visible = False 'pagada End If End Sub @@ -91,10 +94,8 @@ Partial Class Ventas_RepComisionesSMS Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - CargaDatos() - End Sub #Region "EXCEL" @@ -115,7 +116,6 @@ Partial Class Ventas_RepComisionesSMS #End Region - Protected Sub LnkComisiones_Click(sender As Object, e As EventArgs) CargaComisiones() RegistraScript("$('#DvModalComisiones').modal('show');") @@ -124,24 +124,18 @@ Partial Class Ventas_RepComisionesSMS Private Sub CargaComisiones() DTDatos = New DataTable GvComisiones.DataSource = Nothing - Dim objVentas As New ClsVentas - If objVentas.GetComisionesMedicas(UsuarioActual.CveEmpresa) Then GvComisiones.DataSource = objVentas.DtResultados DTDatos = objVentas.DtResultados End If - objVentas.Dispose() GvComisiones.DataBind() - UpDvModalComisiones.Update() End Sub - - Protected Sub BtnGuardarComisiones_Click(sender As Object, e As EventArgs) Dim objVentas As New ClsVentas @@ -162,7 +156,6 @@ Partial Class Ventas_RepComisionesSMS Dim ComisionVendedorGV As Decimal = (GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal / 100).RoundSQL(4) Dim ComisionTecnicoGV As Decimal = (GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal / 100).RoundSQL(4) - If ComisionMedicoDT <> ComisionMedicoGV Or ComisionVendedorDT <> ComisionVendedorGV Or ComisionTecnicoDT <> ComisionTecnicoGV Or ComisionGerenteDT <> ComisionGerenteGV Then If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV, ComisionGerenteGV) Then TieneError = True @@ -194,14 +187,12 @@ Partial Class Ventas_RepComisionesSMS e.Row.FCTextBox("TxtComisionMedico").Text = e.Row.DataKey("ComisionMedico").ToDecimal.ToString("###.00") End If - If e.Row.DataKey("ComisionGerente").ToDecimal = 0 Then e.Row.FCTextBox("TxtComisionGerente").Text = "" Else e.Row.FCTextBox("TxtComisionGerente").Text = (e.Row.DataKey("ComisionGerente").ToDecimal * 100).ToString("###.00") End If - If e.Row.DataKey("ComisionVendedor").ToDecimal = 0 Then e.Row.FCTextBox("TxtComisionVendedor").Text = "" Else @@ -214,8 +205,6 @@ Partial Class Ventas_RepComisionesSMS e.Row.FCTextBox("TxtComisionTecnico").Text = (e.Row.DataKey("ComisionTecnico").ToDecimal * 100).ToString("###.00") End If - - End If End Sub @@ -379,4 +368,14 @@ Partial Class Ventas_RepComisionesSMS End If End Sub + + Protected Sub ChkPagada_CheckedChanged(sender As Object, e As EventArgs) + Dim chk As CheckBox = DirectCast(sender, CheckBox) + Dim gvr As GridViewRow = DirectCast(chk.NamingContainer, GridViewRow) + Using ObjVenta As New ClsVentas + If ObjVenta.UpdateVentaAdicional(gvr.DataKey("CveVenta").ToEntero, "NUM1", If(chk.Checked, "1", "0"), UsuarioActual.CveEmpresa) Then + CargaDatos() + End If + End Using + End Sub End Class