Pago electronico grupos cuentas deposito en ProveedoresAbonar y modulos en clsPaginas

This commit is contained in:
Rakcsle Supertramp
2020-04-07 12:31:00 -07:00
parent 9ed7921a78
commit 79c963be71
5 changed files with 341 additions and 118 deletions

View File

@@ -3155,14 +3155,15 @@ Public Class ClsBancos
Return Retorno Return Retorno
End Function 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 Dim Retorno As Boolean = False
DataAdapter("PA_Banc_LayoutFyE") DataAdapter("PA_Banc_LayoutFyE")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta .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 End With
Try Try
@@ -3173,9 +3174,9 @@ Public Class ClsBancos
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region "F L U C T U A C I O N E S" #Region "F L U C T U A C I O N E S"
Public Function GetFluctuacionesBitacora(CveEmpresa As Integer) As Boolean Public Function GetFluctuacionesBitacora(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False

View File

@@ -3801,6 +3801,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Bancos/Creditos.aspx".ToUpper(), 318) PaginaDict.Add("/Bancos/Creditos.aspx".ToUpper(), 318)
PaginaDict.Add("/Bancos/PagoElectronico.aspx".ToUpper(), 324) PaginaDict.Add("/Bancos/PagoElectronico.aspx".ToUpper(), 324)
PaginaDict.Add("/Bancos/RepProgramaciones.aspx".ToUpper(), 323) PaginaDict.Add("/Bancos/RepProgramaciones.aspx".ToUpper(), 323)
PaginaDict.Add("/Bancos/PagoElectronicoGrupos.aspx".ToUpper(), 1318)
PaginaDict.Add("/Bancos/PopIE.aspx".ToUpper(), 153) PaginaDict.Add("/Bancos/PopIE.aspx".ToUpper(), 153)
PaginaDict.Add("/Bancos/PopIEVentas.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/PVRepCompras.aspx".ToUpper(), 272)
PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273) PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273)
PaginaDict.Add("/Bancos/PagoElectronicoGrupos.aspx".ToUpper(), -1)

View File

@@ -14,11 +14,7 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%"> <ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
<ajax:TabPanel ID="TabGenerales" runat="server" HeaderText="Generación"> <ajax:TabPanel ID="TabGenerales" runat="server" HeaderText="Generación">
<ContentTemplate> <ContentTemplate>

View File

@@ -516,10 +516,10 @@ Partial Class Bancos_PagoElectronicoGrupos
Exit Sub Exit Sub
End If End If
AltaProveedores(1) AltaProveedores()
End Sub End Sub
Private Sub AltaProveedores(TipoAlta As Integer, Optional DtCuentasPendientesTemp As DataTable = Nothing) Private Sub AltaProveedores(Optional DtCuentasPendientesTemp As DataTable = Nothing)
NombreArchivo = "" NombreArchivo = ""
@@ -646,7 +646,7 @@ Partial Class Bancos_PagoElectronicoGrupos
SBTmpInterbancarias.Append("0999999999999.99") 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)) SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
Else Else
SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30)) SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30))
@@ -1091,124 +1091,124 @@ Partial Class Bancos_PagoElectronicoGrupos
End Sub End Sub
Private Sub GeneraPagoViejo(DTTemp As DataTable, CveBLE As Integer) 'Private Sub GeneraPagoViejo(DTTemp As DataTable, CveBLE As Integer)
If DTTemp.Rows.Count <= 0 Then ' If DTTemp.Rows.Count <= 0 Then
Alert("No hay registros para generar", TipoMensaje.MsgAdvertencia) ' Alert("No hay registros para generar", TipoMensaje.MsgAdvertencia)
Exit Sub ' Exit Sub
End If ' End If
'For Each gvr As DataRow In DTTemp.Rows ' 'For Each gvr As DataRow In DTTemp.Rows
' If gvr("EstatusPagoElectronico").ToString.ToEntero <= 0 Then ' ' If gvr("EstatusPagoElectronico").ToString.ToEntero <= 0 Then
' Alert("Los proveedores tienen que estar dados de alta. Primero de alta a los proveedores") ' ' Alert("Los proveedores tienen que estar dados de alta. Primero de alta a los proveedores")
' Exit Sub ' ' Exit Sub
' End If ' ' End If
'Next ' 'Next
'Comprobamos la cuenta deposito y moneda de las cuentas deposito ' 'Comprobamos la cuenta deposito y moneda de las cuentas deposito
For Each dr As DataRow In DTTemp.Rows ' For Each dr As DataRow In DTTemp.Rows
If dr("BancoNombre").ToString = "" Then ' If dr("BancoNombre").ToString = "" Then
Alert(String.Format("El Pago <b>'{0}'</b> no tiene Cuenta Deposito Asociada.", dr("Observaciones")), TipoMensaje.MsgError) ' Alert(String.Format("El Pago <b>'{0}'</b> no tiene Cuenta Deposito Asociada.", dr("Observaciones")), TipoMensaje.MsgError)
Exit Sub ' Exit Sub
End If ' End If
If dr("MonedaCtaDeposito").ToString = "" Or dr("MonedaCtaDeposito").ToString.ToEntero <= 0 Then ' If dr("MonedaCtaDeposito").ToString = "" Or dr("MonedaCtaDeposito").ToString.ToEntero <= 0 Then
Alert(String.Format("La cuenta deposito <b>'{0}'</b> del proveedor <b>'{1}'</b> no tiene Moneda especificada.", dr("CuentaDeposito"), dr("RazonSocial")), TipoMensaje.MsgError) ' Alert(String.Format("La cuenta deposito <b>'{0}'</b> del proveedor <b>'{1}'</b> no tiene Moneda especificada.", dr("CuentaDeposito"), dr("RazonSocial")), TipoMensaje.MsgError)
Exit Sub ' Exit Sub
End If ' End If
Next ' Next
'Excluimos los registros que no tengan cuenta deposito dada de alta ' 'Excluimos los registros que no tengan cuenta deposito dada de alta
'DTTemp = DTTemp.FiltraParametros("EstatusPagoElectronico = 0") ' 'DTTemp = DTTemp.FiltraParametros("EstatusPagoElectronico = 0")
HeaderTexto = "" ' HeaderTexto = ""
DetalleTexto = "" ' DetalleTexto = ""
TrailerTexto = "" ' TrailerTexto = ""
TotalAcumulado = 0 ' TotalAcumulado = 0
'Insertar en LayoutEnvios ' 'Insertar en LayoutEnvios
Dim ObjBancos As New ClsBancos ' Dim ObjBancos As New ClsBancos
ObjBancos.IniciaTransacSQL() ' ObjBancos.IniciaTransacSQL()
Dim ErrorLayout = False ' Dim ErrorLayout = False
Dim TotalDetalles As Integer = 0 ' Dim TotalDetalles As Integer = 0
'CREA CARPETA SI NO EXISTE ' 'CREA CARPETA SI NO EXISTE
Dim path As String = Server.MapPath(String.Format("~/Empresas/{0}/Layout/", UsuarioActual.CveEmpresa)) ' Dim path As String = Server.MapPath(String.Format("~/Empresas/{0}/Layout/", UsuarioActual.CveEmpresa))
Dim exists = System.IO.Directory.Exists(path) ' Dim exists = System.IO.Directory.Exists(path)
If Not exists Then ' If Not exists Then
System.IO.Directory.CreateDirectory(path) ' System.IO.Directory.CreateDirectory(path)
End If ' End If
Dim CveIEs = "" ' Dim CveIEs = ""
CreaDtPago() ' CreaDtPago()
For Each gvr As DataRow In DTTemp.Rows ' For Each gvr As DataRow In DTTemp.Rows
If gvr("CveCuentaDeposito").ToString <> "" Then ' If gvr("CveCuentaDeposito").ToString <> "" Then
DTPendienteActual = DTTemp.FiltraParametros(String.Format("CveIE = {0}", gvr("CveIE").ToString)) ' DTPendienteActual = DTTemp.FiltraParametros(String.Format("CveIE = {0}", gvr("CveIE").ToString))
'ACTUALIZA FECHADOCUMENTO DEL IE ' 'ACTUALIZA FECHADOCUMENTO DEL IE
'If CveBLE > 0 Then ' 'If CveBLE > 0 Then
' ObjBancos.UpdateBancos_IE(Date.Now, Date.Now, DTPendienteActual(0)("CveIE").ToString.ToEntero) ' ' ObjBancos.UpdateBancos_IE(Date.Now, Date.Now, DTPendienteActual(0)("CveIE").ToString.ToEntero)
'End If ' 'End If
If TotalDetalles > 0 Then ' If TotalDetalles > 0 Then
DetalleTexto &= vbCrLf ' DetalleTexto &= vbCrLf
End If ' End If
CrearDetallePagos() ' CrearDetallePagos()
TotalDetalles += 1 ' TotalDetalles += 1
End If ' End If
Next ' Next
FormarTextoPagos(TotalDetalles, TotalAcumulado.ToString.FormatoNumero.Replace(",", "").Replace(".", "")) ' FormarTextoPagos(TotalDetalles, TotalAcumulado.ToString.FormatoNumero.Replace(",", "").Replace(".", ""))
CreaArchivo(1) ' CreaArchivo(1)
If CveBLE > 0 Then ' If CveBLE > 0 Then
'ACTUALIZAMOS EL ENVIO SI ES REGENERACION ' 'ACTUALIZAMOS EL ENVIO SI ES REGENERACION
If Not ObjBancos.UpdateLayoutEnvios(CveBLE, Date.Now) Then ' If Not ObjBancos.UpdateLayoutEnvios(CveBLE, Date.Now) Then
ErrorLayout = True ' ErrorLayout = True
End If ' End If
'GUARDAMOS EL ENVIO SI NO ES REGENERACION ' 'GUARDAMOS EL ENVIO SI NO ES REGENERACION
Else ' Else
Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta) ' Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta)
If CveLayoutEnvio > 0 Then ' If CveLayoutEnvio > 0 Then
For Each dr As DataRow In DTTemp.Rows ' For Each dr As DataRow In DTTemp.Rows
If dr("CveProveedor").ToString <> "" Or dr("CvePersonal").ToString <> "" Then ' 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 ' If Not ObjBancos.AddLayoutEnviosDetalle(CveLayoutEnvio, dr("CveIE").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, 1, "Observaciones") Then
ErrorLayout = True ' ErrorLayout = True
End If ' End If
End If ' End If
Next ' Next
Else ' Else
ErrorLayout = True ' ErrorLayout = True
End If ' End If
End If ' End If
If Not ErrorLayout Then ' If Not ErrorLayout Then
ObjBancos.Commit() ' ObjBancos.Commit()
ObjBancos.Dispose() ' ObjBancos.Dispose()
Dim Des = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo) ' Dim Des = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
Dim Descargas As New StringBuilder() ' Dim Descargas As New StringBuilder()
Descargas.AppendFormat("<li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?File={0}"" target='_blank'>TXT</a></li>", NombreArchivo) ' Descargas.AppendFormat("<li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?File={0}"" target='_blank'>TXT</a></li>", NombreArchivo)
' Descargas.AppendFormat("<li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?REPORTE=S"" target='_blank'>Reporte</a></li>", NombreArchivo) ' ' Descargas.AppendFormat("<li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?REPORTE=S"" target='_blank'>Reporte</a></li>", NombreArchivo)
Descargas.AppendFormat("<li><a href=""#"" class=""Texto"" onclick=""fncp();"">Descargar Reporte</a></li>", NombreArchivo) ' Descargas.AppendFormat("<li><a href=""#"" class=""Texto"" onclick=""fncp();"">Descargar Reporte</a></li>", NombreArchivo)
Alert(String.Format("<br />El Layout fue creado satisfactoriamente.<br /><br /><br />Descargas:<ul>{0}</ul>", Descargas), TipoMensaje.MsgInformacion) ' Alert(String.Format("<br />El Layout fue creado satisfactoriamente.<br /><br /><br />Descargas:<ul>{0}</ul>", Descargas), TipoMensaje.MsgInformacion)
'Alert("El Layout fue creado satisfactoriamente") ' 'Alert("El Layout fue creado satisfactoriamente")
Else ' Else
ObjBancos.RollBack() ' ObjBancos.RollBack()
ObjBancos.Dispose() ' ObjBancos.Dispose()
Alert("Ocurrio un problema al registrar la creacion del Layout. Por favor vuelva a intentar.", TipoMensaje.MsgError) ' Alert("Ocurrio un problema al registrar la creacion del Layout. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If ' End If
End Sub 'End Sub
Protected Sub CrearDetallePagos() Protected Sub CrearDetallePagos()
'Dim Resultado = True 'Dim Resultado = True
@@ -1895,10 +1895,220 @@ Partial Class Bancos_PagoElectronicoGrupos
'FUNCIONARIO O EMPLEADO 'FUNCIONARIO O EMPLEADO
#Region " ALTA FUNCIONARIO " #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("<br>")
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("<br>")
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<br><br>")
If NombreArchivoBancomer.Trim.Length > 0 Then
Mensaje.Append($"Cuentas Bancomer <a class='Texto' href='../Empresas/{UsuarioActual.CveEmpresa}/Layout/{NombreArchivoBancomer}' download > Descarga Archivo cuentas Bancomer</a> <br><br>")
End If
If NombreArchivoInterbancario.Trim.Length > 0 Then
Mensaje.Append($"Cuentas Interbancarias <a class='Texto' href='../Empresas/{UsuarioActual.CveEmpresa}/Layout/{NombreArchivoInterbancario}' download >Descarga Archivo cuentas Bancomer</a> <br><br>")
End If
If SBErrores.ToString.Length > 0 Then
Mensaje.Append("<a class='Texto' data-toggle='collapse' data-target='#ErroresCuentas'>Errores Cuentas</a><br>")
Mensaje.Append("<div id='ErroresCuentas' Class='collapse'")
Mensaje.Append(SBErrores.ToString)
Mensaje.Append("</div>")
End If
If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Then
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
End If
End Sub
Private Sub CargaFyE() Private Sub CargaFyE()
Dim ObjBancos As New ClsBancos 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)") DTFyE = ObjBancos.DtResultados.FiltraParametros("LEN(RFC) IN (13)")
Else Else
DTFyE = Nothing DTFyE = Nothing
@@ -1912,6 +2122,7 @@ Partial Class Bancos_PagoElectronicoGrupos
UpProveedores.Update() UpProveedores.Update()
End Sub End Sub
Private Sub GeneraAltaFyE() Private Sub GeneraAltaFyE()
Dim DtTemp As DataTable = Nothing Dim DtTemp As DataTable = Nothing
@@ -2017,6 +2228,7 @@ Partial Class Bancos_PagoElectronicoGrupos
End Sub End Sub
Private Sub GeneraAltaDetalleFyE() Private Sub GeneraAltaDetalleFyE()
Dim Resultado = True Dim Resultado = True
Dim CuentaDeposito As String = "" Dim CuentaDeposito As String = ""
@@ -2100,6 +2312,7 @@ Partial Class Bancos_PagoElectronicoGrupos
Row("Cuenta") = String.Format("{0}", CuentaDeposito) Row("Cuenta") = String.Format("{0}", CuentaDeposito)
DtAlta.Rows.Add(Row) DtAlta.Rows.Add(Row)
End Sub End Sub
Protected Sub FormarTextoAltaFyE(Registros As Integer) Protected Sub FormarTextoAltaFyE(Registros As Integer)
'''''' LLENADO HEADER '''''' LLENADO HEADER
Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString 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) TextoCompleto = String.Format("{1}{0}{2}{0}{3}{0}", vbCrLf, HeaderTexto, DetalleTexto, TrailerTexto)
'TxtAltas.Text = TextoCompleto 'TxtAltas.Text = TextoCompleto
End Sub End Sub
#End Region #End Region
@@ -2188,9 +2402,9 @@ Partial Class Bancos_PagoElectronicoGrupos
End If End If
If TipoMasiva = 1 Then If TipoMasiva = 1 Then
AltaProveedores(2, DTProveedores) AltaProveedores(DTProveedores)
Else Else
GeneraAltaFyE() AltaFyE()
End If End If
End Sub End Sub

View File

@@ -2513,20 +2513,31 @@ Partial Class Bancos_ProveedoresAbonar
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
'''Permitir pago sin cuneta deposito
If Dep.DtResultados.Rows.Count > 0 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'")
trCuentaDeposito.Visible = True
BtnIEGuardar.ToolTip = ""
Else Else
Alert("El proveedor no tiene cuentas deposito registradas.") '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
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 Else
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'") DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
If Dep.DtResultados.Rows.Count > 0 Then If Dep.DtResultados.Rows.Count > 0 Then