")
+ End If
+
+ If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Then
+ Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
+ End If
+
+ CargaDatos()
+
End Sub
+
+
+ Private Sub CargaFyE()
+ Dim ObjBancos As New ClsBancos
+
+ If ObjBancos.GetLayoutFyE(DdlCuenta.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PorGrupos:=True) Then
+ DTFyE = ObjBancos.DtResultados.FiltraParametros("LEN(RFC) IN (13)")
+ Else
+ DTFyE = Nothing
+ End If
+ ObjBancos.Dispose()
+
+ If DTFyE.Rows.Count > 0 Then
+ GvProveedores.DataSource = DTFyE
+ End If
+ GvProveedores.DataBind()
+
+ UpProveedores.Update()
+ End Sub
+
+ 'Private Sub GeneraAltaFyE()
+ ' Dim DtTemp As DataTable = Nothing
+
+ ' 'REINICIA PROPIEDAS
+ ' HeaderTexto = ""
+ ' DetalleTexto = ""
+ ' TrailerTexto = ""
+ ' TotalAcumulado = 0
+ ' CreaDtAlta()
+
+ ' DtTemp = DTFyE
+
+ ' ''VALIDA CUENTAS DEPOSITOS
+ ' Dim ErrorCuenta = False
+ ' Dim FyEError As StringBuilder = New StringBuilder
+ ' FyEError.AppendFormat("
| Personal | Cuenta | Error |
")
+
+ ' Dim TotalDetalles As Integer = 0
+ ' Dim EsBancomer = False
+ ' For Each gvr As DataRow In DtTemp.Rows
+ ' If gvr("CvePersonal").ToString <> "" AndAlso gvr("EstatusPagoElectronico").ToString <> "True" AndAlso gvr("AltaCuenta").ToString = "1" Then
+ ' DTPendienteActual = DtTemp.FiltraParametros(String.Format("CveCuentaDeposito = {0}", gvr("CveCuentaDeposito").ToString))
+ ' ErrorCuenta = False
+ ' EsBancomer = False
+
+ ' If DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BBVA") Or DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Or (DTPendienteActual(0)("CLABE").ToString.Length = 18 AndAlso DTPendienteActual(0)("CLABE").ToString.Substring(0, 3) = "012") Then
+ ' EsBancomer = True
+ ' End If
+
+ ' 'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
+ ' If Not ErrorCuenta Then
+ ' If DTPendienteActual(0)("CLABE").ToString.Trim.Length <> 18 And DTPendienteActual(0)("CLABE").ToString.Trim.Length = 0 And Not EsBancomer Then
+ ' FyEError.AppendFormat("| {0} | {1} | CLABE ES OBLIGATORIA |
", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
+ ' ErrorCuenta = True
+ ' End If
+ ' End If
+
+ ' 'SI CUENTA TIENE ALGO Y BANCO BANCOMER DEBE TENER UNA LOGITUD EXACTA DE 10
+ ' If Not ErrorCuenta Then
+ ' If DTPendienteActual(0)("Cuenta").ToString.Trim.Length <> 0 AndAlso DTPendienteActual(0)("Cuenta").ToString.Trim.Length <> 10 AndAlso EsBancomer Then
+ ' FyEError.AppendFormat("| {0} | {1} | NUMERO DE CUENTA CON FORMATO INCORRECTO |
", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
+ ' ErrorCuenta = True
+ ' End If
+ ' End If
+
+ ' 'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
+ ' If Not ErrorCuenta Then
+ ' If DTPendienteActual(0)("CLABE").ToString.Trim.Length <> 0 AndAlso DTPendienteActual(0)("CLABE").ToString.Trim.Length <> 18 Then
+ ' FyEError.AppendFormat("| {0} | {1} | CLABE CON FORMATO INCORRECTO |
", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
+ ' ErrorCuenta = True
+ ' End If
+ ' End If
+
+ ' 'SI CIE TIENE ALGO DEBE TENER REFERENCIA OBLIGATORIA
+ ' If Not ErrorCuenta Then
+ ' If DTPendienteActual(0)("CIE").ToString.Trim.Length <> 0 And DTPendienteActual(0)("Referencia").ToString.Trim.Length < 3 Then
+ ' FyEError.AppendFormat("| {0} | {1} | CIE CON FORMATO INCORRECTO |
", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
+ ' ErrorCuenta = True
+ ' End If
+ ' End If
+
+ ' 'CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"
+ ' If Not ErrorCuenta Then
+ ' If EsBancomer AndAlso Not (DTPendienteActual(0)("Cuenta").ToString.Trim.Length = 10 Or DTPendienteActual(0)("CIE").ToString.Trim.Length <> 0) Then
+ ' FyEError.AppendFormat("| {0} | {1} | CUENTA BANCOMER SIN CUENTA O CIE |
", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
+ ' ErrorCuenta = True
+ ' End If
+ ' End If
+
+ ' If Not ErrorCuenta Then
+ ' If TotalDetalles > 0 Then
+ ' DetalleTexto &= vbCrLf
+ ' End If
+ ' GeneraAltaDetalleFyE()
+ ' TotalDetalles += 1
+ ' End If
+
+ ' End If
+ ' Next
+ ' FyEError.AppendFormat("
")
+
+
+ ' If TotalDetalles > 0 Then
+ ' FormarTextoAltaFyE(TotalDetalles)
+ ' CreaArchivo(2)
+
+ ' Dim Descargas As New StringBuilder()
+ ' Descargas.AppendFormat("
TXT", NombreArchivo)
+ ' 'Descargas.AppendFormat("
Reporte", NombreArchivo)
+ ' Descargas.AppendFormat("
Descargar Reporte", NombreArchivo)
+
+
+ ' Dim TextoErrorProveedores = ""
+ ' If FyEError.Length > 160 Then TextoErrorProveedores = String.Format("
Proveedores con Error:
------------------------------------------------------------------
{0}
", FyEError.ToString)
+
+ ' Alert(String.Format("
El Layout fue creado satisfactoriamente.{1}
Descargas:
", Descargas, TextoErrorProveedores), TipoMensaje.MsgInformacion)
+
+ ' 'NombreArchivo = "LayoutAltaProveedores"
+ ' 'DescargarArchivo()
+ ' Else
+ ' Alert("No hay proveedores que dar de alta", TipoMensaje.MsgInformacion)
+ ' End If
+
+
+ 'End Sub
+
+ 'Private Sub GeneraAltaDetalleFyE()
+ ' Dim Resultado = True
+ ' Dim CuentaDeposito As String = ""
+ ' Dim TipoCuentaDeposito As String = ""
+ ' Dim TipoCuenta As String = ""
+
+ ' ''''' LLENADO DE DETALLE
+ ' 'Campos #1-4 del Detalle
+ ' DetalleTexto &= String.Format("DA{0}N ", DTPendienteActual(0)("CveCuentaDeposito").ToString.ToUpper.PadLeft(30, PadCeros))
+
+ ' 'Banco BBVA
+ ' If DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BBVA") Or DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Then
+ ' 'Llenamos datos de BBVA
+ ' 'Campo #5-7 del detalle
+
+ ' 'Busca que cuenta sera la asignada para el proveedor
+ ' If DTPendienteActual(0)("CIE").ToString <> "" Then
+ ' CuentaDeposito = String.Format("02{0}", DTPendienteActual(0)("CIE").ToString.PadLeft(8, PadCeros))
+ ' TipoCuenta = "50"
+ ' TipoCuentaDeposito = "CIE"
+ ' ElseIf DTPendienteActual(0)("Cuenta").ToString.Length = 10 Then
+ ' CuentaDeposito = DTPendienteActual(0)("Cuenta").ToString
+ ' TipoCuenta = "99"
+ ' TipoCuentaDeposito = "Cuenta"
+ ' ElseIf DTPendienteActual(0)("CLABE").ToString.Length = 18 Then
+ ' CuentaDeposito = DTPendienteActual(0)("CLABE").ToString
+ ' TipoCuenta = "40"
+ ' TipoCuentaDeposito = "CLABE"
+ ' End If
+
+
+ ' DetalleTexto &= String.Format("{0}{1}{2}", DTPendienteActual(0)("Abreviatura").ToString, TipoCuenta, CuentaDeposito.PadLeft(35, PadCeros))
+
+ ' 'Llenamos en blanco datos de otros bancos
+ ' 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta
+ ' DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd"))
+
+
+ ' 'Otros Bancos NACIONAL!!
+ ' Else
+
+ ' CuentaDeposito = DTPendienteActual(0)("CLABE").ToString
+ ' TipoCuentaDeposito = "CLABE"
+
+ ' 'Llenamos en blanco datos de BBVA
+ ' DetalleTexto &= Vacio.PadRight(40)
+
+ ' 'Llenamos datos de otros bancos
+ ' 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta
+ ' DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd"))
+ ' End If
+
+ ' 'Llenamos datos de Tipo de Persona - Fisica
+ ' ' nombres Primer apellido Segundo apellido
+ ' DetalleTexto &= String.Format("F{0}{1}{2}{3}", Vacio.PadRight(70), DTPendienteActual(0)("Nombres").ToString.PadRight(20).Substring(0, 20), DTPendienteActual(0)("APaterno").ToString.PadRight(20).Substring(0, 20), DTPendienteActual(0)("AMaterno").ToString.PadRight(20).Substring(0, 20))
+
+ ' 'Campo 25-26 del detalle -- Fecha Nacimiento -- RFC
+ ' DetalleTexto &= String.Format("{0}{1}", DTPendienteActual(0)("FechaNacimiento").ToString.ToDate.ToString("yyyy-MM-dd"), DTPendienteActual(0)("RFC").ToString.ToUpper.PadRight(14))
+
+ ' 'Campos 27-32 --- Fillers --- datos de otros bancos (internacional)
+ ' DetalleTexto &= Vacio.PadLeft(153)
+
+ ' 'Campos 33-36 --- Datos de confirmacion
+ ' DetalleTexto &= String.Format("{0}02{1}", Vacio.PadRight(40), CorreoNotificacionesEmpresa.ToUpper.PadRight(50))
+
+ ' 'If DTPendienteActual(0)("ContactoMail").ToString.Length > 0 Then
+ ' ' 'DetalleTexto &= String.Format("{0}02{1}", Vacio.PadRight(40), DTPendienteActual(0)("ContactoMail").ToString.ToUpper.PadRight(50))
+ ' 'ElseIf DTPendienteActual(0)("ContactoMail").ToString.Length <= 0 Then
+ ' ' DetalleTexto &= String.Format("{0}00{1}", Vacio.PadRight(40), Vacio.PadRight(50))
+ ' 'End If
+
+ ' 'Campos 37-39 -- FILLER
+ ' DetalleTexto &= String.Format("00{0}", Vacio.PadRight(38))
+
+
+ ' ''LLENA DT PARA REPORTE
+ ' Dim Row = DtAlta.NewRow()
+ ' Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
+ ' Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString
+ ' Row("TipoCuenta") = TipoCuentaDeposito
+ ' 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
+ ' 'Campos #1-4 del Header
+ ' HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd"))
+ ' 'Campo #5 del Header
+ ' HeaderTexto &= String.Format("{0}{1}", UsuarioActual.CveUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20)
+ ' 'Campos #6-8 del Header
+ ' HeaderTexto &= String.Format("00").PadRight(586)
+ ' Dim HeaderLength = HeaderTexto.Length
+
+ ' ''''' LLENADO DE TRAILER
+ ' TrailerTexto = String.Format("T{0}{1}{2}", Registros.ToString.PadLeft(10, PadCeros), Vacio.PadRight(50, PadCeros), Vacio.PadRight(575))
+
+ ' ''''' ARMADO DEL TEXTO COMPLETO
+ ' TextoCompleto = String.Format("{1}{0}{2}{0}{3}{0}", vbCrLf, HeaderTexto, DetalleTexto, TrailerTexto)
+ ' 'TxtAltas.Text = TextoCompleto
+ 'End Sub
+
#End Region
@@ -2188,9 +2417,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
diff --git a/Inventarios/RecepcionAlmacen.aspx b/Inventarios/RecepcionAlmacen.aspx
index 0c9fa6b71..8d742140e 100644
--- a/Inventarios/RecepcionAlmacen.aspx
+++ b/Inventarios/RecepcionAlmacen.aspx
@@ -167,7 +167,7 @@
Almacén: