From c31724b338e6f2d6e5acdca451e2fc1719ff0af5 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Fri, 16 Apr 2021 09:49:45 -0700 Subject: [PATCH 1/6] --- App_Code/ClsGenerales.vb | 36 ++++++++++++- App_Code/ClsNominas.vb | 35 +++++++++++++ App_Code/modExtensiones.vb | 4 +- Nomina/Nomina2.aspx | 87 ++++++++++++++++++++++++++++++-- Nomina/Nomina2.aspx.cs | 100 +++++++++++++++++++++++++++++++++++++ RH/Personal.aspx | 48 +++++++++++------- RH/Personal.aspx.vb | 56 ++++++++++++++++++--- 7 files changed, 332 insertions(+), 34 deletions(-) diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 59017b394..353146e49 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -1592,7 +1592,41 @@ Public Class ClsGenerales End Try Return Retorno - End Function + End Function + + Public Function UpdateCuentasDepositosPersonal(CveCuentaDeposito As Integer, BancoNombre As String, Cuenta As String, CLABE As String, CveMoneda As Integer, CveUsuarioModifico As Integer, EstatusPagoElectronico As Boolean, Estatus As Boolean, CveSATBanco As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Gral_CuentasDepositosPersonalUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito + .Add("@BancoNombre", SqlDbType.VarChar).Value = BancoNombre + .Add("@Cuenta", SqlDbType.VarChar).Value = Cuenta + .Add("@CLABE", SqlDbType.VarChar).Value = CLABE + .Add("@Estatus", SqlDbType.VarChar).Value = Estatus + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico + .Add("@Correo", SqlDbType.VarChar).Value = Correo + .Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico + .Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + If Ex1.Message.Contains("Número: 2627;") Then + Alert("Ya existe un registro con el mismo nombre", TipoMensaje.MsgAdvertencia) + Else + Me.OnError("Ocurrió un error al guardar los cambios", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + Catch ex As Exception + OnError("Ocurrió un error al guardar los cambios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function UpdateCuentasDepositos(CveCuentaDeposito As Integer, BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "", diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 32d650303..fa2e30bf1 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -198,6 +198,41 @@ Public Class ClsNominas End Function + Public Function ReportedeincidenciasGET(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean + Dim retorno As Boolean = False + DTSet = New DataSet() + DataAdapter("PA_RH_ReportedeincidenciasGET", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + .Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo + End With + Try + SqlAdapter.Fill(DTSet) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de incidencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function ReportedeAcumuladosGET(cveEmpresa As Integer, Periodo As Integer, CveTipoPeriodo As Integer) As Boolean + Dim retorno As Boolean = False + DTSet = New DataSet() + DataAdapter("PA_RH_ReportedeAcumuladosGET", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Periodo", SqlDbType.Int).Value = Periodo + .Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo + End With + Try + SqlAdapter.Fill(DTSet) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de acumulados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function GetCalculoAguinaldo(ejercicio As Int32, cveEmpresa As Int32, importe As Double, CveTipoPeriodo As Integer, CvePeriodo As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_NomCalcularAguinaldo", CommandType.StoredProcedure) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index fbe97480e..95db7694d 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -577,8 +577,8 @@ Namespace Extensiones Else Return CDbl(Obj(key)) End If - End Function - + End Function + Public Function ToEntero(Obj As Object) As Integer diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index 27158a68e..881dcec31 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -159,6 +159,12 @@
  • Timbrar todos
  • +
  • + Incidencias asistencia +
  • +
  • + Reporte acumulados +
  • Empleado concepto
  • @@ -197,7 +203,7 @@ - + @@ -1123,7 +1129,7 @@
    - + - + <%----%> <%-- --%> @@ -1546,7 +1552,7 @@
    - Actualizar + Actualizar
    @@ -1949,7 +1955,80 @@ + + -
    - - - - - -
    -
    - - - -
    -
    - - - +
    +
    + + + + + +
    +
    + + + +
    +
    + + + +
    @@ -3959,12 +3964,17 @@
    -
    - +
    + +
    +
    +
    +
    diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 4617e3a44..7270d7c3f 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -88,6 +88,18 @@ Partial Class RH_Personal ViewState("Documentacion") = value End Set End Property + Property CveCuentaDeposito As Integer + Get + If ViewState("CveCuentaDeposito") Is Nothing Then + Return -1 + Else + Return DirectCast(ViewState("CveCuentaDeposito"), Integer) + End If + End Get + Set(value As Integer) + ViewState("CveCuentaDeposito") = value + End Set + End Property Property CveDocumentacion As Integer Get If ViewState("CveDocumentacion") Is Nothing Then @@ -2890,11 +2902,23 @@ Partial Class RH_Personal End Sub Protected Sub Lnkopenaddcuentabancaria_Click(sender As Object, e As EventArgs) - BtnAgregarCuentaBanco.Visible = False + BtnActualizarCuentaBanco.Visible = False BtnAgregarCuentaBanco.Visible = True RegistraScript("$('#DivCuentasVancarias').modal();") End Sub + + Protected Sub LbActualizarCuentaBanco_Click(sender As Object, e As EventArgs) + Using ObjCuentasBancos As New ClsGenerales + Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text + If ObjCuentasBancos.UpdateCuentasDepositosPersonal(CveCuentaDeposito, nombrebanco, TxtNumeroCuenta.Text, TxtCLABECB.Text, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario, ChkEstatusPagoE.Checked, ChkEstatuscuenta.Checked, DdlBancoSat.SelectedValue.ToEntero()) Then + 'UpdateCuentasDepositosPersonal(CveCuentaDeposito As Integer, BancoNombre As String, Cuenta As String, CLABE As String, CveMoneda As Integer, CveUsuarioModifico As Integer, EstatusPagoElectronico As Boolean, Estatus As Boolean, CveSATBanco As Integer) As Boolean + Alert("Cuenta actualizada") + End If + End Using + CargaCuentasBancarias() + RegistraScript("$('#DivCuentasVancarias').modal('hide');") + End Sub Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs) Dim EsBancomer = False Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text @@ -2938,7 +2962,7 @@ Partial Class RH_Personal ' Exit Sub 'End If - AgregarCuentaBanco(nombrebanco, "", TxtCLABECB.Text.Trim, "", "", TxtNumeroCuenta.Text.Trim, "", "", DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, "", DdlBancoSat.SelectedValue.ToEntero()) + AgregarCuentaBanco(nombrebanco, "", TxtCLABECB.Text.Trim, "", "", TxtNumeroCuenta.Text.Trim, "", "", DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, "", DdlBancoSat.SelectedValue.ToEntero(), ChkEstatusPagoE.Checked) RegistraScript("$('#DivCuentasVancarias').modal('hide');") End Sub Private Sub CargaGridCuentasBancos(Orden As String) @@ -2963,13 +2987,13 @@ Partial Class RH_Personal GvBancosCuentas.DataBind() UpCuentasBancos.Update() End Sub - Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, CveMoneda As Integer, Moneda As String, BBVAAlias As String, CveSATBanco As Integer) + Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, CveMoneda As Integer, Moneda As String, BBVAAlias As String, CveSATBanco As Integer, EstatusPagoElectronico As Boolean) Dim Row As DataRow If CvePersonal > 0 Then Dim ObjCuentasBancos As New ClsGenerales - If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco) Then + If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal))) @@ -2991,7 +3015,7 @@ Partial Class RH_Personal Row("Referencia") = Referencia Row("CveMoneda") = CveMoneda Row("Moneda") = Moneda - Row("EstatusPagoElectronico") = False + Row("EstatusPagoElectronico") = EstatusPagoElectronico TempDTCuentasBancos.Rows.Add(Row) End If @@ -3062,8 +3086,22 @@ Partial Class RH_Personal End If End Sub Protected Sub GvBancosCuentas_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvBancosCuentas.RowEditing - GvBancosCuentas.EditIndex = e.NewEditIndex - CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) + Dim gvrow As GridViewRow = GvBancosCuentas.Rows(e.NewEditIndex) 'DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + BtnActualizarCuentaBanco.Visible = True + BtnAgregarCuentaBanco.Visible = False + 'CveCuentaDeposito,CveSATBanco,Cuenta,CLABE,EstatusPagoElectronico,CveMoneda + CveCuentaDeposito = gvrow.DataKey("CveCuentaDeposito").ToEntero() + DdlBancoSat.SelectedValueExist(gvrow.DataKey("CveSATBanco")) + DdlMoneda.SelectedValueExist(gvrow.DataKey("CveMoneda")) + TxtNumeroCuenta.Text = gvrow.DataKey("Cuenta") + TxtCLABECB.Text = gvrow.DataKey("CLABE") + ChkEstatusPagoE.Checked = gvrow.DataKey("EstatusPagoElectronico").ToUpper().Contiene("TRUE", "1") + ChkEstatuscuenta.Checked = gvrow.DataKey("EstatusTexto").ToUpper().Contiene("TRUE", "1", "ACTIVO") + UpCuentasVancarias.Update() + RegistraScript("$('#DivCuentasVancarias').modal();") + + 'GvBancosCuentas.EditIndex = e.NewEditIndex + 'CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) End Sub Protected Sub GvBancosCuentas_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvBancosCuentas.RowCancelingEdit GvBancosCuentas.EditIndex = -1 @@ -3080,6 +3118,8 @@ Partial Class RH_Personal Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked + Dim EstatusPagoElectronico = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked + Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text Dim BBVAAlias As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtBBVAAlias").Text @@ -3134,7 +3174,7 @@ Partial Class RH_Personal End If Dim ObjCuentasBancos As New ClsGenerales If CvePersonal > 0 Then - If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias) Then + If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString().ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal))) Alert("Cuenta actualizada con exito.", TipoMensaje.MsgInformacion) From cc8543d795ae076b9e3be50d1ea5bf3653db8b46 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Fri, 16 Apr 2021 17:51:03 -0700 Subject: [PATCH 2/6] Permitir comision positivas mayores --- Bancos/DepositosCaja.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 2619da69f..a343d0e94 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -247,7 +247,7 @@ if (comision2 < 0) { comisionNegativa = comision2 * -1 } - if (comision2 > ValorTotalSeleccionado || comisionNegativa > ValorTotalSeleccionado) { + if (comisionNegativa > ValorTotalSeleccionado) { $('#C_TxtComision').val(comision) alert("No es posible poner una comision superior a lo seleccionado") } else { From bc7d49260019ef39ccc31abbc576794be40875f4 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Fri, 16 Apr 2021 17:51:25 -0700 Subject: [PATCH 3/6] Fecha Documento no menor a 4 meses --- Bancos/ProveedoresAbonar.aspx | 2 ++ Bancos/ProveedoresAbonar.aspx.vb | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index 768463a0b..01b768cda 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -122,6 +122,8 @@ + + diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 3dd2dfad1..c11b25731 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -389,7 +389,7 @@ Partial Class Bancos_ProveedoresAbonar If UsuarioActual.TienePermisoProceso(98) Then PermiteModificarImporte = False End If - Calendario.StartDate = Now.AddMonths(-2) + Calendario.StartDate = Now.AddMonths(-4) 'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes If UsuarioActual.TienePermisoProceso(105) Then Calendario.StartDate = Now @@ -3391,6 +3391,7 @@ Partial Class Bancos_ProveedoresAbonar Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString + RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-4).ToShortDateString Calendario.EndDate = DateTime.Now End Sub From 47b1413610a0ab1aac60113e98fe6723223ada71 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Fri, 16 Apr 2021 17:51:41 -0700 Subject: [PATCH 4/6] Nueva columna: Fecha --- .../Grales/Formatos/RepTraspasoAlmacen.rdlc | 158 ++++++++++++++---- 1 file changed, 125 insertions(+), 33 deletions(-) diff --git a/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc b/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc index 90d52fea7..8ff03877a 100644 --- a/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc +++ b/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc @@ -80,31 +80,34 @@ - 1.23101cm + 0.96643cm - 1.98488cm + 1.69333cm + + + 1.74675cm 1.51446cm - 3.83319cm + 3.74919cm - 6.041cm + 6.22158cm - 2.20896cm + 1.57859cm - 2.31165cm + 2.32298cm - 2.50891cm + 2.21787cm - 2.5778cm + 2.36613cm @@ -122,7 +125,7 @@ Folio @@ -167,6 +170,62 @@ + + + + true + true + + + + + Fecha Mov + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + @@ -178,7 +237,7 @@ Disponible @@ -234,7 +293,7 @@ Unidad @@ -290,7 +349,7 @@ Código @@ -346,7 +405,7 @@ Producto @@ -402,7 +461,7 @@ Valor @@ -458,7 +517,7 @@ Alm. Origen @@ -514,7 +573,7 @@ Alm. Destino @@ -570,7 +629,7 @@ Responsable @@ -654,6 +713,43 @@ + + + + true + true + + + + + =IIf(CStr(Fields!FechaMovto.Value) = "" , "", FormatDateTime(CDate(Fields!FechaMovto.Value), DateFormat.ShortDate)) + + + + + + + FechaMovto + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + true + + @@ -953,6 +1049,7 @@ + @@ -971,9 +1068,8 @@ true DataSet1 0.17639cm - 0.24474cm 1.0148cm - 24.21186cm + 24.37731cm @@ -984,7 +1080,7 @@ 0.67394in @@ -1059,7 +1155,7 @@ Textbox2 1.07625cm 0.52945cm - 24.4566cm + 24.62205cm 1