Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,11 +14,7 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabGenerales" runat="server" HeaderText="Generación">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
@@ -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 <b>'{0}'</b> 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 <b>'{0}'</b> 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 <b>'{0}'</b> del proveedor <b>'{1}'</b> 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 <b>'{0}'</b> del proveedor <b>'{1}'</b> 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("<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 href=""#"" class=""Texto"" onclick=""fncp();"">Descargar Reporte</a></li>", NombreArchivo)
|
||||
' Dim Des = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||
' 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?REPORTE=S"" target='_blank'>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("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("<br />El Layout fue creado satisfactoriamente.<br /><br /><br />Descargas:<ul>{0}</ul>", 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("<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()
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -140,22 +140,17 @@
|
||||
</tr>
|
||||
<asp:UpdatePanel runat="server" ID="UPPS" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<tr>
|
||||
<td align="left" class="text-right"><b>Clasificación:</b></td>
|
||||
<tr align="left">
|
||||
<td class="text-right"><b>Clasificación:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlClasificacion" Class="table-group-action-input form-control input-inline input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="220px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
<asp:DropDownList ID="DdlClasificacion" Class="table-group-action-input form-control input-inline input-sm select2me" Width="230px" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td align="left" class="text-right"><b>Producto Servicio:</b></td>
|
||||
<td class="text-right"><b>Producto Servicio:</b></td>
|
||||
<td>
|
||||
<ADS:Dropdownlost ID="DdlPS" runat="server" CssStyle="width: 95%;" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPS_selectedindexchange"></ADS:Dropdownlost>
|
||||
<%--<asp:DropDownList ID="DdlPS" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" AppendDataBoundItems="true" DataTextField="PSCodigo" DataValueField="CvePS" ValidationGroup="GprAgregaPS" Width="220px" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="*** Actualizar listado de Productos o Servicios ***" Value="-2"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
<ADS:Dropdownlost ID="DdlPS" runat="server" CssStyle="width: 230px;" CssClass="DdlPS " CssClassDdl="table-group-action-input form-control input-inline input-sm select2me" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPS_selectedindexchange"></ADS:Dropdownlost>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -75,7 +75,7 @@ Partial Class PopUpBuscarFolio
|
||||
DdlPS.ddl.Items.Clear()
|
||||
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion)
|
||||
DdlPS.ddl.DataBind()
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user