From b3f06880229a7f6d0ab7eaf55badbb1d72ebaba7 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 17 Jan 2024 10:05:37 -0700 Subject: [PATCH 1/3] -- cambio en TC de anticipos -- no actualizar os con cveventa, agenerarlo desde pedido --- Ventas/Ventas.aspx | 2 +- Ventas/Ventas.aspx.vb | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index f8293738d..711178838 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -4370,7 +4370,7 @@
- + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 45a1c2a0b..be9816faa 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -13644,19 +13644,12 @@ Partial Class Ventas GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList, CveVentaOS:=factura.CveVenta, SerieFolioOS:=factura.SerieFolio) - If ErrorList.Count = 0 Then - If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOSVentaMedica) Then - ErrorList.Add("Ocurrió un error al guardar la venta en Ordenes de Servicio") - End If - End If - If Not ObjVentas.SincronizacionProcedimientoProducto(DdlProcedimiento.SelectedValue.ToEntero, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then ErrorList.Add("Ocurrió un error al guardar los productos al procedimiento") End If End If - 'Si viene de OS, Se guarda CveVenta en OS If CveOS > 0 Then If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOS) Then @@ -15849,16 +15842,17 @@ Partial Class Ventas 'Else ' tipoCambio = GlobalTipoCambio(e.Row.DataKey("Fecha").ToString().ToDate).ToDecimal 'End If - tipoCambio = e.Row.DBCampo("TipoCambioHoy").ToString().ToDecimal + If TxtFechaAnticipoCliente.Text = "" Then TxtFechaAnticipoCliente.Text = Now.ToShortDateString + tipoCambio = GlobalTipoCambio(TxtFechaAnticipoCliente.Text.ToDate).ToDecimal 'e.Row.DBCampo("TipoCambioHoy").ToString().ToDecimal e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).Text = tipoCambio.FormatoNumero(4) - If DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 1 Then + If DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToEntero() = 1 Then saldo = e.Row.DataKey("Saldo").ToDecimal - ElseIf DdlMoneda.SelectedValue.ToEntero() = 2 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 1 And tipoCambio > 0 Then - saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal / tipoCambio) - ElseIf DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToString().ToEntero() = 2 Then - saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal * tipoCambio) + ElseIf DdlMoneda.SelectedValue.ToEntero() = 2 And e.Row.DBCampo("CveMoneda").ToEntero() = 1 And tipoCambio > 0 Then + saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal / tipoCambio).TruncateDecimal + ElseIf DdlMoneda.SelectedValue.ToEntero() = 1 And e.Row.DBCampo("CveMoneda").ToEntero() = 2 Then + saldo = (e.Row.DataKey("Saldo").ToString().ToDecimal * tipoCambio).TruncateDecimal Else saldo = e.Row.DataKey("Saldo").ToDecimal End If @@ -36499,5 +36493,9 @@ Partial Class Ventas End If End Sub + + Protected Sub TxtFechaAnticipoCliente_TextChanged(sender As Object, e As EventArgs) + CargaAnticipos(CveCliente) + End Sub End Class From 0cfb145c057e7e486c0f438a6aff05ce3bbcdeee Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 17 Jan 2024 10:06:32 -0700 Subject: [PATCH 2/3] =?UTF-8?q?--=20visualizas=20Pedido=20y=20Remisi=C3=B3?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OS/RepOSMedicas.aspx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/OS/RepOSMedicas.aspx b/OS/RepOSMedicas.aspx index 315c39c93..ea1f836d1 100644 --- a/OS/RepOSMedicas.aspx +++ b/OS/RepOSMedicas.aspx @@ -163,29 +163,31 @@ + ToolTip="Listado de ordenes de servicio" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None"> <%--0--%> - <%----%> + <%----%> <%--1--%> <%--2--%> - + <%--3--%> - + <%--4--%> - + <%--5--%> - + <%--6--%> - + <%--7--%> - + <%--8--%> - + <%--9--%> - + + + From 957db5de8ea07698a36744d0407f80d04fb95a92 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 17 Jan 2024 12:41:47 -0700 Subject: [PATCH 3/3] =?UTF-8?q?SMS=202024.01.17=20OS=20=20cambio=20actuali?= =?UTF-8?q?zar=20CveVenta=20por=20remisi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OS/OrdenesServicios.aspx.vb | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index d23b2813d..5e7dc1430 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -99,6 +99,20 @@ Partial Class OS_OrdenesServicios End Set End Property + Private Property CvePedido As Integer + Get + If ViewState("CvePedido") Is Nothing Then + ViewState("CvePedido") = -1 + End If + + Return ViewState("CvePedido").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("CvePedido") = value + End Set + End Property + + Private Property CveOsDetalle As Integer Get @@ -641,6 +655,10 @@ Partial Class OS_OrdenesServicios CveTecnico = ObjOS.CveUsuarioAtendio CargarEstatusDelUsuario(TipoEstatus) CveVenta = ObjOS.CveVenta + If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + CvePedido = ObjOS.CveCotizacion + End If + 'Dim validacionTieneEstatus As Integer = EstatusOSDelUsuario.FiltraParametros(String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio)).Rows.Count @@ -2972,7 +2990,7 @@ Partial Class OS_OrdenesServicios End Select Dim ObjOS As New ClsOS - If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, Opcion, UsuarioActual.CveEmpresa) Then + If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, If(UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1, CvePedido, CveVenta), Opcion, UsuarioActual.CveEmpresa) Then DTSolicitudDev = ObjOS.DtResultados GvMU.DataSource = DTSolicitudDev GvMU.Columns(3).Visible = DTSolicitudDev.MIN("Serie") <> "" @@ -3093,7 +3111,7 @@ Partial Class OS_OrdenesServicios Next If AplicaDevolucion Then - If Not ObjV.UpdateVentasDevolucionAlmacen(1, CveVenta) Then + If Not ObjV.UpdateVentasDevolucionAlmacen(1, CveVentaPedido) Then ProcesoOK = False End If End If @@ -3213,6 +3231,16 @@ Partial Class OS_OrdenesServicios Else ProcesoOK = False End If + + If ProcesoOK Then + + If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS) Then + ProcesoOK = False + End If + + End If + + End If End If @@ -3249,7 +3277,7 @@ Partial Class OS_OrdenesServicios Dim CveSubProyectoPedido As Integer = -1 Dim CveMoneda As Integer = -1 - If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then + If ObjVentas.GetVenta(CvePedido, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Copy().Rows(0) CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero CveSubProyectoPedido = DbRowVenta("CveSubProyecto").ToString().ToEntero()