From 79c963be713ed338ddb81b6bf9877daf945f5aeb Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 7 Apr 2020 12:31:00 -0700 Subject: [PATCH] Pago electronico grupos cuentas deposito en ProveedoresAbonar y modulos en clsPaginas --- App_Code/ClsBancos.vb | 9 +- App_Code/ClsPaginas.vb | 3 +- Bancos/PagoElectronicoGrupos.aspx | 4 - Bancos/PagoElectronicoGrupos.aspx.vb | 412 ++++++++++++++++++++------- Bancos/ProveedoresAbonar.aspx.vb | 31 +- 5 files changed, 341 insertions(+), 118 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index fb92a81d1..06889de41 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -3155,14 +3155,15 @@ Public Class ClsBancos Return Retorno End Function - Public Function GetLayoutFyE(CveCuenta As Integer, CveEmpresa As Integer) As Boolean + Public Function GetLayoutFyE(CveCuenta As Integer, CveEmpresa As Integer, Optional PorGrupos As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_LayoutFyE") With SqlAdapter.SelectCommand.Parameters .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@PorGrupos", SqlDbType.Bit).Value = PorGrupos End With Try @@ -3173,9 +3174,9 @@ Public Class ClsBancos End Try Return Retorno - End Function + End Function #End Region - + #Region "F L U C T U A C I O N E S" Public Function GetFluctuacionesBitacora(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 081440aab..93e73950c 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3801,6 +3801,7 @@ Public Class ClsPaginas PaginaDict.Add("/Bancos/Creditos.aspx".ToUpper(), 318) PaginaDict.Add("/Bancos/PagoElectronico.aspx".ToUpper(), 324) PaginaDict.Add("/Bancos/RepProgramaciones.aspx".ToUpper(), 323) + PaginaDict.Add("/Bancos/PagoElectronicoGrupos.aspx".ToUpper(), 1318) PaginaDict.Add("/Bancos/PopIE.aspx".ToUpper(), 153) PaginaDict.Add("/Bancos/PopIEVentas.aspx".ToUpper(), 153) @@ -4709,7 +4710,7 @@ Public Class ClsPaginas PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272) PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273) - PaginaDict.Add("/Bancos/PagoElectronicoGrupos.aspx".ToUpper(), -1) + diff --git a/Bancos/PagoElectronicoGrupos.aspx b/Bancos/PagoElectronicoGrupos.aspx index f1752353f..521e5853c 100644 --- a/Bancos/PagoElectronicoGrupos.aspx +++ b/Bancos/PagoElectronicoGrupos.aspx @@ -14,11 +14,7 @@ - - - - diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb index 01a4a3521..0e89dec64 100644 --- a/Bancos/PagoElectronicoGrupos.aspx.vb +++ b/Bancos/PagoElectronicoGrupos.aspx.vb @@ -516,10 +516,10 @@ Partial Class Bancos_PagoElectronicoGrupos Exit Sub End If - AltaProveedores(1) + AltaProveedores() End Sub - Private Sub AltaProveedores(TipoAlta As Integer, Optional DtCuentasPendientesTemp As DataTable = Nothing) + Private Sub AltaProveedores(Optional DtCuentasPendientesTemp As DataTable = Nothing) NombreArchivo = "" @@ -646,7 +646,7 @@ Partial Class Bancos_PagoElectronicoGrupos SBTmpInterbancarias.Append("0999999999999.99") - If dRow("RazonSocial").ToString.Trim.Length <31 Then 'Tamaño maximo 30 + If dRow("RazonSocial").ToString.Trim.Length < 31 Then 'Tamaño maximo 30 SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno)) Else SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30)) @@ -1091,124 +1091,124 @@ Partial Class Bancos_PagoElectronicoGrupos End Sub - Private Sub GeneraPagoViejo(DTTemp As DataTable, CveBLE As Integer) - If DTTemp.Rows.Count <= 0 Then - Alert("No hay registros para generar", TipoMensaje.MsgAdvertencia) - Exit Sub - End If + 'Private Sub GeneraPagoViejo(DTTemp As DataTable, CveBLE As Integer) + ' If DTTemp.Rows.Count <= 0 Then + ' Alert("No hay registros para generar", TipoMensaje.MsgAdvertencia) + ' Exit Sub + ' End If - 'For Each gvr As DataRow In DTTemp.Rows - ' If gvr("EstatusPagoElectronico").ToString.ToEntero <= 0 Then - ' Alert("Los proveedores tienen que estar dados de alta. Primero de alta a los proveedores") - ' Exit Sub - ' End If - 'Next + ' 'For Each gvr As DataRow In DTTemp.Rows + ' ' If gvr("EstatusPagoElectronico").ToString.ToEntero <= 0 Then + ' ' Alert("Los proveedores tienen que estar dados de alta. Primero de alta a los proveedores") + ' ' Exit Sub + ' ' End If + ' 'Next - 'Comprobamos la cuenta deposito y moneda de las cuentas deposito - For Each dr As DataRow In DTTemp.Rows - If dr("BancoNombre").ToString = "" Then - Alert(String.Format("El Pago '{0}' no tiene Cuenta Deposito Asociada.", dr("Observaciones")), TipoMensaje.MsgError) - Exit Sub - End If + ' 'Comprobamos la cuenta deposito y moneda de las cuentas deposito + ' For Each dr As DataRow In DTTemp.Rows + ' If dr("BancoNombre").ToString = "" Then + ' Alert(String.Format("El Pago '{0}' no tiene Cuenta Deposito Asociada.", dr("Observaciones")), TipoMensaje.MsgError) + ' Exit Sub + ' End If - If dr("MonedaCtaDeposito").ToString = "" Or dr("MonedaCtaDeposito").ToString.ToEntero <= 0 Then - Alert(String.Format("La cuenta deposito '{0}' del proveedor '{1}' no tiene Moneda especificada.", dr("CuentaDeposito"), dr("RazonSocial")), TipoMensaje.MsgError) - Exit Sub - End If - Next + ' If dr("MonedaCtaDeposito").ToString = "" Or dr("MonedaCtaDeposito").ToString.ToEntero <= 0 Then + ' Alert(String.Format("La cuenta deposito '{0}' del proveedor '{1}' no tiene Moneda especificada.", dr("CuentaDeposito"), dr("RazonSocial")), TipoMensaje.MsgError) + ' Exit Sub + ' End If + ' Next - 'Excluimos los registros que no tengan cuenta deposito dada de alta - 'DTTemp = DTTemp.FiltraParametros("EstatusPagoElectronico = 0") + ' 'Excluimos los registros que no tengan cuenta deposito dada de alta + ' 'DTTemp = DTTemp.FiltraParametros("EstatusPagoElectronico = 0") - HeaderTexto = "" - DetalleTexto = "" - TrailerTexto = "" - TotalAcumulado = 0 + ' HeaderTexto = "" + ' DetalleTexto = "" + ' TrailerTexto = "" + ' TotalAcumulado = 0 - 'Insertar en LayoutEnvios - Dim ObjBancos As New ClsBancos - ObjBancos.IniciaTransacSQL() - Dim ErrorLayout = False + ' 'Insertar en LayoutEnvios + ' Dim ObjBancos As New ClsBancos + ' ObjBancos.IniciaTransacSQL() + ' Dim ErrorLayout = False - Dim TotalDetalles As Integer = 0 + ' Dim TotalDetalles As Integer = 0 - 'CREA CARPETA SI NO EXISTE - Dim path As String = Server.MapPath(String.Format("~/Empresas/{0}/Layout/", UsuarioActual.CveEmpresa)) - Dim exists = System.IO.Directory.Exists(path) - If Not exists Then - System.IO.Directory.CreateDirectory(path) - End If + ' 'CREA CARPETA SI NO EXISTE + ' Dim path As String = Server.MapPath(String.Format("~/Empresas/{0}/Layout/", UsuarioActual.CveEmpresa)) + ' Dim exists = System.IO.Directory.Exists(path) + ' If Not exists Then + ' System.IO.Directory.CreateDirectory(path) + ' End If - Dim CveIEs = "" - CreaDtPago() + ' Dim CveIEs = "" + ' CreaDtPago() - For Each gvr As DataRow In DTTemp.Rows - If gvr("CveCuentaDeposito").ToString <> "" Then - DTPendienteActual = DTTemp.FiltraParametros(String.Format("CveIE = {0}", gvr("CveIE").ToString)) + ' For Each gvr As DataRow In DTTemp.Rows + ' If gvr("CveCuentaDeposito").ToString <> "" Then + ' DTPendienteActual = DTTemp.FiltraParametros(String.Format("CveIE = {0}", gvr("CveIE").ToString)) - 'ACTUALIZA FECHADOCUMENTO DEL IE - 'If CveBLE > 0 Then - ' ObjBancos.UpdateBancos_IE(Date.Now, Date.Now, DTPendienteActual(0)("CveIE").ToString.ToEntero) - 'End If + ' 'ACTUALIZA FECHADOCUMENTO DEL IE + ' 'If CveBLE > 0 Then + ' ' ObjBancos.UpdateBancos_IE(Date.Now, Date.Now, DTPendienteActual(0)("CveIE").ToString.ToEntero) + ' 'End If - If TotalDetalles > 0 Then - DetalleTexto &= vbCrLf - End If - CrearDetallePagos() - TotalDetalles += 1 - End If - Next + ' If TotalDetalles > 0 Then + ' DetalleTexto &= vbCrLf + ' End If + ' CrearDetallePagos() + ' TotalDetalles += 1 + ' End If + ' Next - FormarTextoPagos(TotalDetalles, TotalAcumulado.ToString.FormatoNumero.Replace(",", "").Replace(".", "")) - CreaArchivo(1) + ' FormarTextoPagos(TotalDetalles, TotalAcumulado.ToString.FormatoNumero.Replace(",", "").Replace(".", "")) + ' CreaArchivo(1) - If CveBLE > 0 Then - 'ACTUALIZAMOS EL ENVIO SI ES REGENERACION - If Not ObjBancos.UpdateLayoutEnvios(CveBLE, Date.Now) Then - ErrorLayout = True - End If + ' If CveBLE > 0 Then + ' 'ACTUALIZAMOS EL ENVIO SI ES REGENERACION + ' If Not ObjBancos.UpdateLayoutEnvios(CveBLE, Date.Now) Then + ' ErrorLayout = True + ' End If - 'GUARDAMOS EL ENVIO SI NO ES REGENERACION - Else + ' 'GUARDAMOS EL ENVIO SI NO ES REGENERACION + ' Else - Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta) + ' Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta) - If CveLayoutEnvio > 0 Then - For Each dr As DataRow In DTTemp.Rows - If dr("CveProveedor").ToString <> "" Or dr("CvePersonal").ToString <> "" Then - If Not ObjBancos.AddLayoutEnviosDetalle(CveLayoutEnvio, dr("CveIE").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, 1, "Observaciones") Then - ErrorLayout = True - End If - End If - Next - Else - ErrorLayout = True - End If + ' If CveLayoutEnvio > 0 Then + ' For Each dr As DataRow In DTTemp.Rows + ' If dr("CveProveedor").ToString <> "" Or dr("CvePersonal").ToString <> "" Then + ' If Not ObjBancos.AddLayoutEnviosDetalle(CveLayoutEnvio, dr("CveIE").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, 1, "Observaciones") Then + ' ErrorLayout = True + ' End If + ' End If + ' Next + ' Else + ' ErrorLayout = True + ' End If - End If + ' End If - If Not ErrorLayout Then - ObjBancos.Commit() - ObjBancos.Dispose() + ' If Not ErrorLayout Then + ' ObjBancos.Commit() + ' ObjBancos.Dispose() - Dim Des = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo) - Dim Descargas As New StringBuilder() - Descargas.AppendFormat("
  • TXT
  • ", NombreArchivo) - ' Descargas.AppendFormat("
  • Reporte
  • ", NombreArchivo) - Descargas.AppendFormat("
  • Descargar Reporte
  • ", NombreArchivo) + ' Dim Des = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo) + ' Dim Descargas As New StringBuilder() + ' Descargas.AppendFormat("
  • TXT
  • ", NombreArchivo) + ' ' Descargas.AppendFormat("
  • Reporte
  • ", NombreArchivo) + ' Descargas.AppendFormat("
  • Descargar Reporte
  • ", NombreArchivo) - Alert(String.Format("
    El Layout fue creado satisfactoriamente.


    Descargas:
      {0}
    ", Descargas), TipoMensaje.MsgInformacion) - 'Alert("El Layout fue creado satisfactoriamente") - Else - ObjBancos.RollBack() - ObjBancos.Dispose() - Alert("Ocurrio un problema al registrar la creacion del Layout. Por favor vuelva a intentar.", TipoMensaje.MsgError) - End If + ' Alert(String.Format("
    El Layout fue creado satisfactoriamente.


    Descargas:
      {0}
    ", Descargas), TipoMensaje.MsgInformacion) + ' 'Alert("El Layout fue creado satisfactoriamente") + ' Else + ' ObjBancos.RollBack() + ' ObjBancos.Dispose() + ' Alert("Ocurrio un problema al registrar la creacion del Layout. Por favor vuelva a intentar.", TipoMensaje.MsgError) + ' End If - End Sub + 'End Sub Protected Sub CrearDetallePagos() 'Dim Resultado = True @@ -1895,10 +1895,220 @@ Partial Class Bancos_PagoElectronicoGrupos 'FUNCIONARIO O EMPLEADO #Region " ALTA FUNCIONARIO " + + Private Sub AltaFyE(Optional DtCuentasPendientesTemp As DataTable = Nothing) + + + NombreArchivo = "" + + Dim RegistrosAltaBancomer As New StringBuilder + Dim RegistrosAltaInterbancario As New StringBuilder + Dim SBErrores As New StringBuilder + + Dim NombreArchivoBancomer As String = "" + Dim NombreArchivoInterbancario As String = "" + + Dim CeroRelleno As Char = "0"c + Dim EspacioRelleno As Char = Chr(32) + Dim ErrorLayout = False + + + If DtCuentasPendientesTemp Is Nothing Then + DtCuentasPendientesTemp = DTFyE.Copy + End If + + + + DtCuentasPendientesTemp.CaseSensitive = False + + Dim DtCuentasPendientesBancomer As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' ) ", "", {"BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CvePersonal", "CveBanco", "Cuenta", "BBVAAlias"}) + Dim DtCuentasPendientesInterbancarias As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre not like '%BBVA%' AND BancoNombre not like '%BANCOMER%' ) ", "", {"BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CvePersonal", "CveBanco", "Cuenta", "BBVAAlias"}) + 'CLABEDestino + + If DtCuentasPendientesBancomer.Rows.Count > 0 Then + For Each dRow As DataRow In DtCuentasPendientesBancomer.Rows + + Dim SBTmpBancomer As New StringBuilder + Dim SBErroresBancomer As New StringBuilder + Dim ErrorLineaBancomer As Boolean = False + + SBErroresBancomer.Append($"{dRow("RazonSocial").ToString } ") + SBErroresBancomer.Append($"Cuenta: {dRow("Cuenta").ToString } ") + + If dRow("CLABEDestino").ToString.Length <= 18 Then 'Tamaño maximo 18 + SBTmpBancomer.Append(dRow("CLABEDestino").ToString.PadLeft(18, CeroRelleno)) + Else + SBErroresBancomer.Append("La cuenta beneficiaria no puede ser mayor a 18 caracteres, ") + ErrorLineaBancomer = True + End If + + + If dRow("CLABEDestino").ToString.Trim = "" Then + SBErroresBancomer.Append("La cuenta beneficiaria no puede ser nula,") + ErrorLineaBancomer = True + End If + + If dRow("Abreviatura").ToString.Length = 3 Then + SBTmpBancomer.Append(dRow("Abreviatura")) + Else + SBErroresBancomer.Append("El tamaño de la divisa es incorrecto, ") + ErrorLineaBancomer = True + End If + + SBTmpBancomer.Append("0999999999999.99") + + If dRow("RazonSocial").ToString.Trim.Length < 31 Then 'Tamaño maximo 30 + SBTmpBancomer.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno)) + Else + SBTmpBancomer.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30)) + End If + + 'ALIAS DE LA CUENTA PENDIENTE TAMAÑO MAXIMO 30 + SBTmpBancomer.Append(dRow("BBVAAlias").ToString.PadRight(30, EspacioRelleno)) + + 'CORREO OPCIONAL TAMAÑO MAXIMO 80 + 'RegistrosAlta.Append("".ToString.PadLeft(80, EspacioRelleno)) + + SBTmpBancomer.Append(vbCrLf) + + + If Not ErrorLineaBancomer Then + RegistrosAltaBancomer.Append(SBTmpBancomer.ToString) + Else + SBErroresBancomer.Append("
    ") + SBErrores.AppendLine(SBErroresBancomer.ToString) + End If + + + Next + + TextoCompleto = RegistrosAltaBancomer.ToString + + If CreaArchivo(2, True) Then + NombreArchivoBancomer = NombreArchivo + End If + + + End If + + + + + If DtCuentasPendientesInterbancarias.Rows.Count > 0 Then + + For Each dRow As DataRow In DtCuentasPendientesInterbancarias.Rows + + Dim SBTmpInterbancarias As New StringBuilder + Dim SBErroresInterBancario As New StringBuilder + Dim ErrorLineaInterbancaria As Boolean = False + + SBErroresInterBancario.Append($"{dRow("RazonSocial").ToString } ") + SBErroresInterBancario.Append($"Cuenta: {dRow("Cuenta").ToString } ") + + If dRow("CveBanco").ToString.Trim.Length = 3 Then + SBTmpInterbancarias.Append(dRow("CveBanco").ToString.Trim) + Else + SBErroresInterBancario.Append("clave ABM(Clave SAT) incorrecta, ") + ErrorLineaInterbancaria = True + End If + + + If dRow("CLABEDestino").ToString.Length <= 18 Then 'Tamaño maximo 18 + SBTmpInterbancarias.Append(dRow("CLABEDestino").ToString.PadLeft(18, CeroRelleno)) + Else + SBErroresInterBancario.Append("La cuenta beneficiaria no puede ser mayor a 18 caracteres, ") + ErrorLineaInterbancaria = True + End If + + + + If dRow("CLABEDestino").ToString.Trim = "" Then + SBErroresInterBancario.Append("La cuenta beneficiaria no puede ser nula,") + ErrorLineaInterbancaria = True + End If + + If dRow("Abreviatura").ToString.Length = 3 Then + SBTmpInterbancarias.Append(dRow("Abreviatura").ToString.Trim) + Else + SBErroresInterBancario.Append("El tamaño de la divisa es incorrecto, ") + ErrorLineaInterbancaria = True + End If + + SBTmpInterbancarias.Append("0999999999999.99") + + If dRow("RazonSocial").ToString.Trim.Length < 31 Then 'Tamaño maximo 30 + SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno)) + Else + SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30)) + End If + + ' ALIAS DE LA CUENTA PENDIENTE TAMAÑO MAXIMO 30 + SBTmpInterbancarias.Append(dRow("BBVAAlias").ToString.PadRight(30, EspacioRelleno)) + + 'CORREO OPCIONAL TAMAÑO MAXIMO 80 + 'RegistrosAlta.Append("".ToString.PadLeft(80, EspacioRelleno)) + + + 'Tipo de cuenta + SBTmpInterbancarias.Append("40") + + SBTmpInterbancarias.Append(vbCrLf) + + + If Not ErrorLineaInterbancaria Then + RegistrosAltaInterbancario.Append(SBTmpInterbancarias.ToString) + Else + SBErroresInterBancario.Append("
    ") + SBErrores.AppendLine(SBErroresInterBancario.ToString) + End If + + Next + + If RegistrosAltaInterbancario.Length > 0 Then + TextoCompleto = RegistrosAltaInterbancario.ToString + If CreaArchivo(2, False) Then + NombreArchivoInterbancario = NombreArchivo + End If + End If + + End If + + + Dim Mensaje As New StringBuilder + + + Mensaje.Append("Descarga Layouts

    ") + + If NombreArchivoBancomer.Trim.Length > 0 Then + Mensaje.Append($"Cuentas Bancomer Descarga Archivo cuentas Bancomer

    ") + End If + + + If NombreArchivoInterbancario.Trim.Length > 0 Then + Mensaje.Append($"Cuentas Interbancarias Descarga Archivo cuentas Bancomer

    ") + End If + + + If SBErrores.ToString.Length > 0 Then + Mensaje.Append("Errores Cuentas
    ") + Mensaje.Append("
    ") + End If + + If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Then + Alert(Mensaje.ToString, TipoMensaje.MsgInformacion) + End If + + + + End Sub + + Private Sub CargaFyE() Dim ObjBancos As New ClsBancos - If ObjBancos.GetLayoutFyE(DdlCuenta.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + If ObjBancos.GetLayoutFyE(DdlCuenta.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PorGrupos:=True) Then DTFyE = ObjBancos.DtResultados.FiltraParametros("LEN(RFC) IN (13)") Else DTFyE = Nothing @@ -1912,6 +2122,7 @@ Partial Class Bancos_PagoElectronicoGrupos UpProveedores.Update() End Sub + Private Sub GeneraAltaFyE() Dim DtTemp As DataTable = Nothing @@ -2017,6 +2228,7 @@ Partial Class Bancos_PagoElectronicoGrupos End Sub + Private Sub GeneraAltaDetalleFyE() Dim Resultado = True Dim CuentaDeposito As String = "" @@ -2100,6 +2312,7 @@ Partial Class Bancos_PagoElectronicoGrupos Row("Cuenta") = String.Format("{0}", CuentaDeposito) DtAlta.Rows.Add(Row) End Sub + Protected Sub FormarTextoAltaFyE(Registros As Integer) '''''' LLENADO HEADER Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString @@ -2118,6 +2331,7 @@ Partial Class Bancos_PagoElectronicoGrupos TextoCompleto = String.Format("{1}{0}{2}{0}{3}{0}", vbCrLf, HeaderTexto, DetalleTexto, TrailerTexto) 'TxtAltas.Text = TextoCompleto End Sub + #End Region @@ -2188,9 +2402,9 @@ Partial Class Bancos_PagoElectronicoGrupos End If If TipoMasiva = 1 Then - AltaProveedores(2, DTProveedores) + AltaProveedores(DTProveedores) Else - GeneraAltaFyE() + AltaFyE() End If End Sub diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index b986ebb70..769e68b58 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -2513,20 +2513,31 @@ Partial Class Bancos_ProveedoresAbonar ElseIf DdlTipoTransaccion.SelectedValue = "17" Then + + '''Permitir pago sin cuneta deposito + If Dep.DtResultados.Rows.Count > 0 Then DdlCuentaDeposito.DataSource = Dep.DtResultados '.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'") + trCuentaDeposito.Visible = True + BtnIEGuardar.ToolTip = "" 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 ", TipoMensaje.MsgAdvertencia) - 'End If + 'Alert("El proveedor no tiene cuentas deposito registradas.") + BtnIEGuardar.Enabled = False + BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito" + + + + 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 + UpGuardar.Update() Else DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'") If Dep.DtResultados.Rows.Count > 0 Then