From a16d48836c263ebf00bd51d6d8a9f05131c30128 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 5 Mar 2024 19:54:53 -0700 Subject: [PATCH] Retro EMD - Mejoras Propuestas - Sayri --- Compras/Compras.aspx.vb | 6 +----- General/SaldosIniciales.aspx.vb | 3 ++- OC/OC.aspx | 18 +++++++++--------- OC/OC.aspx.vb | 13 ++++++++++--- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 163bd8c57..3855b52f3 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -3998,6 +3998,7 @@ Partial Class Compras_Compras Exit Sub End If + Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal() If Not CveSubProyectoPrincipal > 0 Then @@ -14504,11 +14505,6 @@ Partial Class Compras_Compras CalculaTotales() CompraEstaVinculadaOC = True - - If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then - Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia) - End If - End Sub Private Sub VinculacionAsync(Optional VinculacionCompleta As Boolean = False) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 21187f697..51bc19045 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -2502,7 +2502,8 @@ Partial Class General_SaldosIniciales For Each nuevaEntrada As DataRow In dt.FiltraParametros($"TRIM(Almacen) = '{almacenActual}'").Rows contadorMovimientos += 1 - Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS")}' ") + 'Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS").ToString.Trim}' ") + Dim RowPS As DataRow = ProductosServiciosRef.FiltroPrimero($"Codigo = '{nuevaEntrada("CodigoPS").ToString.Trim(" "c)}' ") If RowPS IsNot Nothing Then Dim CvePS As Integer = RowPS("CvePS").ToString().ToEntero() diff --git a/OC/OC.aspx b/OC/OC.aspx index a0f785195..f6003cce7 100644 --- a/OC/OC.aspx +++ b/OC/OC.aspx @@ -1584,9 +1584,9 @@
-
-
- +
+
+ @@ -1598,9 +1598,9 @@
-
-
- +
+
+ @@ -1613,7 +1613,7 @@
-
+
@@ -1621,7 +1621,7 @@
-
+

@@ -3020,7 +3020,7 @@ function SAImporteContadokeyup() { var importe = (100 * ToDouble($('#TxtSAImporteContado').val())) / ToDouble($get("LblTotal").value.replace(/,/g, "")); - $('#TxtSAImPorcentajeContado%>').val(FormatoNumero(importe, 2).replace(/,/g, "")); + $('#TxtSAImPorcentajeContado').val(FormatoNumero(importe, 2).replace(/,/g, "")); } function showDivEC(CveCotizacion) { diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 5f11e2541..38415f4f5 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -5399,7 +5399,7 @@ Partial Class OC_OC End If End Sub - Private Sub EnviaCorreoSolicitudAnticipo(CveEvento As Integer) + Private Sub EnviaCorreoSolicitudAnticipo(CveEvento As Integer, Optional ImporteAnticipo As Decimal = 0) Dim Param As New List(Of String) Dim DtPara As DataTable = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual) @@ -5409,7 +5409,14 @@ Partial Class OC_OC Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para Param.Add("Solicitud de anticipo de Orden de Compra") 'Asunto - Param.Add(GeneraCorreoAnticipo(lblFolio.Text, DtPara.Rows(0)("Nombre").ToString(), String.Format("http://sig.adssistemas.mx/OI/EventoDetalle.aspx?CveTipoEvento=1&CveEvento={0}", CveEvento), TxtSAImporte.Text, DdlProveedores.SelectedText)) + + + If ImporteAnticipo = 0 Then + ImporteAnticipo = TxtSAImporte.Text.ToDecimal + End If + + + Param.Add(GeneraCorreoAnticipo(lblFolio.Text, DtPara.Rows(0)("Nombre").ToString(), String.Format("http://sig.adssistemas.mx/OI/EventoDetalle.aspx?CveTipoEvento=1&CveEvento={0}", CveEvento), ImporteAnticipo.ToString, DdlProveedores.SelectedText)) Param.Add(String.Format("{0}PDF\OC-{1}.pdf", UsuarioActual.Empresa.Ruta, CveOrdenCompra)) Dim Hilo As New Threading.Thread(AddressOf MandaCorreoAnticipo) Hilo.Start(Param) @@ -8922,7 +8929,7 @@ Partial Class OC_OC End If If Not TieneError Then - EnviaCorreoSolicitudAnticipo(ObjOI.CveEvento) + EnviaCorreoSolicitudAnticipo(ObjOI.CveEvento, TxtSAImporteContado.Text.ToDecimal) 'LIMPIA DdlSAUsuarioContado.SelectedValue = "-1" TxtSAImporteContado.Text = ""