From fc9bbb77026f7647d0456358dcca6b4c019997bf Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 6 Apr 2020 12:11:57 -0700 Subject: [PATCH 1/4] Cancelacion de Traspaso, cancealar solo lo pendiente por recibir --- Inventarios/TraspasoAlmacen.aspx.vb | 65 ++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 34ef3d6fa..cceb52528 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1550,28 +1550,53 @@ Partial Class Inventarios_TraspasoAlmacen Else Dim CveMovimientoDetalleSalida As Integer = 0 Dim importe As Double = 0 - If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then - For Each Dr As DataRow In ObjInventario.DtResultados.Rows - CveMovimientoDetalleSalida = Dr("CveMovimientoDetalle").ToString.ToEntero - Dim Cantidad As Double = Dr("Cantidad").ToString.ToDouble - Dim PrecioUnitario As Double = Dr("PU").ToString.ToDouble - If CveMovimientoDetalleSalida <= 0 Then - ErrorMovInv = True - TextoError = "Ocurrió un error al guardar los movimientos de salida" - Exit For - End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PrecioUnitario, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then - ErrorMovInv = True - TextoError = "Ocurrió un error al guardar los movimientos de entrada" - Exit For + For Each GvRow As GridViewRow In GvDatosRecepcion.Rows + If GvRow.RowType = DataControlRowType.DataRow Then + Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero + 'DEBE CONSIDERAR SOLO LAS FILAS QUE TENGA PRODUCTOS, NO EL TOTALIZADOR + If CvePS > 0 Then + CveMovimientoDetalleSalida = GvRow.DataKey("CveMovimientoDetalle").ToString.ToEntero + Dim Cantidad As Double = GvRow.DataKey("Cantidad").ToString.ToDouble + Dim PrecioUnitario As Double = GvRow.DataKey("PU").ToString.ToDouble + If CveMovimientoDetalleSalida <= 0 Then + ErrorMovInv = True + TextoError = "Ocurrió un error al guardar los movimientos de salida" + Exit For + End If + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, GvRow.DataKey("CveUM").ToEntero, CvePS, PrecioUnitario, GvRow.DataKey("CveAF").ToEntero, -1, GvRow.DataKey("SerieLote").ToString, Lote:=GvRow.DataKey("Lote"), Batch:=GvRow.DataKey("Batch"), CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then + ErrorMovInv = True + TextoError = "Ocurrió un error al guardar los movimientos de entrada" + Exit For + End If + importe += Cantidad * PrecioUnitario End If - importe += Cantidad * PrecioUnitario - Next - Else - ErrorMovInv = True - TextoError = "Ocurrió un error al obtener los movimientos de salida" - End If + End If + Next + + 'If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then + ' For Each Dr As DataRow In ObjInventario.DtResultados.Rows + ' CveMovimientoDetalleSalida = Dr("CveMovimientoDetalle").ToString.ToEntero + ' Dim Cantidad As Double = Dr("Cantidad").ToString.ToDouble + ' Dim PrecioUnitario As Double = Dr("PU").ToString.ToDouble + ' If CveMovimientoDetalleSalida <= 0 Then + ' ErrorMovInv = True + ' TextoError = "Ocurrió un error al guardar los movimientos de salida" + ' Exit For + ' End If + + ' If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PrecioUnitario, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then + ' ErrorMovInv = True + ' TextoError = "Ocurrió un error al guardar los movimientos de entrada" + ' Exit For + ' End If + ' importe += Cantidad * PrecioUnitario + ' Next + 'Else + ' ErrorMovInv = True + ' TextoError = "Ocurrió un error al obtener los movimientos de salida" + 'End If If Not ErrorMovInv Then Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL From 268d1f56edd79bbedad7353e593581a201660130 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 6 Apr 2020 12:55:35 -0700 Subject: [PATCH 2/4] =?UTF-8?q?Proveedores=20Abonar,=20se=20quitan=20valid?= =?UTF-8?q?aciones=20de=20cuentas=20dep=C3=B3sitos=20en=20Pago=20por=20gru?= =?UTF-8?q?pos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/ProveedoresAbonar.aspx.vb | 18 +- .../RepEstadoResultadosHorizontal.aspx | 42 +++- .../RepEstadoResultadosHorizontal.aspx.vb | 196 +++++++++++------- vwd.webinfo | 4 + 4 files changed, 174 insertions(+), 86 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 240237025..b986ebb70 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -2514,16 +2514,18 @@ Partial Class Bancos_ProveedoresAbonar ElseIf DdlTipoTransaccion.SelectedValue = "17" Then If Dep.DtResultados.Rows.Count > 0 Then - DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'") + DdlCuentaDeposito.DataSource = Dep.DtResultados '.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'") + Else + Alert("El proveedor no tiene cuentas deposito registradas.") End If - If Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then - trCuentaDeposito.Visible = True - DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) - Else - BtnIEGuardar.Enabled = False - Alert("El proveedor no tiene ninguna cuenta deposito registrada ante el sistema BBVA BANCOMER", TipoMensaje.MsgAdvertencia) - End If + 'If Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then + ' trCuentaDeposito.Visible = True + ' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) + 'Else + ' BtnIEGuardar.Enabled = False + ' Alert("El proveedor no tiene ninguna cuenta deposito registrada ", TipoMensaje.MsgAdvertencia) + 'End If Else DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'") diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index f2c51cd15..137f024d4 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -558,7 +558,7 @@ - + @@ -597,6 +597,32 @@ + <%-- + + + + + + + + + + + + + + + + + + + + + + + + --%> + <%-- @@ -617,7 +643,7 @@

- + @@ -631,7 +657,7 @@ - + @@ -678,7 +704,7 @@

- + @@ -692,6 +718,8 @@ + + @@ -771,7 +799,7 @@ - @@ -842,7 +870,7 @@

- + @@ -913,7 +941,7 @@

- + diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb index c68aafc6f..c051bc71c 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb @@ -740,19 +740,33 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal e.Row.ControlStyle.Font.Bold = True End If - 'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - ' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - 'End If - - 'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - ' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - 'End If - - If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then - e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red + If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then + + e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + + + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) + End If + + 'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then + ' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red + 'End If + + If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then + e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red + End If End If - End If End Sub Protected Sub GvGastosMesH_RowDataBound(sender As Object, e As GridViewRowEventArgs) @@ -766,17 +780,29 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then 'e.Row.CssClass = "SubTotales" e.Row.ControlStyle.Font.Bold = True + End If + + If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then + + Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero + + e.Row.FCHyperLink("HLEnero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/01/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLFebrero").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/02/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLMarzo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/03/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLAbril").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/04/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLMayo").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/05/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLJunio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/06/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLJulio").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/07/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLAgosto").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/08/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLSeptiembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/09/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLOctubre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/10/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLNoviembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/11/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + e.Row.FCHyperLink("HLDiciembre").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString, $"01/12/{DdlEjercicio.SelectedValue}".ToDate.ToShortDateString) + + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) + End If - 'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - ' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - 'End If - - 'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - ' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - 'End If - If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red End If @@ -822,7 +848,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal If DtDatosAnualH IsNot Nothing Then CargaGridsAnualH() - SumaTotalesAnualH() + End If End Sub @@ -855,12 +881,17 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal CType(GvIngresosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName CType(GvIngresosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName - GvIngresosAnualH.Columns(IndexGv).Visible = True + 'CType(GvIngresosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName + 'CType(GvIngresosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName + GvIngresosAnualH.Columns(IndexGv).Visible = True + CType(GvTotalesAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName CType(GvTotalesAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName + 'CType(GvTotalesAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName + 'CType(GvTotalesAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName GvTotalesAnualH.Columns(IndexGv).Visible = True IndexMax = IndexData @@ -925,9 +956,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal If IndexData >= 13 Then If dCoumn.ColumnName.ToEntero > 0 And dCoumn.ColumnName.ToEntero <= DdlEjercicio2.SelectedValue.ToEntero Then + 'HyperLinkField CType(GvGastosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName CType(GvGastosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName + 'CType(GvGastosAnualH.Columns(IndexGv), HyperLinkField).DataNavigateUrlFields = {"CveCuenta", "FechaInicial", "FechaFActual", "CveSubProyecto"} + 'CType(GvGastosAnualH.Columns(IndexGv), HyperLinkField).DataNavigateUrlFormatString = "/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto{3}" + + 'CType(GvGastosAnualH.Columns(IndexGv), BoundField).DataField = dCoumn.ColumnName + 'CType(GvGastosAnualH.Columns(IndexGv), BoundField).HeaderText = dCoumn.ColumnName + GvGastosAnualH.Columns(IndexGv).Visible = True IndexMax = IndexData Else @@ -944,14 +982,14 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Next - For Each dr As DataRow In DtGastosAnualH.FiltraParametros("NOT CtaMayor in (3,4)").Rows + For Each dr As DataRow In DtGastosAnualH.FiltraParametros("Not CtaMayor In (3,4)").Rows TotalActual += dr("ImporteActual").ToString.ToDouble TotalAnterior += dr("ImporteAcumulado").ToString.ToDouble Next IndexData = 13 For IndexData = 13 To IndexMax - Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") + Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)") Next Row.Item("Nombre") = "TOTAL GASTOS" @@ -973,28 +1011,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Row = DTTotalesAnualH.NewRow - 'Row.Item("Enero") = DtIngresosAnualH.SUM("Enero", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Enero", "NOT CtaMayor in (3,4)") - 'Row.Item("Febrero") = DtIngresosAnualH.SUM("Febrero", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Febrero", "NOT CtaMayor in (3,4)") - 'Row.Item("Marzo") = DtIngresosAnualH.SUM("Marzo", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Marzo", "NOT CtaMayor in (3,4)") - 'Row.Item("Abril") = DtIngresosAnualH.SUM("Abril", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Abril", "NOT CtaMayor in (3,4)") - 'Row.Item("Mayo") = DtIngresosAnualH.SUM("Mayo", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Mayo", "NOT CtaMayor in (3,4)") - 'Row.Item("Junio") = DtIngresosAnualH.SUM("Junio", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Junio", "NOT CtaMayor in (3,4)") - 'Row.Item("Julio") = DtIngresosAnualH.SUM("Julio", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Julio", "NOT CtaMayor in (3,4)") - 'Row.Item("Agosto") = DtIngresosAnualH.SUM("Agosto", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Agosto", "NOT CtaMayor in (3,4)") - 'Row.Item("Septiembre") = DtIngresosAnualH.SUM("Septiembre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Septiembre", "NOT CtaMayor in (3,4)") - 'Row.Item("Octubre") = DtIngresosAnualH.SUM("Octubre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Octubre", "NOT CtaMayor in (3,4)") - 'Row.Item("Noviembre") = DtIngresosAnualH.SUM("Noviembre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Noviembre", "NOT CtaMayor in (3,4)") - 'Row.Item("Diciembre") = DtIngresosAnualH.SUM("Diciembre", "NOT CtaMayor in (3,4)") - DtGastosAnualH.SUM("Diciembre", "NOT CtaMayor in (3,4)") IndexData = 13 For IndexData = 13 To IndexMax - Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") + Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") Next - Row.Item("Nombre") = "Resultados del Ejercicio:" + Row.Item("Nombre") = "Resultados del Ejercicio" 'Row.Item("ImporteActual") = TotalActual.ToString 'Row.Item("PorcentajeActual") = "100.00" - Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosAnualH.SUM($"ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") + Row.Item("ImporteAcumulado") = DtIngresosAnualH.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)") - DtGastosAnualH.SUM($"ImporteAcumulado", "Not CtaMayor in (-1,3,4)") 'Row.Item("PorcentajeAcumulado") = "100.00" 'Row.Item("CtaMayor") = -1 @@ -1015,21 +1041,13 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal End Sub - Private Sub SumaTotalesAnualH() - ''Llena Lb´s Totales - ''********************************************************************************* - 'LbTotalActual.Text = TotalActualMes.ToString.FormatoNumero - 'LbTotalAnterior.Text = TotalAnteriorMes.ToString.FormatoNumero - 'LbTotalActual.ForeColor = If(TotalActualMes < 0, Drawing.Color.Red, Color.Black) - 'LbTotalAnterior.ForeColor = If(TotalAnteriorMes < 0, Drawing.Color.Red, Color.Black) - - - End Sub Protected Sub GvIngresosAnualH_RowDataBound(sender As Object, e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then + + If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then TotalActualMes += e.Row.DBCampo("ImporteActual").ToString.ToDouble TotalAnteriorMes += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble @@ -1041,14 +1059,25 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal e.Row.ControlStyle.Font.Bold = True End If - 'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - ' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - 'End If - 'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - ' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - 'End If + Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero + Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero + If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then + + + Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero + Dim IndiceInicio As Integer = 1 + Dim IndiceMax As Integer = 1 + CountDinamico + For IndiceInicio = 1 To IndiceMax + Dim Anio As String = CType(GvGastosAnualH.Columns(IndiceInicio), BoundField).DataField + Dim Importe As String = e.Row.Cells(IndiceInicio).Text + e.Row.Cells(IndiceInicio).Text = $"{Importe}" + Next IndiceInicio + + e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{DdlEjercicio2.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyecto}" + End If + + If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red @@ -1069,14 +1098,22 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal e.Row.ControlStyle.Font.Bold = True End If - 'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - ' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - 'End If + Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero + Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero + If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - 'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - ' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - 'End If + + Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero + Dim IndiceInicio As Integer = 1 + Dim IndiceMax As Integer = 1 + CountDinamico + For IndiceInicio = 1 To IndiceMax + Dim Anio As String = CType(GvGastosAnualH.Columns(IndiceInicio), BoundField).DataField + Dim Importe As String = e.Row.Cells(IndiceInicio).Text + e.Row.Cells(IndiceInicio).Text = $"{Importe}" + Next IndiceInicio + + e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF=31/12/{DdlEjercicio2.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={CveSubProyecto}" + End If If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red @@ -1339,14 +1376,31 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal e.Row.ControlStyle.Font.Size = 13 End If - 'If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - ' e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - ' e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - 'End If - 'If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then - ' e.Row.FCHyperLink("HLActual").ForeColor = Drawing.Color.Red - 'End If + Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero + 'Dim CveSubProyecto As Integer = e.Row.DataKey("CveSubProyecto").ToEntero + If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then + + + Dim CountDinamico As Integer = e.Row.DataKey("CountDinamico").ToEntero + Dim IndiceInicio As Integer = 1 + Dim IndiceMax As Integer = 1 + CountDinamico + + Dim FEchaMesFinal As Date = New Date(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, 1).LastDayOfMonth + + For IndiceInicio = 1 To IndiceMax + + Dim CveSubProyectoIntermo As String = CType(GvGastosSubProyectoH.Columns(IndiceInicio), BoundField).DataField + Dim Importe As String = e.Row.Cells(IndiceInicio).Text + + + + e.Row.Cells(IndiceInicio).Text = $"{Importe}" + Next IndiceInicio + + e.Row.FCHyperLink("HLAnterior").NavigateUrl = $"./RepAnexoCatalogo.aspx?CveCuenta={CveCuenta}&FF={FEchaMesFinal.ToString("dd/MM/yyyy")}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={-1}" + + End If If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red diff --git a/vwd.webinfo b/vwd.webinfo index 1d2829323..c9e193dc4 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -44,6 +44,10 @@ + + + + From 2e80d4cb9d2faf4100acd2c6a9c59e622c6b76de Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 6 Apr 2020 14:55:14 -0700 Subject: [PATCH 3/4] Ir al punto de venta si es remision en bdh --- Ventas/PopUpBuscarFolio.aspx | 3 +++ Ventas/PopUpBuscarFolio.aspx.vb | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Ventas/PopUpBuscarFolio.aspx b/Ventas/PopUpBuscarFolio.aspx index e05a1490b..a725c5285 100644 --- a/Ventas/PopUpBuscarFolio.aspx +++ b/Ventas/PopUpBuscarFolio.aspx @@ -269,6 +269,9 @@ function Ir(v) { gotourl('/Ventas/Ventas.aspx?CveVenta=' + v); } + function IrPV(v) { + gotourl('/Ventas/PV.aspx?CveVenta=' + v); + } Sys.Application.add_load(function (s, e) { }); diff --git a/Ventas/PopUpBuscarFolio.aspx.vb b/Ventas/PopUpBuscarFolio.aspx.vb index 744463516..04777e43d 100644 --- a/Ventas/PopUpBuscarFolio.aspx.vb +++ b/Ventas/PopUpBuscarFolio.aspx.vb @@ -159,6 +159,10 @@ Partial Class PopUpBuscarFolio e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right Dim Liga As String = String.Format("", e.Row.DBCampo("CveVenta")) + If UsuarioActual.CveEmpresa = 140 AndAlso e.Row.DBCampo("TipoDocto").Contiene("Rem") Then + Liga = String.Format("", e.Row.DBCampo("CveVenta")) + End If + e.Row.FCLiteral("LtlTipo").Text = String.Format("", Liga, e.Row.DBCampo("TipoDocto")) e.Row.FCLiteral("LtlFolio").Text = String.Format("
{0}{1}
", Liga, e.Row.DBCampo("Folio")) e.Row.FCLiteral("LtlFecha").Text = String.Format("
{0}{1}
", Liga, e.Row.DBCampo("Fecha").ToDate.ToShortDateString) From edb6ee294b4461c6ca001c3a6847979d68143a37 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 6 Apr 2020 18:02:57 -0700 Subject: [PATCH 4/4] Factura para econo con rpt --- App_Code/DtDatos.xsd | 16 ++++++++++++++++ App_Code/DtDatos.xss | 25 +++++++++++++------------ 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/App_Code/DtDatos.xsd b/App_Code/DtDatos.xsd index 50aca8dd6..2d4df0230 100644 --- a/App_Code/DtDatos.xsd +++ b/App_Code/DtDatos.xsd @@ -261,6 +261,22 @@ + + + + + + + + + + + + + + + + diff --git a/App_Code/DtDatos.xss b/App_Code/DtDatos.xss index daabedb14..d278af616 100644 --- a/App_Code/DtDatos.xss +++ b/App_Code/DtDatos.xss @@ -6,18 +6,19 @@ --> - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file