From d21e641c8f4f212a94c7711ff9f5cc09c8a49266 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 26 Jul 2021 18:35:05 -0700 Subject: [PATCH 01/31] -- gridview con productos que coinciden --- Inventarios/RepAnomalias.aspx | 44 ++++++++++++++++++++++++++++++++ Inventarios/RepAnomalias.aspx.vb | 13 ++++++++++ 2 files changed, 57 insertions(+) diff --git a/Inventarios/RepAnomalias.aspx b/Inventarios/RepAnomalias.aspx index 1b930ed61..3b7ee3bef 100644 --- a/Inventarios/RepAnomalias.aspx +++ b/Inventarios/RepAnomalias.aspx @@ -304,6 +304,50 @@ +
+
+ +
+
+ Número de registros: +
+
+ " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Inventarios/RepAnomalias.aspx.vb b/Inventarios/RepAnomalias.aspx.vb index ad367eea6..6935e4ef9 100644 --- a/Inventarios/RepAnomalias.aspx.vb +++ b/Inventarios/RepAnomalias.aspx.vb @@ -187,6 +187,11 @@ Partial Class Inventarios_RepAnomalias GvF.DataBind() BanderaSerieLoteCad(GvF, DtF) + Dim DtC As DataTable = dt.FiltraParametros("Diferencia = 0") + GvC.DataSource = DtC + GvC.DataBind() + BanderaSerieLoteCad(GvC, DtC) + Dim Script = "" If (GvF.Rows.Count > 0) Then GvF.UseAccessibleHeader = True @@ -204,6 +209,14 @@ Partial Class Inventarios_RepAnomalias LtlTotalRegistrosSobran.Text = GvS.Rows.Count.ToString End If + If (GvC.Rows.Count > 0) Then + GvC.UseAccessibleHeader = True + GvC.HeaderRow.TableSection = TableRowSection.TableHeader + Script += "OrdenarGVS();" + divRegistradosCoinciden.Visible = True + LtlCoincidentes.Text = GvC.Rows.Count.ToString + End If + PSIguales() RegistraScript(Script) From d0c1afa9c0710f66ee8db4e6fbe71c940886a945 Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 27 Jul 2021 18:31:16 -0700 Subject: [PATCH 02/31] --- App_Code/ClsInventarios.vb | 98 +- Bancos/Devoluciones.aspx | 62 +- Bancos/Devoluciones.aspx.cs | 201 +- Empresas/166/Formatos/Cotizacion.rdlc | 3746 +++++++++++++++ Empresas/166/Formatos/Factura.rdlc | 6262 +++++++++++++++++++++++++ Inventarios/InventarioFisico.aspx | 75 +- Inventarios/InventarioFisico.aspx.vb | 159 +- OC/OC.aspx.vb | 258 +- 8 files changed, 10679 insertions(+), 182 deletions(-) create mode 100644 Empresas/166/Formatos/Cotizacion.rdlc create mode 100644 Empresas/166/Formatos/Factura.rdlc diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 39ebe63e7..2c8d4284b 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2176,7 +2176,7 @@ Public Class ClsInventarios #Region " INVENTARIOS - INVENTARIO FISICO " - Public Function AddInventarioFisico(CveEmpresa As Integer, InventarioFisico As String, Observaciones As String, Estatus As Integer, CveSubProyecto As Integer) As Boolean + Public Function AddInventarioFisico(CveEmpresa As Integer, InventarioFisico As String, Observaciones As String, Estatus As Integer, CveSubProyecto As Integer, Optional ConAplicacion As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoAdd") @@ -2186,6 +2186,7 @@ Public Class ClsInventarios .Add("@InventarioFisico", SqlDbType.VarChar).Value = InventarioFisico .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@Estatus", SqlDbType.Int).Value = Estatus + .Add("@ConAplicacion", SqlDbType.Int).Value = If(ConAplicacion, 1, 0) .Add("@CveInventarioFisico", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -2582,6 +2583,101 @@ Public Class ClsInventarios Return Retorno End Function + Public Function GetInventarioFisicoDetallesUsuarios(CveInventarioFisico As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Inv_InventarioFisicoDetallesUsuariosGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al obtener los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al obtener llos usuarios del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function AddInventarioFisicoUsuarios(CveInventarioFisico As Integer, CveUsuario As Integer, Incluye As Boolean, Cerrado As Boolean, Bloqueado As Boolean) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Inv_InventarioFisicoUsuariosAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Incluye", SqlDbType.Bit).Value = If(Incluye, 1, 0) + .Add("@Cerrado", SqlDbType.Bit).Value = If(Cerrado, 1, 0) + .Add("@Bloqueado", SqlDbType.Bit).Value = If(Bloqueado, 1, 0) + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al guardar los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al guardar los usuarios del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + + Public Function RemoveInventarioFisicoUsuarios(CveInventarioFisico As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Inv_InventarioFisicoUsuariosRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al eliminar los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al eliminar los usuarios servicio del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function UpdateInventarioFisicoUsuarios(CveInventarioFisico As Integer, CveUsuario As Integer, Cerrado As Boolean, Bloqueado As Boolean) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_Inv_InventarioFisicoUsuariosUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Cerrado", SqlDbType.Bit).Value = Cerrado + .Add("@Bloqueado", SqlDbType.Bit).Value = Bloqueado + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al eliminar los usuarios del inventario fisico.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al eliminar los usuarios servicio del inventario fisico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function GetInventarioFisicoDetallesProveedores(CveInventarioFisico As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/Bancos/Devoluciones.aspx b/Bancos/Devoluciones.aspx index 5bacecb2b..2e7b1a6a3 100644 --- a/Bancos/Devoluciones.aspx +++ b/Bancos/Devoluciones.aspx @@ -60,8 +60,16 @@
- -
+
+
+
+ + + + +
+
+
@@ -180,7 +188,49 @@
-
+
+
+
+
+ + +
+
+ +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+
+
+ +
@@ -189,6 +239,9 @@
+ + +
@@ -275,7 +328,6 @@ diff --git a/Nomina/CatPeriodos.aspx.vb b/Nomina/CatPeriodos.aspx.vb index a2fff6cc9..9703cb742 100644 --- a/Nomina/CatPeriodos.aspx.vb +++ b/Nomina/CatPeriodos.aspx.vb @@ -7,25 +7,33 @@ Imports Extensiones Partial Class Nomina_CatPeriodos Inherits ClsPaginas - - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + Private Property Comando As String + Get + Return ViewState("Comando").ToString + End Get + Set(value As String) + ViewState("Comando") = value + End Set + End Property + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then ViewState("Orden") = "" - CargaDatos() - CargaTipoPeriodo() + CargaTipoPeriodo() + cargaEjercicios() + CargaDatos() - ''Permiso Registro - 'If PermisoRegistro Then - ' LbAgregar.Enabled = True - 'Else - ' LbAgregar.Enabled = False - 'End If - End If + ''Permiso Registro + 'If PermisoRegistro Then + ' LbAgregar.Enabled = True + 'Else + ' LbAgregar.Enabled = False + 'End If + End If End Sub Public Sub CargaDatos() Dim ObjNom_Periodos As New ClsNominas - If ObjNom_Periodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, Now.Year, -1, -1) Then + If ObjNom_Periodos.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlEjercicio.SelectedValue.ToEntero, -1, -1, DdlEstatus.SelectedValue.ToEntero) Then ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados @@ -42,44 +50,27 @@ Partial Class Nomina_CatPeriodos End If End Sub - Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click - Dim ObjNom_Periodos As New ClsNominas - Dim Numero As Integer = TxtNumero.Text.Trim.ToEntero - Dim EsInicioMes As Boolean = ChkEsInicioMes.Checked - Dim EsFinMes As Boolean = ChkEsFinMes.Checked - Dim EsInicioSS As Boolean = CBool(ChkEsInicioSS.Checked) - Dim EsFinSS As Boolean = ChkEsFinSS.Checked - Dim EsInicioAño As Boolean = ChkEsInicioAño.Checked - Dim EsFinAño As Boolean = ChkEsFinAño.Checked - Dim FueCalculado As Boolean = ChkFueCalculado.Checked - Dim FechaInicio As Date = TxtFechaInicio.Text.Trim.ToDate - Dim FechaFin As Date = TxtFechaFin.Text.Trim.ToDate - Dim Mes As Integer = FechaFin.Month - Dim Ejercicio As Integer = FechaFin.Year - Dim CveTipoPeriodo As Integer = DdlTipoPeriodo.SelectedValue.ToEntero - Dim Estatus As Integer = DdlEstatus.SelectedValue.ToEntero - - If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, ChkEsInicioSS.Checked, ChkEsFinAño.Checked, ChkEsInicioAño.Checked, ChkEsFinAño.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then - - Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion) - UpDatos.Update() - ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados - CargaDatos() - If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then - CargaGrid(ViewState("Orden").ToString()) - Else - CargaGrid("") - End If - - End If - 'ObjNom_Periodos.Dispose() - End Sub #Region " C O M B O S" Private Sub CargaTipoPeriodo() DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo + DdlTipoPeriodoAdd.DataSource = GlobalDTTipoPeriodo + DdlTipoPeriodo.DataBind() + DdlTipoPeriodoAdd.DataBind() + End Sub + + Private Sub cargaEjercicios() + Dim objconta As New ClsContabilidad + If objconta.GetEjercicios(UsuarioActual.CveEmpresa) Then + DdlEjercicio.DataSource = objconta.DtResultados + Else + DdlEjercicio.DataSource = Nothing + End If + objconta.Dispose() + DdlEjercicio.DataBind() + DdlEjercicio.Items.Insert(0, New ListItem("Todos", "-1")) + End Sub #End Region @@ -120,12 +111,23 @@ Partial Class Nomina_CatPeriodos e.Row.Cells(12).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(13).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(14).HorizontalAlign = HorizontalAlign.Center - If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then - e.Row.FCDropDownList("DdlTipoPeriodo").DataSource = GlobalDTTipoPeriodo - e.Row.FCDropDownList("DdlTipoPeriodo").DataBind() - e.Row.FCDropDownList("DdlTipoPeriodo").SelectedValue = e.Row.DBCampo("CveTipoPeriodo") - e.Row.FCDropDownList("DdlEstatus").SelectedItem.Text = e.Row.DBCampo("Estatus") + + e.Row.FCCheckBox("ChkEsInicioMes").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioMes").ToString) + e.Row.FCCheckBox("ChkEsFinMes").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinMes").ToString) + e.Row.FCCheckBox("ChkEsInicioSS").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioSS").ToString) + e.Row.FCCheckBox("ChkEsFinSS").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinSS").ToString) + e.Row.FCCheckBox("ChkEsInicioAño").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioAño").ToString) + e.Row.FCCheckBox("ChkEsFinAño").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinAño").ToString) + e.Row.FCCheckBox("ChkFueCalculado").Checked = Convert.ToBoolean(e.Row.DataKey("FueCalculado").ToString) + + If e.Row.DataKey("Estatus").ToString.ToEntero = 1 Then + e.Row.FCLiteral("LtlEstatus").Text = "Actual" + ElseIf e.Row.DataKey("Estatus").ToString.ToEntero = 2 Or e.Row.DataKey("Estatus").ToString.ToEntero = 3 Then + e.Row.FCLiteral("LtlEstatus").Text = "Cerrado" + Else + e.Row.FCLiteral("LtlEstatus").Text = "" End If + End If End Sub @@ -156,51 +158,7 @@ Partial Class Nomina_CatPeriodos End If End Sub - Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating - Dim ObjNom_Periodos As New ClsNominas - Dim Numero As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtNumero"), TextBox).Text.Trim.ToEntero - Dim EsInicioMes As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsInicioMes").Checked - Dim EsFinMes As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsFinMes").Checked - Dim EsInicioSS As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsInicioSS").Checked - Dim EsFinSS As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsFinSS").Checked - Dim EsInicioAño As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsInicioAño").Checked - Dim EsFinAño As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsFinAño").Checked - Dim FueCalculado As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkFueCalculado").Checked - Dim FechaInicio As Date = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtFechaInicio"), TextBox).Text.Trim.ToDateTime - Dim FechaFin As Date = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtFechaFin"), TextBox).Text.Trim.ToDateTime - Dim Mes As Integer = FechaFin.Month - Dim Ejercicio As Integer = FechaFin.Year - Dim CveTipoPeriodo As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlTipoPeriodo"), DropDownList).SelectedValue.ToEntero - Dim Estatus As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlEstatus"), DropDownList).SelectedValue.ToEntero - Dim CvePeriodo As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero - - If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, - CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa) Then - GvDatos.EditIndex = -1 - ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados - Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) - End If - - ObjNom_Periodos.Dispose() - - If ViewState("Orden").ToString() <> String.Empty Then - CargaGrid(ViewState("Orden").ToString()) - Else - CargaGrid("") - End If - - End Sub - - Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing - GvDatos.EditIndex = e.NewEditIndex - If ViewState("Orden").ToString() <> String.Empty Then - CargaGrid(ViewState("Orden").ToString()) - Else - CargaGrid("") - End If - End Sub #End Region #Region "O R D E N A M I E N T O" @@ -239,4 +197,151 @@ Partial Class Nomina_CatPeriodos UpDatos.Update() End Sub #End Region + + Private Sub LnkAddPeriodo_Click(sender As Object, e As EventArgs) Handles LnkAddPeriodo.Click + LimpiarModal() + Comando = "Agregar" + lblTiulomodal.Text = "Agregar Periodo" + RegistraScript("$('#divAddPeriodo').modal('show');") + End Sub + Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregar.Click + Dim ObjNom_Periodos As New ClsNominas + + Dim EsInicioMes As Boolean + Dim EsFinMes As Boolean + Dim EsInicioSS As Boolean + Dim EsFinSS As Boolean + Dim EsInicioAño As Boolean + Dim EsFinAño As Boolean + Dim FueCalculado As Boolean + Dim Numero As Integer = TxtNumeroAdd.Text.Trim.ToEntero + Dim FechaInicio As Date = TxtFechaInicioAdd.Text.Trim.ToDate + Dim FechaFin As Date = TxtFechaFinAdd.Text.Trim.ToDate + Dim Mes As Integer = FechaFin.Month + Dim Ejercicio As Integer = FechaFin.Year + Dim CveTipoPeriodo As Integer = DdlTipoPeriodoAdd.SelectedValue.ToEntero + Dim Estatus As Integer = DdlEstatusAdd.SelectedValue.ToEntero + Dim CvePeriodo As Integer = hdnCvePerido.Value.ToEntero + + For Each item As ListItem In CBLchk.Items + Select Case item.Value.ToEntero() + Case 1 + If item.Selected Then EsInicioMes = True Else EsInicioMes = False + Case 2 + If item.Selected Then EsFinMes = True Else EsFinMes = False + Case 3 + If item.Selected Then EsInicioSS = True Else EsInicioSS = False + Case 4 + If item.Selected Then EsFinSS = True Else EsFinSS = False + Case 5 + If item.Selected Then EsInicioAño = True Else EsInicioAño = False + Case 6 + If item.Selected Then EsFinAño = True Else EsFinAño = False + Case 7 + If item.Selected Then FueCalculado = True Else FueCalculado = False + End Select + Next + If Comando = "Agregar" Then + + If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + + Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion) + UpDatos.Update() + ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados + CargaDatos() + If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then + CargaGrid(ViewState("Orden").ToString()) + Else + CargaGrid("") + End If + + End If + ElseIf Comando = "Actualizar" Then + + If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa) Then + + Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) + UpDatos.Update() + ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados + CargaDatos() + If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then + CargaGrid(ViewState("Orden").ToString()) + Else + CargaGrid("") + End If + End If + + End If + + + RegistraScript("$('#divAddPeriodo').modal('hide');") + + 'ObjNom_Periodos.Dispose() + End Sub + + Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click + CargaDatos() + End Sub + Protected Sub LnkEditar_Click(sender As Object, e As EventArgs) + LimpiarModal() + Comando = "Actualizar" + lblTiulomodal.Text = "Actualizar Periodo" + Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) + DdlTipoPeriodoAdd.SelectedValueExist(GvRow.DataKey("CveTipoPeriodo").ToString.ToEntero) + TxtNumeroAdd.Text = GvRow.DataKey("Numero").ToString + TxtFechaInicioAdd.Text = GvRow.DataKey("FechaInicio").ToString + TxtFechaFinAdd.Text = GvRow.DataKey("FechaFin").ToString + DdlEstatusAdd.SelectedValueExist(GvRow.DataKey("Estatus").ToString.ToEntero) + hdnCvePerido.Value = GvRow.DataKey("CvePeriodo").ToString + For Each item As ListItem In CBLchk.Items + Select Case item.Value.ToEntero() + Case 1 + item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioMes").ToString) + Case 2 + item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinMes").ToString) + Case 3 + item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioSS").ToString) + Case 4 + item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinSS").ToString) + Case 5 + item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioAño").ToString) + Case 6 + item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinAño").ToString) + Case 7 + item.Selected = Convert.ToBoolean(GvRow.DataKey("FueCalculado").ToString) + End Select + Next + UpModalPerido.Update() + + RegistraScript("$('#divAddPeriodo').modal('show')") + End Sub + + Private Sub LimpiarModal() + DdlTipoPeriodoAdd.SelectedValueExist(-1) + TxtNumeroAdd.Text = "" + TxtFechaInicioAdd.Text = "" + TxtFechaFinAdd.Text = "" + DdlEstatusAdd.SelectedValueExist(-1) + For Each item As ListItem In CBLchk.Items + Select Case item.Value.ToEntero() + Case 1 + item.Selected = False + Case 2 + item.Selected = False + Case 3 + item.Selected = False + Case 4 + item.Selected = False + Case 5 + item.Selected = False + Case 6 + item.Selected = False + Case 7 + item.Selected = False + End Select + Next + UpModalPerido.Update() + End Sub End Class From 5772bdf068ee8ffbe67d450bd6de3bc2ac2b1996 Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 30 Jul 2021 16:37:31 -0700 Subject: [PATCH 29/31] cambio en ejercicios --- Nomina/CatPeriodos.aspx.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Nomina/CatPeriodos.aspx.vb b/Nomina/CatPeriodos.aspx.vb index 9703cb742..5ce0f941e 100644 --- a/Nomina/CatPeriodos.aspx.vb +++ b/Nomina/CatPeriodos.aspx.vb @@ -61,13 +61,13 @@ Partial Class Nomina_CatPeriodos End Sub Private Sub cargaEjercicios() - Dim objconta As New ClsContabilidad - If objconta.GetEjercicios(UsuarioActual.CveEmpresa) Then - DdlEjercicio.DataSource = objconta.DtResultados + Dim ObjNom_Periodos As New ClsNominas + If ObjNom_Periodos.GetEjercicios(UsuarioActual.CveEmpresa) Then + DdlEjercicio.DataSource = ObjNom_Periodos.DtResultados Else DdlEjercicio.DataSource = Nothing End If - objconta.Dispose() + ObjNom_Periodos.Dispose() DdlEjercicio.DataBind() DdlEjercicio.Items.Insert(0, New ListItem("Todos", "-1")) From b5b497430054fe5b5d3fdfe634cb58b56e37c0d0 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 30 Jul 2021 20:41:43 -0700 Subject: [PATCH 30/31] GvPS se agrega columna de porcentaje de IEPS --- Compras/Compras.aspx | 28 +++++++++++++++++++--------- Compras/Compras.aspx.vb | 19 ++++++++++--------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index f25ecfa5d..90b1948f5 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -689,6 +689,7 @@ P.U.  % IVA  + % IEPS  Total 
¿No Deducible?  @@ -792,53 +793,62 @@ - <%-- 9 --%> - + <%-- 9 --%> + + + + + + + <%-- 10 --%> + + + <%-- 11 --%> - <%-- 11 --%> + <%-- 12 --%> - <%-- 12 --%> + <%-- 13 --%> - <%-- 13 --%> + <%-- 14 --%> - <%-- 14 --%> + <%-- 15 --%> - <%-- 15 --%> + <%-- 16 --%> - <%-- 16 --%> + <%-- 17 --%> - <%-- 17 --%> + <%-- 18 --%> diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index f0e41fc77..6b1c3d08d 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -11022,11 +11022,12 @@ Partial Class Compras_Compras 'e.Row.Cells(11).Width = Unit.Pixel(43) If UsuarioActual.Empresa.UsaAC Then 'AndAlso (CveFactura > 0 Or CveCompra > 0) - e.Row.Cells(12).Width = Unit.Pixel(150) e.Row.Cells(13).Width = Unit.Pixel(150) e.Row.Cells(14).Width = Unit.Pixel(150) e.Row.Cells(15).Width = Unit.Pixel(150) - e.Row.Cells(16).Width = Unit.Pixel(100) + e.Row.Cells(16).Width = Unit.Pixel(150) + e.Row.Cells(17).Width = Unit.Pixel(150) + e.Row.Cells(18).Width = Unit.Pixel(100) End If End If @@ -11127,11 +11128,11 @@ Partial Class Compras_Compras 'CargaPresupuestosEgresos If UsuarioActual.Empresa.UsaAC Then - e.Row.Cells(13).Visible = True e.Row.Cells(14).Visible = True e.Row.Cells(15).Visible = True e.Row.Cells(16).Visible = True e.Row.Cells(17).Visible = True + e.Row.Cells(18).Visible = True e.Row.FCDropDownList("DdlAC1").Items.Clear() e.Row.FCDropDownList("DdlAC1").DataSource = DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveProgramaOperativo", "ProgramaOperativo"}) @@ -11162,19 +11163,19 @@ Partial Class Compras_Compras 'SI EL PRESUPUESTO DE EGRESOS VIENE DESDE LA OC, SE BLOQUEA PE If e.Row.DBCampo("CveOrdenCompraDetalle").ToEntero > 0 AndAlso e.Row.DBCampo("CvePresupuestoEgreso").ToEntero > 0 Then - e.Row.Cells(13).Enabled = False e.Row.Cells(14).Enabled = False e.Row.Cells(15).Enabled = False e.Row.Cells(16).Enabled = False e.Row.Cells(17).Enabled = False + e.Row.Cells(18).Enabled = False End If Else - e.Row.Cells(13).Visible = False e.Row.Cells(14).Visible = False e.Row.Cells(15).Visible = False e.Row.Cells(16).Visible = False e.Row.Cells(17).Visible = False + e.Row.Cells(18).Visible = False End If End If @@ -13291,11 +13292,11 @@ Partial Class Compras_Compras 'Seccion Grid GvPS.Width = 1760 - GvPS.Columns(12).Visible = True GvPS.Columns(13).Visible = True GvPS.Columns(14).Visible = True GvPS.Columns(15).Visible = True GvPS.Columns(16).Visible = True + GvPS.Columns(17).Visible = True 'Panel General UpPresupuestosAC.Visible = True @@ -17506,7 +17507,7 @@ Partial Class Compras_Compras CargaRetISRConcepto() Dim NumNoDed As Integer = TmpDT.COUNT("CvePS", "NoDeducible = True ") - If NumNoDed > 0 Then GvPS.Columns(10).Visible = True 'visualiza columnas de nodeducibles + If NumNoDed > 0 Then GvPS.Columns(11).Visible = True 'visualiza columnas de nodeducibles If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then InicializaAplicaNCFact() @@ -20506,12 +20507,12 @@ Partial Class Compras_Compras If ChkEsNoDeducible.Checked Then EsNoDeducible = True dvNoDeducible.Visible = True - GvPS.Columns(10).Visible = True + GvPS.Columns(11).Visible = True UpEsNoDeduciblePS.Visible = True Else EsNoDeducible = False dvNoDeducible.Visible = False - GvPS.Columns(10).Visible = False + GvPS.Columns(11).Visible = False UpEsNoDeduciblePS.Visible = False End If 'DivEsNoDeducible.Visible = False From a25faf66d709cb1b1115bac2646bcba48d724253 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 31 Jul 2021 00:41:38 -0700 Subject: [PATCH 31/31] valida IEPSPorcentaje nulo --- Compras/Compras.aspx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 90b1948f5..ca2f18d1d 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -687,9 +687,9 @@
- P.U.  - % IVA  - % IEPS  + P.U.  + % IVA  + % IEPS  Total 
¿No Deducible?  @@ -788,15 +788,16 @@ <%-- 7 --%> <%-- 8 --%> - + <%-- 9 --%> - - - + + + + <%----%>