From 6a423580fd94732fde5b9761964bb1a3db675f81 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 24 Mar 2025 05:44:29 -0700 Subject: [PATCH] =?UTF-8?q?--=20sms=20educ=20m=C3=A9dica?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/Modelos.vb | 8 ++++++-- Ventas/Ventas.aspx | 21 ++++++--------------- Ventas/Ventas.aspx.vb | 37 +++++-------------------------------- 3 files changed, 17 insertions(+), 49 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 26e98bffa..b8ff668a4 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1451,6 +1451,9 @@ Namespace Modelos TmpDT.Columns.Add("CveViajePasajero", GetType(Integer)) TmpDT.Columns("CveViajePasajero").DefaultValue = -1 + TmpDT.Columns.Add("CantidadConversion", GetType(Decimal)) + TmpDT.Columns("CantidadConversion").DefaultValue = 0 + Return TmpDT End Function @@ -1460,7 +1463,7 @@ Namespace Modelos Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1, Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -1, Optional CveVentaDetalleRemision As Integer = -1, Optional CveViajePasajero As Integer = -1, Optional RedondearTotal As Boolean = True, - Optional CvePromocionDetalle As Integer = -1) As Boolean + Optional CvePromocionDetalle As Integer = -1, Optional CantidadConversion As Decimal = 0) As Boolean If Not CvePS > 0 Then Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError) @@ -1650,6 +1653,7 @@ Namespace Modelos Row("CuentaPredial") = CuentaPredial Row("EsCargo") = 0 Row("CvePromocionDetalle") = CvePromocionDetalle + Row("CantidadConversion") = CantidadConversion If Me.DtDetalle.Columns.Contains("CveMarca") Then Row("CveMarca") = DrPS("CveMarca") @@ -2241,7 +2245,7 @@ Namespace Modelos IEPS:=Row("ImporteIEPS").ToString.ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero, ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString, - PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, CveViajePasajero:=CveViajePasajero) Then + PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, CveViajePasajero:=CveViajePasajero, CantidadConversion:=Row("CantidadConversion").ToString.ToDecimal) Then ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la factura.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") Exit For Else diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 1be79ef50..7f4359172 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -654,19 +654,7 @@ - - - - Educ. Médica: - - - - - - - - - + @@ -9155,8 +9143,11 @@ - - <%----%> + + + + + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index c5874f90b..ae66e8a7d 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -14616,7 +14616,6 @@ Partial Class Ventas CveMedico = DdlMedico.SelectedValue.ToEntero CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero) - factura.Alfa2 = TxtEducMedica.Text.Trim 'CveAlmacenTraspasoDestino End If @@ -19953,11 +19952,6 @@ Partial Class Ventas HdnPS.Value = PSValidarModal End If - 'If HdnPS.Value = "" Or HdnPS.Value = "-1" Then - ' Alert("Es necesario seleccionar el Producto o Servicio a facturar.", TipoMensaje.MsgAdvertencia) - ' Return False - 'End If - 'SI USA CONTABILIDAD LA CLASIFICACION ES OBLIGATORIA If CveClasificacion <= 0 AndAlso UsuarioActual.Empresa.UsaContabilidad Then Alert("La Clasificación es obligatoria, favor de seleccionarla", TipoMensaje.MsgAdvertencia) @@ -20112,7 +20106,7 @@ Partial Class Ventas If ValidaExistencia Then 'VALIDA EXISTENCIA - If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186, 190, 192, 197, 189}) Then + If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186, 190, 192, 197, 189, 186}) Then Dim BuscarEnTabla As Boolean = If(UsuarioActual.Empresa.Funcionalidad(715) = "1", True, False) Dim Existencia As Decimal = 0D @@ -39973,16 +39967,13 @@ Partial Class Ventas TrVentasMedicas1.Visible = True TrVentasMedicas2.Visible = True TrVentasMedicas3.Visible = True - TrVentasMedicas5.Visible = True For Each item As ListItem In RBLTipoVenta.Items item.Text = $"  {item.Text}" Next - If Opcion = "Cot" Then 'TrVentasMedicas2.Visible = False TrVentasMedicas3.Visible = False - TrVentasMedicas5.Visible = False Else RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });") End If @@ -40067,16 +40058,10 @@ Partial Class Ventas ChkRequiereTecnicoModal.Checked = True ChkRequiereTecnicoModal.Enabled = True DvModalRequiereOSFecha.Visible = True - - 'If CveCliente > 0 Then - ' CargaSucursalesModal(CveCliente) - 'End If - TxtFechaModal.Text = NowADS.AddHours(1).ToString("yyyy-MM-dd HH").Replace(" ", "T") + ":00" ' ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T") LnkDvModalTipoVentaAceptar.Visible = True - Select Case RBLTipoVenta.SelectedValue Case "1", "5", "6" '1 Fuera de linea || 5 Consignación - Uso material || A-Vista - Material Utilizado ChkRequiereTecnicoModal.Checked = True @@ -40104,16 +40089,11 @@ Partial Class Ventas UpDvModalTipoVenta.Update() RegistraScript("$('#DvModalTipoVenta').modal('hide');") End Select - - LblDvModalTipoVentaTitulo.Text = RBLTipoVenta.SelectedItem.Text - - End If UpDvModalTipoVenta.Update() End Sub - Protected Sub DdlClienteSucursal_SelectedIndexChanged(sender As Object, e As EventArgs) Dim CveClienteSplit As Integer = -1 CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, CveClienteSucursalL:=DdlClienteSucursalSucursal, CveTipoVentaL:=RBLTipoVenta.SelectedValue.ToEntero) @@ -40136,8 +40116,6 @@ Partial Class Ventas Return If(array(1).ToEntero > 0, array(1).ToEntero, -1) End If End Function - - Private Sub SeleccionarClienteSucursal(CveCliente As Integer) Dim IndexSeleccion As Integer = 0 @@ -40149,9 +40127,7 @@ Partial Class Ventas End If IndexSeleccion = IndexSeleccion + 1 Next - End Sub - Protected Sub ModalValidaMedicoProcedimiento() If DdlMedicoModal.SelectedValue.ToEntero > 0 AndAlso DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then @@ -40159,11 +40135,8 @@ Partial Class Ventas Else LnkDvModalTipoVentaAceptar.Visible = False End If - UpDvModalTipoVenta.Update() - End Sub - Protected Sub LnkDvModalTipoVentaCancelar_Click(sender As Object, e As EventArgs) LnkDvModalTipoVentaAceptar.Visible = False @@ -40185,9 +40158,7 @@ Partial Class Ventas LblDvModalTipoVentaTitulo.Text = "Tipo de Venta" UpDvModalTipoVenta.Update() - End Sub - Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs) If RBLTipoVenta.SelectedValue = "2" Then 'pago directo @@ -40289,7 +40260,6 @@ Partial Class Ventas ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked TdFechaOS1.Visible = ChkRequiereTecnicoModal.Checked TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked - End If DdlTipoComprobante.Enabled = False @@ -40319,13 +40289,15 @@ Partial Class Ventas Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero + Dim EdMedica As Decimal = 0 + If RBLTipoVenta.SelectedValue = "2" Then EdMedica = GvRow.FCTextBox("TxtEdMedica").Text.ToDecimal If Cantidad > 0 Then If AgregarProductoServicio(Cantidad, CveUnidadMedida, Abreviatura, CveClasificacion, Clasificacion, CvePS, "", TxtObsPS.Text.TrimEnd, PU, 0, DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text, Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=-1, - ImporteProntoPago:=0, ObjDescuento:=Nothing, CvePrecioLista:=-1, PrecioLista:="", NumTurnos:=0) Then + ImporteProntoPago:=0, ObjDescuento:=Nothing, CvePrecioLista:=-1, PrecioLista:="", NumTurnos:=0, CantidadConversion:=EdMedica) Then CountPsAgregados = CountPsAgregados + 1 Else Exit For @@ -40391,6 +40363,7 @@ Partial Class Ventas GvPSProced.DataBind() DVGvPSProced.Visible = True + GvPSProced.Columns(4).Visible = RBLTipoVenta.SelectedValue = "2" ' comisión Ed. Médica, solo cuando es pago directo For Each GvRow As GridViewRow In GvPSProced.Rows If RBLTipoVenta.SelectedValue = "2" Then