diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index ac47d269b..37ded6f64 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -84,15 +84,16 @@ general optima motobateria + Auxiliar
- + - +
@@ -122,7 +123,7 @@ - +   - +   - - + +   @@ -170,9 +171,9 @@ - + - + @@ -181,10 +182,10 @@ - + - + @@ -258,10 +259,10 @@ - + ControlToValidate="TxtFolioGarantia" runat="server" CssClass="help-block errorimput" + ErrorMessage="solo números" ValidationGroup="GrpFolioGarantia" + ValidationExpression="\d+"> + @@ -269,8 +270,9 @@
-
+
SubProyecto:
+ @@ -286,10 +288,12 @@
Tipo Folio:
+ General Optima Motobateria + Auxiliar
@@ -297,6 +301,7 @@
Área:
+ Piso Almacén @@ -308,7 +313,7 @@
-
+
diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 8e7c0f8a7..8882bb2d9 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -295,7 +295,8 @@ Public Class ClsBancos Return Retorno End Function - Public Function AddBancos(Banco As String, Ejecutivo As String, Telefono As String, CveUsuario As Integer, CveEmpresa As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1") As Boolean + Public Function AddBancos(Banco As String, Ejecutivo As String, Telefono As String, CveUsuario As Integer, CveEmpresa As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1", + Optional CveSATBanco As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_BancosAdd ") @@ -308,6 +309,7 @@ Public Class ClsBancos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@IdContPaq", SqlDbType.Int).Value = IdContPaq .Add("@RFC", SqlDbType.VarChar).Value = RFC + .Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco End With Try @@ -326,7 +328,8 @@ Public Class ClsBancos Return Retorno End Function - Public Function UpdateBancos(Banco As String, Ejecutivo As String, Telefono As String, Estatus As Boolean, CveBanco As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1") As Boolean + Public Function UpdateBancos(Banco As String, Ejecutivo As String, Telefono As String, Estatus As Boolean, CveBanco As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1", + Optional CveSATBanco As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_BancosUpdate") @@ -339,6 +342,7 @@ Public Class ClsBancos .Add("@CveBanco", SqlDbType.Int).Value = CveBanco .Add("@IdContPaq", SqlDbType.Int).Value = IdContPaq .Add("@RFC", SqlDbType.VarChar).Value = RFC + .Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco End With Try diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index e315a33e6..8613d0d3c 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -324,6 +324,30 @@ Public Class ClsNominas End Try Return retorno End Function + + + Public Function GetAniversarioLaboral(fecha As String, cveEmpresa As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_RH_AniversarioLaboral", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@Fecha", SqlDbType.Date).Value = fecha + + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch Ex1 As SqlException + + Me.OnError("Ocurrió un error en aniversario laboral.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error en aniversario laboral.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function + + + Public Function AutorizaCalculoAnual(CveEmpresa As Integer, CveUsuario As Integer, PersonalXml As String, Optional Numpagos As Integer = 1, Optional Ejercicio As Integer = 2023) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Nom_AutorizaCalculoAnual", CommandType.StoredProcedure) diff --git a/Bancos/CatBancos.aspx b/Bancos/CatBancos.aspx index 3fa839955..481fe7485 100644 --- a/Bancos/CatBancos.aspx +++ b/Bancos/CatBancos.aspx @@ -4,6 +4,16 @@ +
  • @@ -24,6 +34,12 @@ + +
    + + Banco SAT + + + Banco @@ -64,6 +80,13 @@
    + + Seleccione uno + + + + @@ -90,8 +113,22 @@ - + + + + + + + + Seleccione uno + + + + + @@ -142,10 +179,14 @@ -
    - -   -
    +
    +
    + +
    +
    + +
    +
    diff --git a/Bancos/CatBancos.aspx.vb b/Bancos/CatBancos.aspx.vb index 1784f8c16..ab30a2db6 100644 --- a/Bancos/CatBancos.aspx.vb +++ b/Bancos/CatBancos.aspx.vb @@ -19,13 +19,43 @@ Partial Class Bancos_CatBancos End Set End Property + Private Property DTBancosSAT As DataTable + Get + If ViewState("DTBancosSAT") Is Nothing Then + ViewState("DTBancosSAT") = New DataTable() + End If + Return DirectCast(ViewState("DTBancosSAT"), DataTable) + End Get + + Set(ByVal value As DataTable) + ViewState("DTBancosSAT") = value + End Set + End Property + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then + CargaBancosSAT() ViewState("Orden") = "" CargaDatos() End If End Sub + Private Sub CargaBancosSAT() + + Dim ObjBancos As New ClsBancos + + If ObjBancos.GetBancosSAT Then + DdlSatBanco.DataSource = ObjBancos.DtResultados + DTBancosSAT = ObjBancos.DtResultados + End If + + ObjBancos.Dispose() + + DdlSatBanco.DataBind() + DdlSatBanco.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + + End Sub + Public Sub CargaDatos() Dim ObjBancos As New ClsBancos If ObjBancos.GetBancos() Then @@ -47,7 +77,8 @@ Partial Class Bancos_CatBancos Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click Dim ObjBancos As New ClsBancos - If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveSATBanco:=DdlSatBanco.SelectedValue.ToEntero) Then + DdlSatBanco.SelectedValueExist(-1) TxtBanco.Text = "" TxtEjecutivo.Text = "" TxtTelefono.Text = "" @@ -68,24 +99,42 @@ Partial Class Bancos_CatBancos #Region "G V D A T O S" Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.RowIndex = 0 Then - e.Row.Cells(0).Width = Unit.Pixel(156) 'BANCO - e.Row.Cells(1).Width = Unit.Pixel(206) 'EJECUTIVO - e.Row.Cells(2).Width = Unit.Pixel(106) 'TELEFONO - e.Row.Cells(3).Width = Unit.Pixel(95) 'ESTATUS - e.Row.Cells(4).Width = Unit.Pixel(95) 'FECHA - e.Row.Cells(5).Width = Unit.Pixel(100) 'USUARIO - e.Row.Cells(6).Width = Unit.Pixel(100) 'EDITAR - e.Row.Cells(7).Width = Unit.Pixel(65) 'ELIMINAR + e.Row.Cells(0).Width = Unit.Pixel(156) 'BANCO SAT + e.Row.Cells(1).Width = Unit.Pixel(156) 'BANCO + e.Row.Cells(2).Width = Unit.Pixel(206) 'EJECUTIVO + e.Row.Cells(3).Width = Unit.Pixel(106) 'TELEFONO + e.Row.Cells(4).Width = Unit.Pixel(95) 'ESTATUS + e.Row.Cells(5).Width = Unit.Pixel(95) 'FECHA + e.Row.Cells(6).Width = Unit.Pixel(100) 'USUARIO + e.Row.Cells(7).Width = Unit.Pixel(65) 'EDITAR + e.Row.Cells(8).Width = Unit.Pixel(65) 'ELIMINAR End If + e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left - e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center + e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center - e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center + 'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center + e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Center + End If + + If (e.Row.RowState And DataControlRowState.Edit) = DataControlRowState.Edit Then + Dim DdlSatBanco As DropDownList = e.Row.FCDropDownList("DdlSatBanco") + DdlSatBanco.ClearSelection() + DdlSatBanco.SelectedValue = Nothing + DdlSatBanco.Items.Clear() + DdlSatBanco.DataSource = DTBancosSAT + DdlSatBanco.DataBind() + DdlSatBanco.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + DdlSatBanco.SelectedValueExist(e.Row.DataKey("CveSATBanco").ToString()) + End If + End Sub Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting @@ -126,19 +175,16 @@ Partial Class Bancos_CatBancos Dim Telefono As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTelefono"), TextBox).Text.Trim Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked Dim CveBanco As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero + Dim CveSATBanco As Integer = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlSatBanco").SelectedValue.ToEntero Dim TieneError As Boolean = False - If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then - If ObjBancos.InhabilitarCuentasBancos(CveBanco, Estatus) Then - GvDatos.EditIndex = -1 - ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - GlobalDTBancos = ObjBancos.DtResultados - Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) - Else + If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco, CveSATBanco:=CveSATBanco) Then + + If Not ObjBancos.InhabilitarCuentasBancos(CveBanco, Estatus) Then TieneError = True End If + Else TieneError = True End If @@ -152,12 +198,24 @@ Partial Class Bancos_CatBancos ObjBancos.Dispose() - If ViewState("Orden").ToString() <> String.Empty Then - CargaGrid(ViewState("Orden").ToString()) - Else - CargaGrid("") + If Not TieneError Then + + GvDatos.EditIndex = -1 + CargaDatos() + GlobalDTBancos = Nothing + Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) + + If ViewState("Orden").ToString() <> String.Empty Then + CargaGrid(ViewState("Orden").ToString()) + Else + CargaGrid("") + End If + End If + + + End Sub Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 7c63cd39d..673703de3 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1284,6 +1284,7 @@ Partial Class Bancos_IE ViewState("CveCliente") = "-1" CargaProveedor(HdnCveProveedor.Value.ToEntero, "-1") + CargaCuentasDepositos() End Sub Private Sub CargaProveedor(ByVal CveProveedor As Integer, RFC As String) @@ -4098,11 +4099,17 @@ Partial Class Bancos_IE Dim dtc As DataTable = Nothing - If CveProveedor > 0 Then - dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor) + Dim CveProveedorTemp As Integer = CveProveedor + + If DdlProveedores.SelectedValue.ToEntero > 0 Then + CveProveedorTemp = DdlProveedores.SelectedValue.ToEntero + End If + + If CveProveedorTemp > 0 Then + dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedorTemp) ElseIf CveCliente > 0 Then dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente) - ElseIf cvepersonal > 0 Then + ElseIf CvePersonal > 0 Then dtc = GlobalDTCuentasDepositosPersonales(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal) End If @@ -4216,14 +4223,14 @@ Partial Class Bancos_IE ElseIf OpBanco = 3 Then If dtc.Rows.Count > 0 Then - DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'") + DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus ='True'") DdlCuentaDeposito.DataBind() DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) End If - If dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'").Rows.Count > 0 Then + If dtc.FiltraParametros(" Estatus ='True'").Rows.Count > 0 Then trCuentaDeposito.Visible = True - DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) + 'DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) Else BtnGuardar.Enabled = False Alert("El Beneficiario no tiene una cuenta activa en Scotiabank, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia) @@ -4265,6 +4272,19 @@ Partial Class Bancos_IE End If End If + + If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSSINFACT", "EGSCREDITO") Then + If DdlTipoTransaccion.SelectedValue.Contiene("9") AndAlso OpBanco = 3 Then + RBL.Items(1).Enabled = False + RBL.Items(2).Enabled = False + Else + RBL.Items(1).Enabled = True + RBL.Items(2).Enabled = True + End If + End If + + + UPPP.Update() UpGuardar.Update() UpCuentaDeposito.Update() UpDatos.Update() @@ -4500,6 +4520,7 @@ Partial Class Bancos_IE DdlProveedores_selectedindexchange(DdlProveedores, Nothing) DdlProveedores.SelectedText = RazonSocial ' BuscaCargaProveedor() + End If CveOCSolicitudAnticipo = DrOC("CveOC").ToString.ToEntero Else diff --git a/Bancos/PagoElectronico.aspx b/Bancos/PagoElectronico.aspx index 453f22d68..5bd2bf71c 100644 --- a/Bancos/PagoElectronico.aspx +++ b/Bancos/PagoElectronico.aspx @@ -60,7 +60,7 @@
    -
    +
    @@ -79,7 +79,7 @@
    -
    +
    @@ -127,7 +127,7 @@
    -
    +
    @@ -178,7 +178,7 @@
    -
    +
    diff --git a/Bancos/PagoElectronico.aspx.vb b/Bancos/PagoElectronico.aspx.vb index bde6db7ea..b058e60bb 100644 --- a/Bancos/PagoElectronico.aspx.vb +++ b/Bancos/PagoElectronico.aspx.vb @@ -277,6 +277,8 @@ Partial Class Bancos_PagoElectronico If DTPendientes IsNot Nothing AndAlso DTPendientes.Rows.Count > 0 Then CargaDatosInformativos() + Else + VistaComandoGeneracion() End If End Sub @@ -946,7 +948,7 @@ Partial Class Bancos_PagoElectronico Dim correo As String = dr("Correo").ToString.Trim If correo.Trim.Length = 0 Then - SBErrores.Append($"Email no definido en fila {idx + 1}. Debe ser un correo electrónico válido.
    ") + SBErrores.Append($" {nombreBen} Email no definido en fila {idx + 1}. Debe ser un correo electrónico válido.
    ") ErrorLayout = True End If diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb index ac144efca..981d83af1 100644 --- a/Bancos/PagoElectronicoGrupos.aspx.vb +++ b/Bancos/PagoElectronicoGrupos.aspx.vb @@ -2037,15 +2037,15 @@ Partial Class Bancos_PagoElectronicoGrupos 'Motivo de pago If drow("Observaciones").ToString.Trim.Length > 30 Then - RegistrosPago.Append(drow("Observaciones").ToString.Substring(0, 30)) + RegistrosPago.Append(drow("Observaciones").ToString.Trim.Substring(0, 30)) Else - RegistrosPago.Append(drow("Observaciones").ToString.PadRight(30, EspacioRelleno)) + RegistrosPago.Append(drow("Observaciones").ToString.Trim.PadRight(30, EspacioRelleno)) End If If drow("Referencia").ToString.Trim.Length > 7 Then - RegistrosPago.Append(drow("Referencia").ToString.Substring(0, 7)) + RegistrosPago.Append(drow("Referencia").ToString.Trim.Substring(0, 7)) Else - RegistrosPago.Append(drow("Referencia").ToString.PadRight(7, EspacioRelleno)) + RegistrosPago.Append(drow("Referencia").ToString.Trim.PadRight(7, EspacioRelleno)) End If RegistrosPago.Append("H") diff --git a/Export/ExpDetalle.aspx b/Export/ExpDetalle.aspx index b3b5f5d52..f989bbe81 100644 --- a/Export/ExpDetalle.aspx +++ b/Export/ExpDetalle.aspx @@ -643,14 +643,19 @@ - + - + - + - + + + + + + diff --git a/Export/ExpDetalle.aspx.cs b/Export/ExpDetalle.aspx.cs index fedd2b2a8..4964c8da0 100644 --- a/Export/ExpDetalle.aspx.cs +++ b/Export/ExpDetalle.aspx.cs @@ -54,6 +54,17 @@ public partial class Export_ExpDetalle : ClsPaginas EsImportacion = true; } + LblTipoExp.InnerText = EsImportacion ? "Tipo Importación:" : "Tipo Exportación:"; + + if (EsImportacion) + { + LblExp.Text = "Importaciones"; + } + else + { + LblExp.Text = "Exportación"; + } + CveExportacion = !string.IsNullOrEmpty(Request["CveExportacion"]) ? Request["CveExportacion"].ToEntero() : -1; InicializarValores(); CargaDatos(); @@ -467,7 +478,7 @@ public partial class Export_ExpDetalle : ClsPaginas } //string Liga = "document.location.href=\"/Export/RepExportaciones.aspx\";"; - string liga = EsImportacion + string liga = EsImportacion ? $"document.location.href=\"/Export/ExpDetalle.aspx?CveExportacion={ExportacionGuardada}&Opcion=I\";" : $"document.location.href=\"/Export/ExpDetalle.aspx?CveExportacion={ExportacionGuardada}\";"; Alert("La Exportación se ha agregado correctamente.", JSBtnAceptar: liga); diff --git a/Export/RepExportaciones.aspx.cs b/Export/RepExportaciones.aspx.cs index 219fc6331..62ff480bf 100644 --- a/Export/RepExportaciones.aspx.cs +++ b/Export/RepExportaciones.aspx.cs @@ -44,6 +44,29 @@ public partial class Export_RepExportaciones : ClsPaginas EsImportacion = true; } //LtlPeriodoseleccionado.Text = EsImportacion ? "Importaciones" : "Exportaciones"; + + Page.Title = EsImportacion ? "Importaciones" : "Exportaciones"; + // Ahora sí, usa la bandera para los textos + if (EsImportacion) + { + LtlTitulo.Text = "Importaciones"; + EmptyDataTextPersonalizado = "No se encontraron importaciones"; + ToolTipPersonalizado = "Importaciones"; + HLAgregarExp.Text = " Agregar Importación"; + HLAgregarExp.NavigateUrl = "ExpDetalle.aspx?CveExportacion=-1&Opcion=I"; + } + else + { + LtlTitulo.Text = "Exportaciones"; + EmptyDataTextPersonalizado = "No se encontraron exportaciones"; + ToolTipPersonalizado = "Exportaciones"; + HLAgregarExp.Text = " Agregar Exportación"; + HLAgregarExp.NavigateUrl = "ExpDetalle.aspx?CveExportacion=-1"; + } + + GVExportaciones.EmptyDataText = EmptyDataTextPersonalizado; + GVExportaciones.ToolTip = ToolTipPersonalizado; + InicializarValores(); //CargaExportaciones(); } diff --git a/Inicio.aspx b/Inicio.aspx index 6f20e28c0..ed13f6142 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -1712,7 +1712,59 @@
    + +