From c5f26cbf755b5af6b46849add89362090f3ccb84 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 15 Aug 2024 15:10:12 -0700 Subject: [PATCH] =?UTF-8?q?OC=20Grupo=20d=C3=ADaz,=20CveSubProyectoGeneral?= =?UTF-8?q?,=20=20Rep=20OC=20Usar=20Seriefolio=20,=20=20oc=20ocultar=20col?= =?UTF-8?q?umnas=20=20de=20subproyecto=20=20al=20cargar=20oc=20para=20189?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 4 ++-- OC/OC.aspx.vb | 47 +++++++++++++++++++++++++++++++---------- OC/RepOC.aspx.vb | 12 +++++------ 3 files changed, 44 insertions(+), 19 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 8016109fa..74017a021 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6430,8 +6430,8 @@ Partial Class Compras_Compras For Each gvRowInv As GridViewRow In GvInv.Rows Dim gvCantidad As Decimal = gvRowInv.FCTextBox("TbCantidad").Text.ToDecimal Dim gvPU As Decimal = gvRowInv.DataKey("PU").ToDecimal - Dim gvDescuento As Decimal = gvRowInv.DataKey("PU").ToDecimal - ImpPrepoliza = (ImpPrepoliza + (gvCantidad * gvPU)) - gvDescuento + Dim gvDescuento As Decimal = gvRowInv.DataKey("Descuento").ToDecimal + ImpPrepoliza = ImpPrepoliza + ((gvCantidad * gvPU)) - gvDescuento Next ImpPrepolizaMN = ImpPrepoliza * tipoCambioActual * Multiplicador diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 0f8ad93da..29b1e46d1 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -39,6 +39,10 @@ Partial Class OC_OC End Property Private Property TipoOC As String Get + If ViewState("TipoOC") Is Nothing Then + ViewState("TipoOC") = "" + End If + TipoOC = ViewState("TipoOC").ToString End Get Set(value As String) @@ -656,6 +660,22 @@ Partial Class OC_OC CargarCentrosDeCosto(Nothing, DdlSubProyectoEntrega, Nothing, Nothing, "Seleccione") + If UsuarioActual.CveEmpresa = 189 Then + 'GlobalDTOCEstatusUsuarios(CveEmpresaActual, UsuarioActual.CveUsuario, TipoOC) + DdlSubProyectoGral.DataSource = GlobalDTOCEstatusUsuarios(CveEmpresaActual, UsuarioActual.CveUsuario, TipoOC).FiltraParametros("", "SubProyecto", DistinctColumns:={"CveSubProyecto", "SubProyecto"}) + DdlSubProyectoGral.DataBind() + DdlSubProyectoGral.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + DdlSubProyectoGral.SelectedValueExist(UsuarioActual.CveSubProyecto) + TdProyectoSubPrpyectoDdl.Visible = False + TdProyectoSubPrpyecto.Visible = False + GvD.Columns(4).Visible = False + UPPDetalle.Update() + + End If + + + + 'CARGA YA REGISTRADO If Request("OC") IsNot Nothing AndAlso IsNumeric(Request("OC")) AndAlso Request("OC").ToEntero > 0 Then @@ -746,18 +766,19 @@ Partial Class OC_OC 'temporal 'If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then - If UsuarioActual.CveEmpresa = 189 Then - 'GlobalDTOCEstatusUsuarios(CveEmpresaActual, UsuarioActual.CveUsuario, TipoOC) - DdlSubProyectoGral.DataSource = GlobalDTOCEstatusUsuarios(CveEmpresaActual, UsuarioActual.CveUsuario, TipoOC).FiltraParametros("", "SubProyecto", DistinctColumns:={"CveSubProyecto", "SubProyecto"}) - DdlSubProyectoGral.DataBind() - DdlSubProyectoGral.Items.Insert(0, New ListItem("Seleccione uno", "-1")) - DdlSubProyectoGral.SelectedValueExist(UsuarioActual.CveSubProyecto) - TdProyectoSubPrpyectoDdl.Visible = False - TdProyectoSubPrpyecto.Visible = False - GvD.Columns(4).Visible = False - UPPDetalle.Update() - End If + 'If UsuarioActual.CveEmpresa = 189 Then + ' 'GlobalDTOCEstatusUsuarios(CveEmpresaActual, UsuarioActual.CveUsuario, TipoOC) + ' DdlSubProyectoGral.DataSource = GlobalDTOCEstatusUsuarios(CveEmpresaActual, UsuarioActual.CveUsuario, TipoOC).FiltraParametros("", "SubProyecto", DistinctColumns:={"CveSubProyecto", "SubProyecto"}) + ' DdlSubProyectoGral.DataBind() + ' DdlSubProyectoGral.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + ' DdlSubProyectoGral.SelectedValueExist(UsuarioActual.CveSubProyecto) + ' TdProyectoSubPrpyectoDdl.Visible = False + ' TdProyectoSubPrpyecto.Visible = False + ' GvD.Columns(4).Visible = False + ' UPPDetalle.Update() + + 'End If BtnGeneraContrato.Visible = True : CargaClientesContrato() @@ -1555,6 +1576,10 @@ Partial Class OC_OC TxtPorcentajeProntoPago.Text = (100 * objOC.PorcentajeProntoPago).ToString("###.00") + If UsuarioActual.CveEmpresa = 189 Then + DdlSubProyectoGral.SelectedValueExist(objOC.DtResultados.Rows(0)("CveSubProyectoGral").ToString) + End If + If Not IsNothing(objOC.Tipo) Then Select Case objOC.Tipo.ToUpper diff --git a/OC/RepOC.aspx.vb b/OC/RepOC.aspx.vb index 63c5ead40..26e7ebe69 100644 --- a/OC/RepOC.aspx.vb +++ b/OC/RepOC.aspx.vb @@ -285,7 +285,7 @@ Partial Class RepOC If e.Row.RowType = DataControlRowType.DataRow Then ' - e.Row.FCLiteral("LtlLiga").Text = String.Format("{1}", e.Row.DBCampo("CveOrdenCompra"), e.Row.DBCampo("Folio")) + e.Row.FCLiteral("LtlLiga").Text = String.Format("{1}", e.Row.DBCampo("CveOrdenCompra"), e.Row.DBCampo("SerieFolio")) e.Row.Cells(8).Attributes.Add("data-order", e.Row.DBCampo("Fecha").ToDate.Ticks.ToString) e.Row.Cells(15).Attributes.Add("data-order", e.Row.DBCampo("Total").ToDecimal.ToString) @@ -301,7 +301,7 @@ Partial Class RepOC End Select If e.Row.DBCampo("Tipo") = "OC" Then - e.Row.FCLiteral("LtlLigaReq").Text = String.Format("{1}", e.Row.DBCampo("CveREQ"), e.Row.DBCampo("FolioREQ")) + e.Row.FCLiteral("LtlLigaReq").Text = String.Format("{1}", e.Row.DBCampo("CveREQ"), e.Row.DBCampo("SerieFolioREQ")) Else e.Row.FCLiteral("LtlLigaReq").Text = "" End If @@ -327,7 +327,7 @@ Partial Class RepOC If e.Row.RowType = DataControlRowType.DataRow Then ' - e.Row.FCLiteral("LtlLiga").Text = String.Format(" {1}", e.Row.DBCampo("CveOrdenCompra"), e.Row.DBCampo("Folio")) + e.Row.FCLiteral("LtlLiga").Text = String.Format(" {1}", e.Row.DBCampo("CveOrdenCompra"), e.Row.DBCampo("SerieFolio")) e.Row.Cells(8).Attributes.Add("data-order", e.Row.DBCampo("Fecha").ToDate.Ticks.ToString) e.Row.Cells(15).Attributes.Add("data-order", e.Row.DBCampo("Total").ToDecimal.ToString) @@ -343,7 +343,7 @@ Partial Class RepOC End Select If e.Row.DBCampo("Tipo") = "OC" Then - e.Row.FCLiteral("LtlLigaReq").Text = String.Format("{1}", e.Row.DBCampo("CveREQ"), e.Row.DBCampo("FolioREQ")) + e.Row.FCLiteral("LtlLigaReq").Text = String.Format("{1}", e.Row.DBCampo("CveREQ"), e.Row.DBCampo("SerieFolioREQ")) Else e.Row.FCLiteral("LtlLigaReq").Text = "" End If @@ -445,7 +445,7 @@ Partial Class RepOC If e.Row.RowType = DataControlRowType.DataRow Then ' - e.Row.FCLiteral("LtlLiga").Text = String.Format("{1}", e.Row.DBCampo("CveOrdenCompra"), e.Row.DBCampo("Folio")) + e.Row.FCLiteral("LtlLiga").Text = String.Format("{1}", e.Row.DBCampo("CveOrdenCompra"), e.Row.DBCampo("SerieFolio")) e.Row.Cells(8).Attributes.Add("data-order", e.Row.DBCampo("Fecha").ToDate.Ticks.ToString) e.Row.Cells(15).Attributes.Add("data-order", e.Row.DBCampo("Total").ToDecimal.ToString) @@ -461,7 +461,7 @@ Partial Class RepOC End Select If e.Row.DBCampo("Tipo") = "OC" Then - e.Row.FCLiteral("LtlLigaReq").Text = String.Format("{1}", e.Row.DBCampo("CveREQ"), e.Row.DBCampo("FolioREQ")) + e.Row.FCLiteral("LtlLigaReq").Text = String.Format("{1}", e.Row.DBCampo("CveREQ"), e.Row.DBCampo("SerieFolioREQ")) Else e.Row.FCLiteral("LtlLigaReq").Text = "" End If