pagoelectronico grupos
This commit is contained in:
@@ -3122,6 +3122,13 @@ Public Class ClsBancos
|
|||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|
||||||
|
Catch Ex1 As SqlException
|
||||||
|
If Ex1.Message.Contains("Número: 2627;") Then
|
||||||
|
Alert("Ya existe un registro con el mismo Folio", TipoMensaje.MsgAdvertencia)
|
||||||
|
Else
|
||||||
|
Me.OnError("Ocurrió un error al guardar los cambios", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al actualizar El movimiento Bancario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al actualizar El movimiento Bancario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -1369,7 +1369,9 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
#Region "G E N E R A L E S - C U E N T A S B A N C A R I A S "
|
#Region "G E N E R A L E S - C U E N T A S B A N C A R I A S "
|
||||||
Public Function GetCuentasDepositos(Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As Boolean
|
Public Function GetCuentasDepositos(Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Gral_CuentasDepositosGet")
|
DataAdapter("PA_Gral_CuentasDepositosGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
@@ -1389,8 +1391,9 @@ Public Class ClsGenerales
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function AddCuentasDepositos(BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, CveUsuario As Integer, CveMoneda As Integer,
|
Public Function AddCuentasDepositos(BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, CveUsuario As Integer, CveMoneda As Integer,
|
||||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
|
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
|
||||||
Optional Correo As String = "", Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1) As Boolean
|
Optional Correo As String = "", Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1,
|
||||||
|
Optional ConceptoCIE As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Gral_CuentasDepositosAdd")
|
DataAdapter("PA_Gral_CuentasDepositosAdd")
|
||||||
@@ -1417,6 +1420,7 @@ Public Class ClsGenerales
|
|||||||
.Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico
|
.Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico
|
||||||
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
|
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
|
||||||
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
||||||
|
.Add("@ConceptoCIE", SqlDbType.VarChar).Value = ConceptoCIE
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -1435,6 +1439,7 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function RemoveCuentasDepositos(CveCuentaDeposito As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean
|
Public Function RemoveCuentasDepositos(CveCuentaDeposito As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1461,7 +1466,8 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
Public Function UpdateCuentasDepositos(CveCuentaDeposito As Integer, BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String,
|
Public Function UpdateCuentasDepositos(CveCuentaDeposito As Integer, BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String,
|
||||||
RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "",
|
RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "",
|
||||||
Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1) As Boolean
|
Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1,
|
||||||
|
Optional ConceptoCIE As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Gral_CuentasDepositosUpdate")
|
DataAdapter("PA_Gral_CuentasDepositosUpdate")
|
||||||
@@ -1487,6 +1493,7 @@ Public Class ClsGenerales
|
|||||||
.Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico
|
.Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico
|
||||||
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
|
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
|
||||||
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
||||||
|
.Add("@ConceptoCIE", SqlDbType.VarChar).Value = ConceptoCIE
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -1506,7 +1513,7 @@ Public Class ClsGenerales
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito As Integer, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer, BBVAAlias As String) As Boolean
|
Public Function UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito As Integer, EstatusPagoElectronicoGrupos As Integer, CveSATBanco As Integer, BBVAAlias As String, Referencia As String, ConceptoCIE As String) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1514,21 +1521,17 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveCuentaDeposito", SqlDbType.VarChar).Value = CveCuentaDeposito
|
.Add("@CveCuentaDeposito", SqlDbType.VarChar).Value = CveCuentaDeposito
|
||||||
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
|
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Int).Value = EstatusPagoElectronicoGrupos
|
||||||
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
||||||
.Add("@BBVAAlias", SqlDbType.VarChar).Value = BBVAAlias
|
.Add("@BBVAAlias", SqlDbType.VarChar).Value = BBVAAlias
|
||||||
|
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
|
||||||
|
.Add("@ConceptoCIE", SqlDbType.VarChar).Value = ConceptoCIE
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch Ex1 As SqlException
|
|
||||||
If Ex1.Message.Contains("Número: 2627;") Then
|
|
||||||
Alert("Ya existe un registro con el mismo nombre", TipoMensaje.MsgAdvertencia)
|
|
||||||
Else
|
|
||||||
Me.OnError("Ocurrió un error al guardar los cambios", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al guardar los cambios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al guardar los cambios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -573,6 +573,7 @@ Partial Class Bancos_IE
|
|||||||
CveCredito = IfNull(Request("CveCredito"), "-1").ToString.ToEntero
|
CveCredito = IfNull(Request("CveCredito"), "-1").ToString.ToEntero
|
||||||
CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero
|
CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero
|
||||||
LtlTitulo.Text = "Pago de Créditos"
|
LtlTitulo.Text = "Pago de Créditos"
|
||||||
|
CveIE = -1
|
||||||
|
|
||||||
DVInteresMoratorio.Visible = True
|
DVInteresMoratorio.Visible = True
|
||||||
|
|
||||||
@@ -4642,7 +4643,7 @@ Partial Class Bancos_IE
|
|||||||
Dim Dep As New ClsGenerales
|
Dim Dep As New ClsGenerales
|
||||||
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
|
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue = "9" And CveIE = Nothing Then
|
If DdlTipoTransaccion.SelectedValue = "9" And CveIE <= -1 Then
|
||||||
|
|
||||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||||
|
|
||||||
@@ -4653,7 +4654,7 @@ Partial Class Bancos_IE
|
|||||||
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE = Nothing Then
|
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
|
||||||
|
|
||||||
|
|
||||||
If Dep.DtResultados.Rows.Count > 0 Then
|
If Dep.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -4685,7 +4686,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE = Nothing Then
|
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
|
||||||
|
|
||||||
BtnGuardar.Enabled = False
|
BtnGuardar.Enabled = False
|
||||||
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
|||||||
@@ -1979,7 +1979,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
'Dim CveTipoTransaccion As Integer = Parametros(4).ToEntero
|
'Dim CveTipoTransaccion As Integer = Parametros(4).ToEntero
|
||||||
'Dim Estatus As Integer = If(CveTipoTransaccion = 2, 2, 1) ' cuando es transferencia, no lo pasa por entregar
|
'Dim Estatus As Integer = If(CveTipoTransaccion = 2, 2, 1) ' cuando es transferencia, no lo pasa por entregar
|
||||||
|
|
||||||
' Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
'Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -732,7 +732,7 @@
|
|||||||
<asp:BoundField HeaderText="Banco" DataField="BancoNombre" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Banco" DataField="BancoNombre" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Cuenta" DataField="Cuenta" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Cuenta" DataField="Cuenta" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="Clabe" DataField="CLABEDestino" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="CLABE" DataField="CLABE" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Banco" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px">
|
<asp:TemplateField HeaderText="Banco" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px">
|
||||||
@@ -855,19 +855,20 @@
|
|||||||
<div class="col-md-12" runat="server" id="DVDescargaCuentas2" visible=" false">
|
<div class="col-md-12" runat="server" id="DVDescargaCuentas2" visible=" false">
|
||||||
<p> Cuentas Interbancarias <asp:LinkButton runat="server" ID="LnkDescargaCuentas2" OnClick="LnkDescargaCuentas2_Click" CssClass="Texto"></asp:LinkButton> </p>
|
<p> Cuentas Interbancarias <asp:LinkButton runat="server" ID="LnkDescargaCuentas2" OnClick="LnkDescargaCuentas2_Click" CssClass="Texto"></asp:LinkButton> </p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-12" runat="server" id="DVDescargaCuentas3" visible=" false">
|
||||||
|
<p> Cuentas Convennios CIE <asp:LinkButton runat="server" ID="LnkDescargaCuentas3" OnClick="LnkDescargaCuentas3_Click" CssClass="Texto"></asp:LinkButton> </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-md-12" runat="server" id="DVDescargaReporte" visible=" false">
|
<div class="col-md-12" runat="server" id="DVDescargaReporte" visible=" false">
|
||||||
<p> <asp:LinkButton runat="server" ID="LnkDescargaReporte" OnClick="LnkDescargaReporte_Click" CssClass="Texto" Text="Descargar Reporte"></asp:LinkButton> </p>
|
<p> <asp:LinkButton runat="server" ID="LnkDescargaReporte" OnClick="LnkDescargaReporte_Click" CssClass="Texto" Text="Descargar Reporte"></asp:LinkButton> </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LnkDescarga" />
|
<asp:PostBackTrigger ControlID="LnkDescarga" />
|
||||||
<asp:PostBackTrigger ControlID="LnkDescargaCuentas1" />
|
<asp:PostBackTrigger ControlID="LnkDescargaCuentas1" />
|
||||||
<asp:PostBackTrigger ControlID="LnkDescargaCuentas2" />
|
<asp:PostBackTrigger ControlID="LnkDescargaCuentas2" />
|
||||||
|
<asp:PostBackTrigger ControlID="LnkDescargaCuentas3" />
|
||||||
<asp:PostBackTrigger ControlID="LnkDescargaReporte" />
|
<asp:PostBackTrigger ControlID="LnkDescargaReporte" />
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|||||||
@@ -202,6 +202,16 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Property NombreArchivoCIE As String
|
||||||
|
Get
|
||||||
|
Return ViewState("NombreArchivoCIE").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("NombreArchivoCIE") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Property DTSATBancos As DataTable
|
Property DTSATBancos As DataTable
|
||||||
Get
|
Get
|
||||||
If ViewState("DTSATBancos") Is Nothing Then
|
If ViewState("DTSATBancos") Is Nothing Then
|
||||||
@@ -260,7 +270,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
Property DTFoliosPrefijos As DataTable
|
Property DTFoliosPrefijos As DataTable
|
||||||
Get
|
Get
|
||||||
If ViewState("DTFoliosPrefijos") Is Nothing Then
|
If ViewState("DTFoliosPrefijos") Is Nothing Then
|
||||||
Return Crate_DTFoliosPrefijos()
|
Crate_DTFoliosPrefijos()
|
||||||
|
Return DirectCast(ViewState("DTFoliosPrefijos"), DataTable)
|
||||||
Else
|
Else
|
||||||
Return DirectCast(ViewState("DTFoliosPrefijos"), DataTable)
|
Return DirectCast(ViewState("DTFoliosPrefijos"), DataTable)
|
||||||
End If
|
End If
|
||||||
@@ -300,16 +311,18 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Function Crate_DTFoliosPrefijos() As DataTable
|
Private Sub Crate_DTFoliosPrefijos()
|
||||||
|
|
||||||
Dim DTFolios As New DataTable
|
Dim DTFolios As New DataTable
|
||||||
DTFolios.Columns.Add("CveIE", GetType(Integer))
|
DTFolios.Columns.Add("CveIE", GetType(Integer))
|
||||||
DTFolios.Columns.Add("Folio", GetType(String))
|
DTFolios.Columns.Add("Folio", GetType(String))
|
||||||
DTFolios.AcceptChanges()
|
DTFolios.AcceptChanges()
|
||||||
|
|
||||||
Return DTFolios
|
ViewState("DTFoliosPrefijos") = DTFolios.Copy
|
||||||
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region " C A R G A - D A T O S "
|
#Region " C A R G A - D A T O S "
|
||||||
@@ -480,6 +493,13 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||||
|
|
||||||
|
If File.Exists(path) Then
|
||||||
|
|
||||||
|
File.Delete(path)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
Dim fs As FileStream = File.Create(path)
|
Dim fs As FileStream = File.Create(path)
|
||||||
|
|
||||||
' Add text to the file.
|
' Add text to the file.
|
||||||
@@ -690,9 +710,16 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
NombreArchivoBancomer = ""
|
NombreArchivoBancomer = ""
|
||||||
NombreArchivoInterbancario = ""
|
NombreArchivoInterbancario = ""
|
||||||
|
NombreArchivoCIE = ""
|
||||||
|
|
||||||
|
DVDescargaCuentas1.Visible = False
|
||||||
|
DVDescargaCuentas2.Visible = False
|
||||||
|
DVDescargaCuentas3.Visible = False
|
||||||
|
|
||||||
NombreArchivo = ""
|
NombreArchivo = ""
|
||||||
|
|
||||||
Dim RegistrosAltaBancomer As New StringBuilder
|
Dim RegistrosAltaBancomer As New StringBuilder
|
||||||
|
Dim RegistrosAltaBancomerCIE As New StringBuilder
|
||||||
Dim RegistrosAltaInterbancario As New StringBuilder
|
Dim RegistrosAltaInterbancario As New StringBuilder
|
||||||
Dim SBErrores As New StringBuilder
|
Dim SBErrores As New StringBuilder
|
||||||
|
|
||||||
@@ -711,12 +738,13 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
DtCuentasPendientesTemp.CaseSensitive = False
|
DtCuentasPendientesTemp.CaseSensitive = False
|
||||||
|
|
||||||
Dim DtCuentasPendientesBancomer As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' ) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias"})
|
Dim DtCuentasPendientesBancomer As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' AND CveBanco = '012' AND LEN(CIE) = 0) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias", "CIE"})
|
||||||
Dim DtCuentasPendientesInterbancarias As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre not like '%BBVA%' AND BancoNombre not like '%BANCOMER%' ) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias"})
|
Dim DtCuentasPendientesCIE As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' AND LEN(CIE) > 0 AND CveBanco = '012') ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias", "CIE"})
|
||||||
|
Dim DtCuentasPendientesInterbancarias As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre not like '%BBVA%' AND BancoNombre not like '%BANCOMER%' ) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias", "CIE"})
|
||||||
|
|
||||||
|
|
||||||
'Dim ObjGrales As New ClsGenerales
|
|
||||||
|
|
||||||
|
'Cuentas bancomer
|
||||||
If DtCuentasPendientesBancomer.Rows.Count > 0 Then
|
If DtCuentasPendientesBancomer.Rows.Count > 0 Then
|
||||||
For Each dRow As DataRow In DtCuentasPendientesBancomer.Rows
|
For Each dRow As DataRow In DtCuentasPendientesBancomer.Rows
|
||||||
|
|
||||||
@@ -775,10 +803,60 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
NombreArchivoBancomer = NombreArchivo
|
NombreArchivoBancomer = NombreArchivo
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'Cuentas bancomer CIE
|
||||||
|
If DtCuentasPendientesCIE.Rows.Count > 0 Then
|
||||||
|
For Each dRow As DataRow In DtCuentasPendientesCIE.Rows
|
||||||
|
|
||||||
|
Dim SBTmpBancomerCIE As New StringBuilder
|
||||||
|
Dim SBErroresBancomerCIE As New StringBuilder
|
||||||
|
Dim ErrorLineaBancomerCIE As Boolean = False
|
||||||
|
|
||||||
|
SBErroresBancomerCIE.Append($"{dRow("RazonSocial").ToString } ")
|
||||||
|
SBErroresBancomerCIE.Append($"Cuenta: {dRow("Cuenta").ToString } ")
|
||||||
|
|
||||||
|
SBTmpBancomerCIE.Append("CV")
|
||||||
|
SBTmpBancomerCIE.Append(dRow("CIE").ToString.PadLeft(18, CeroRelleno))
|
||||||
|
|
||||||
|
If dRow("Abreviatura").ToString.Length = 3 Then
|
||||||
|
SBTmpBancomerCIE.Append(dRow("Abreviatura"))
|
||||||
|
Else
|
||||||
|
SBErroresBancomerCIE.Append("El tamaño de la divisa es incorrecto, ")
|
||||||
|
ErrorLineaBancomerCIE = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
SBTmpBancomerCIE.Append("0999999999999.99")
|
||||||
|
|
||||||
|
If dRow("RazonSocial").ToString.Trim.Length < 31 Then 'Tamaño maximo 30
|
||||||
|
SBTmpBancomerCIE.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
||||||
|
Else
|
||||||
|
SBTmpBancomerCIE.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30))
|
||||||
|
End If
|
||||||
|
|
||||||
|
'ALIAS DE LA CUENTA PENDIENTE TAMAÑO MAXIMO 30
|
||||||
|
SBTmpBancomerCIE.Append(dRow("BBVAAlias").ToString.PadRight(30, EspacioRelleno))
|
||||||
|
|
||||||
|
SBTmpBancomerCIE.Append(vbCrLf)
|
||||||
|
|
||||||
|
If Not ErrorLineaBancomerCIE Then
|
||||||
|
RegistrosAltaBancomerCIE.Append(SBTmpBancomerCIE.ToString)
|
||||||
|
Else
|
||||||
|
SBErroresBancomerCIE.Append("<br>")
|
||||||
|
SBErrores.AppendLine(SBErroresBancomerCIE.ToString)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
TextoCompleto = RegistrosAltaBancomerCIE.ToString
|
||||||
|
|
||||||
|
If CreaArchivo(2, True) Then
|
||||||
|
NombreArchivoCIE = NombreArchivo
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If DtCuentasPendientesInterbancarias.Rows.Count > 0 Then
|
If DtCuentasPendientesInterbancarias.Rows.Count > 0 Then
|
||||||
@@ -867,17 +945,13 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
|
|
||||||
If NombreArchivoBancomer.Trim.Length > 0 Then
|
If NombreArchivoBancomer.Trim.Length > 0 Then
|
||||||
|
|
||||||
DVDescargaCuentas1.Visible = True
|
DVDescargaCuentas1.Visible = True
|
||||||
' Mensaje.Append($"Cuentas Bancomer <a class='Texto' href='../Empresas/{UsuarioActual.CveEmpresa}/Layout/{NombreArchivoBancomer}' download > Descarga Archivo cuentas Bancomer</a> <br><br>")
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If NombreArchivoInterbancario.Trim.Length > 0 Then
|
If NombreArchivoInterbancario.Trim.Length > 0 Then
|
||||||
DVDescargaCuentas2.Visible = True
|
DVDescargaCuentas2.Visible = True
|
||||||
'Mensaje.Append($"Cuentas Interbancarias <a class='Texto' href='../Empresas/{UsuarioActual.CveEmpresa}/Layout/{NombreArchivoInterbancario}' download >Descarga Archivo cuentas Bancomer</a> <br><br>")
|
End If
|
||||||
|
If NombreArchivoCIE.Trim.Length > 0 Then
|
||||||
|
DVDescargaCuentas3.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -888,21 +962,18 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
Mensaje.Append("</div>")
|
Mensaje.Append("</div>")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Then
|
If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Or NombreArchivoCIE.Length > 0 Then
|
||||||
|
|
||||||
|
|
||||||
LnkDescargaCuentas1.Text = NombreArchivoBancomer
|
LnkDescargaCuentas1.Text = NombreArchivoBancomer
|
||||||
LnkDescargaCuentas2.Text = NombreArchivoInterbancario
|
LnkDescargaCuentas2.Text = NombreArchivoInterbancario
|
||||||
|
LnkDescargaCuentas3.Text = NombreArchivoCIE
|
||||||
|
|
||||||
RegistraScript("$('#ModalDescarga').modal({ backdrop: 'static', keyboard: false});")
|
RegistraScript("$('#ModalDescarga').modal({ backdrop: 'static', keyboard: false});")
|
||||||
|
|
||||||
UpModalDescarga.Update()
|
UpModalDescarga.Update()
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1068,6 +1139,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
'Alert("Hola")
|
'Alert("Hola")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub FormarTexto(Registros As Integer)
|
Protected Sub FormarTexto(Registros As Integer)
|
||||||
'''''' LLENADO HEADER
|
'''''' LLENADO HEADER
|
||||||
Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString
|
Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString
|
||||||
@@ -1118,7 +1190,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
Dim RegistrosPago As New StringBuilder
|
Dim RegistrosPago As New StringBuilder
|
||||||
Dim MENSAJEError As New StringBuilder
|
Dim MENSAJEError As New StringBuilder
|
||||||
|
|
||||||
|
Dim EsCIE As Boolean = False
|
||||||
Dim CeroRelleno As Char = "0"c
|
Dim CeroRelleno As Char = "0"c
|
||||||
Dim EspacioRelleno As Char = Chr(32)
|
Dim EspacioRelleno As Char = Chr(32)
|
||||||
Dim ErrorLayout = False
|
Dim ErrorLayout = False
|
||||||
@@ -1132,40 +1204,53 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
MENSAJEError.AppendLine($"Error al generar pago <br>")
|
MENSAJEError.AppendLine($"Error al generar pago <br>")
|
||||||
MENSAJEError.AppendLine($" Proveedor: {drow("RazonSocial").ToString} detalle: { drow("Observaciones").ToString} <br>")
|
MENSAJEError.AppendLine($" Proveedor: {drow("RazonSocial").ToString} detalle: { drow("Observaciones").ToString} <br>")
|
||||||
|
|
||||||
|
'CveBanco = '012'
|
||||||
|
If drow("CveBanco").ToString.Trim = "012" Then
|
||||||
|
If drow("CIE").ToString.Trim.Length > 0 Then 'cuenta bancomer Con convenio CIE
|
||||||
|
EsCIE = True
|
||||||
|
If drow("CIE").ToString.Trim.Length > 0 Then
|
||||||
|
RegistrosPago.Append("CIL")
|
||||||
|
Else
|
||||||
|
ErrorLayout = True
|
||||||
|
MENSAJEError.AppendLine("ERROR en tamaño de CIE")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
RegistrosPago.Append("PTC") 'cuenta bancomer
|
||||||
|
End If
|
||||||
|
|
||||||
If drow("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Or drow("BancoNombre").ToString.ToUpper.Contains("BBVA") Then
|
|
||||||
RegistrosPago.Append("PTC")
|
|
||||||
Else
|
Else
|
||||||
RegistrosPago.Append("PSC")
|
RegistrosPago.Append("PSC")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If drow("CLABEDestino").ToString.Trim.Length.Contiene(10, 18) Then
|
If EsCIE Then
|
||||||
RegistrosPago.Append(drow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
|
|
||||||
Else
|
If drow("ConceptoCIE").ToString.Length <= 30 Then
|
||||||
ErrorLayout = True
|
RegistrosPago.Append(drow("ConceptoCIE").ToString.PadRight(30, CeroRelleno))
|
||||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta destino")
|
Else
|
||||||
Exit For
|
ErrorLayout = True
|
||||||
End If
|
MENSAJEError.AppendLine("ERROR Tamaño de ConceptoCIE.")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
|
If drow("CIE").ToString.Length < 5 Or drow("CIE").ToString.Length > 7 Then
|
||||||
|
ErrorLayout = True
|
||||||
|
MENSAJEError.AppendLine("ERROR Tamaño de CIE (rango 5-7).")
|
||||||
|
Exit For
|
||||||
|
Else
|
||||||
|
RegistrosPago.Append(drow("CIE").ToString.PadLeft(7, CeroRelleno))
|
||||||
|
End If
|
||||||
|
|
||||||
RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
|
If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
|
||||||
|
RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
|
||||||
|
Else
|
||||||
|
ErrorLayout = True
|
||||||
|
MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
|
||||||
ErrorLayout = True
|
|
||||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RegistrosPago.Append(drow("Abreviatura").ToString)
|
|
||||||
RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
|
|
||||||
|
|
||||||
|
|
||||||
If drow("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Or drow("BancoNombre").ToString.ToUpper.Contains("BBVA") Then
|
|
||||||
|
|
||||||
|
|
||||||
If drow("Observaciones").ToString.Trim.Length = 0 Then
|
If drow("Observaciones").ToString.Trim.Length = 0 Then
|
||||||
@@ -1185,7 +1270,78 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
|
||||||
|
If drow("Referencia").ToString.Trim.Length > 20 Then
|
||||||
|
RegistrosPago.Append(drow("Referencia").ToString.Substring(0, 20))
|
||||||
|
Else
|
||||||
|
RegistrosPago.Append(drow("Referencia").ToString.PadRight(20, EspacioRelleno))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
ElseIf drow("CveBanco").ToString.Trim = "012" And drow("CIE").ToString.Trim.Length = 0 Then
|
||||||
|
|
||||||
|
'cuentas Inicio
|
||||||
|
If drow("CLABEDestino").ToString.Trim.Length.Contiene(10, 18) Then
|
||||||
|
RegistrosPago.Append(drow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
|
||||||
|
Else
|
||||||
|
ErrorLayout = True
|
||||||
|
MENSAJEError.AppendLine("ERROR EN CLABE cuenta destino")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
|
||||||
|
RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
|
||||||
|
Else
|
||||||
|
ErrorLayout = True
|
||||||
|
MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
'cuentas Fin
|
||||||
|
|
||||||
|
|
||||||
|
RegistrosPago.Append(drow("Abreviatura").ToString)
|
||||||
|
RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
|
||||||
|
|
||||||
|
|
||||||
|
If drow("Observaciones").ToString.Trim.Length = 0 Then
|
||||||
|
|
||||||
|
If drow("RazonSocial").ToString.Trim.Length > 30 Then
|
||||||
|
RegistrosPago.Append(drow("RazonSocial").ToString.Substring(0, 30))
|
||||||
|
Else
|
||||||
|
RegistrosPago.Append(drow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
|
||||||
|
If drow("Observaciones").ToString.Trim.Length > 30 Then
|
||||||
|
RegistrosPago.Append(drow("Observaciones").ToString.Substring(0, 30))
|
||||||
|
Else
|
||||||
|
RegistrosPago.Append(drow("Observaciones").ToString.PadRight(30, EspacioRelleno))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
ElseIf drow("CveBanco").ToString <> "012" Then 'I N T E R B A N C A R I O
|
||||||
|
|
||||||
|
'cuentas Inicio
|
||||||
|
If drow("CLABEDestino").ToString.Trim.Length.Contiene(10, 18) Then
|
||||||
|
RegistrosPago.Append(drow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
|
||||||
|
Else
|
||||||
|
ErrorLayout = True
|
||||||
|
MENSAJEError.AppendLine("ERROR EN CLABE cuenta destino")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
|
||||||
|
RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
|
||||||
|
Else
|
||||||
|
ErrorLayout = True
|
||||||
|
MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
'cuentas Fin
|
||||||
|
|
||||||
|
RegistrosPago.Append(drow("Abreviatura").ToString)
|
||||||
|
RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
|
||||||
|
|
||||||
If drow("RazonSocial").ToString.Length <= 30 Then
|
If drow("RazonSocial").ToString.Length <= 30 Then
|
||||||
RegistrosPago.Append(drow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
RegistrosPago.Append(drow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
||||||
@@ -1217,8 +1373,14 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
RegistrosPago.Append("H")
|
RegistrosPago.Append("H")
|
||||||
|
|
||||||
|
Else
|
||||||
|
ErrorLayout = True
|
||||||
|
MENSAJEError.AppendLine("Parametros incorrecots")
|
||||||
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ErrorLayout Then
|
If ErrorLayout Then
|
||||||
Alert(MENSAJEError.ToString(), TipoMensaje.MsgAdvertencia)
|
Alert(MENSAJEError.ToString(), TipoMensaje.MsgAdvertencia)
|
||||||
Exit For
|
Exit For
|
||||||
@@ -1300,6 +1462,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
DVDescargaPagos.Visible = True
|
DVDescargaPagos.Visible = True
|
||||||
DVDescargaCuentas1.Visible = False
|
DVDescargaCuentas1.Visible = False
|
||||||
DVDescargaCuentas2.Visible = False
|
DVDescargaCuentas2.Visible = False
|
||||||
|
DVDescargaCuentas3.Visible = False
|
||||||
DVDescargaReporte.Visible = True
|
DVDescargaReporte.Visible = True
|
||||||
|
|
||||||
DT_PagosReporte = DTPendientesTemp.Copy
|
DT_PagosReporte = DTPendientesTemp.Copy
|
||||||
@@ -1934,7 +2097,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
If ObjBancos.GetLayoutProveedores(DdlCuenta.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PorGrupos:=True) Then
|
If ObjBancos.GetLayoutProveedores(DdlCuenta.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PorGrupos:=True) Then
|
||||||
DTProveedores = ObjBancos.DtResultados.FiltraParametros("LEN(RFC) IN (12,13)")
|
DTProveedores = ObjBancos.DtResultados.FiltraParametros("LEN(RFC) IN (12,13)")
|
||||||
Else
|
Else
|
||||||
DTProveedores = Nothing
|
DTProveedores = New DataTable
|
||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
@@ -2054,17 +2217,17 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
strBody.AppendFormat(" <legend><b> </b></legend>")
|
strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||||
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||||
|
|
||||||
If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||||
strBody.Append(" <tr style=""height: 22px""> ")
|
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||||
strBody.Append(" <td>Usted puede pasar a recorger el cheque en las oficinas administrativas.</td> ")
|
' strBody.Append(" <td>Usted puede pasar a recorger el cheque en las oficinas administrativas.</td> ")
|
||||||
strBody.Append(" </tr> ")
|
' strBody.Append(" </tr> ")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
' If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||||
strBody.Append(" <tr style=""height: 22px""> ")
|
strBody.Append(" <tr style=""height: 22px""> ")
|
||||||
strBody.Append(" <td>Se notifica el envío de transferencia de pago.</td> ")
|
strBody.Append(" <td>Se notifica el envío de transferencia de pago.</td> ")
|
||||||
strBody.Append(" </tr> ")
|
strBody.Append(" </tr> ")
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
strBody.Append(" <tr style=""height: 22px""> ")
|
strBody.Append(" <tr style=""height: 22px""> ")
|
||||||
strBody.AppendFormat(" <td> </td> ")
|
strBody.AppendFormat(" <td> </td> ")
|
||||||
@@ -2599,7 +2762,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
Dim DTGvCuentasPendientes As DataTable = DTPendientes.Copy.FiltraParametros("CveCuentaDeposito > 0", "", {"CveCuentaDeposito", "BancoNombre", "RazonSocial", "Cuenta", "CLABEDestino", "BBVAAlias", "EstatusPagoElectronicoGrupos", "CveSATBanco"})
|
Dim DTGvCuentasPendientes As DataTable = DTPendientes.Copy.FiltraParametros("CveCuentaDeposito > 0", "", {"CveCuentaDeposito", "BancoNombre", "RazonSocial", "Cuenta", "CLABEDestino", "BBVAAlias", "EstatusPagoElectronicoGrupos", "CveSATBanco", "CLABE"})
|
||||||
|
|
||||||
GvCuentasModal.DataSource = DTGvCuentasPendientes
|
GvCuentasModal.DataSource = DTGvCuentasPendientes
|
||||||
GvCuentasModal.DataBind()
|
GvCuentasModal.DataBind()
|
||||||
@@ -2642,7 +2805,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
Dim DdlSatBanco As DropDownList = GvRow.FCDropDownList("DdlSatBanco")
|
Dim DdlSatBanco As DropDownList = GvRow.FCDropDownList("DdlSatBanco")
|
||||||
|
|
||||||
|
|
||||||
If Not ObjGenerales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito, ChkCuentasEstatus.Checked, DdlSatBanco.SelectedValue.ToEntero, TxtBBVAAlias.Text) Then
|
If Not ObjGenerales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito, If(ChkCuentasEstatus.Checked, 1, 0), DdlSatBanco.SelectedValue.ToEntero, TxtBBVAAlias.Text, "-1", "-1") Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -2789,7 +2952,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
Dim ErrorProceso As Boolean = False
|
Dim ErrorProceso As Boolean = False
|
||||||
Dim ObjBanco As New ClsBancos
|
Dim ObjBanco As New ClsBancos
|
||||||
'ObjBanco.IniciaTransacSQL()
|
ObjBanco.IniciaTransacSQL()
|
||||||
|
|
||||||
Dim CveLayoutEnvioDetalle As Integer = GvRow.DataKey("CveLayoutEnvioDetalle").ToEntero
|
Dim CveLayoutEnvioDetalle As Integer = GvRow.DataKey("CveLayoutEnvioDetalle").ToEntero
|
||||||
Dim CveLayoutEnvio As Integer = GvRow.DataKey("CveLayoutEnvio").ToEntero
|
Dim CveLayoutEnvio As Integer = GvRow.DataKey("CveLayoutEnvio").ToEntero
|
||||||
@@ -2797,24 +2960,29 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
Dim CveProveedor As Integer = GvRow.DataKey("CveProveedor").ToEntero
|
Dim CveProveedor As Integer = GvRow.DataKey("CveProveedor").ToEntero
|
||||||
Dim NotificarA As String = GvRow.DataKey("NotificarA")
|
Dim NotificarA As String = GvRow.DataKey("NotificarA")
|
||||||
|
|
||||||
|
Dim FOrigen As String = $"{UsuarioActual.Empresa.Ruta}..\Temp\{Comprobante}"
|
||||||
|
Dim FDestino As String = $"{UsuarioActual.Empresa.Ruta}\IE\{Comprobante}"
|
||||||
|
|
||||||
|
|
||||||
If Not ObjBanco.UpdateLayoutEnviosDetalle(CveLayoutEnvioDetalle, CveLayoutEnvio, CveIE, CveProveedor, 2, "", True) Then
|
If Not ObjBanco.UpdateLayoutEnviosDetalle(CveLayoutEnvioDetalle, CveLayoutEnvio, CveIE, CveProveedor, 2, "", True) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
DTFoliosPrefijos.Clear()
|
DTFoliosPrefijos.Clear()
|
||||||
|
|
||||||
For Each RowGV As GridViewRow In GvEnviadas.Rows
|
For Each RowGV As GridViewRow In GvEnviadas.Rows
|
||||||
|
If RowGV.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
Dim nRow As DataRow = DTFoliosPrefijos.NewRow
|
Dim nRow As DataRow
|
||||||
|
nRow = DTFoliosPrefijos.NewRow
|
||||||
|
|
||||||
nRow("CveIE") = RowGV.DataKey("CveIE").ToEntero
|
nRow("CveIE") = RowGV.DataKey("CveIE").ToEntero
|
||||||
nRow("Folio") = RowGV.FCTextBox("TxtFolio").Text.Trim
|
nRow("Folio") = RowGV.FCTextBox("TxtFolio").Text.Trim
|
||||||
|
|
||||||
DTFoliosPrefijos.Rows.Add(nRow)
|
DTFoliosPrefijos.Rows.Add(nRow)
|
||||||
|
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
DTFoliosPrefijos.AcceptChanges()
|
DTFoliosPrefijos.AcceptChanges()
|
||||||
|
|
||||||
@@ -2829,8 +2997,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
Dim FOrigen As String = $"{UsuarioActual.Empresa.Ruta}..\Temp\{Comprobante}"
|
|
||||||
Dim FDestino As String = $"{UsuarioActual.Empresa.Ruta}\IE\{Comprobante}"
|
|
||||||
|
|
||||||
If File.Exists(FDestino) Then
|
If File.Exists(FDestino) Then
|
||||||
File.Delete(FDestino)
|
File.Delete(FDestino)
|
||||||
@@ -2850,12 +3017,19 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
Else
|
Else
|
||||||
ObjBanco.Commit()
|
ObjBanco.Commit()
|
||||||
Alert("Confirmado Correctamente")
|
Alert("Confirmado Correctamente")
|
||||||
NotificacionPago(CveIE, NotificarA)
|
|
||||||
|
If Comprobante = "-1" Then
|
||||||
|
FDestino = ""
|
||||||
|
End If
|
||||||
|
|
||||||
|
NotificacionPago(CveIE, NotificarA, FDestino)
|
||||||
|
|
||||||
CargaEnviados()
|
CargaEnviados()
|
||||||
|
|
||||||
For Each RowGV As GridViewRow In GvEnviadas.Rows
|
For Each RowGV As GridViewRow In GvEnviadas.Rows
|
||||||
RowGV.FCTextBox("TxtFolio").Text = DTFoliosPrefijos.FiltroPrimeroValor("Folio", $"CveIE = {RowGV.DataKey("CveIE").ToEntero}")
|
If RowGV.RowType = DataControlRowType.DataRow Then
|
||||||
|
RowGV.FCTextBox("TxtFolio").Text = DTFoliosPrefijos.FiltroPrimeroValor("Folio", $"CveIE = {RowGV.DataKey("CveIE").ToEntero}")
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
UpEnviados.Update()
|
UpEnviados.Update()
|
||||||
@@ -3077,12 +3251,6 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkDescarga_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkDescarga_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim FileName As String = NombreArchivo
|
Dim FileName As String = NombreArchivo
|
||||||
@@ -3106,8 +3274,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
Response.End()
|
Response.End()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkDescargaCuentas2_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkDescargaCuentas2_Click(sender As Object, e As EventArgs)
|
||||||
Dim FileName As String = NombreArchivo
|
Dim FileName As String = NombreArchivoInterbancario
|
||||||
Dim FilePath As String = $"{UsuarioActual.Empresa.Ruta}Layout\{NombreArchivo}"
|
Dim FilePath As String = $"{UsuarioActual.Empresa.Ruta}Layout\{NombreArchivoInterbancario}"
|
||||||
Response.Clear()
|
Response.Clear()
|
||||||
Response.ContentType = "application/octet-stream"
|
Response.ContentType = "application/octet-stream"
|
||||||
Response.AddHeader("Content-Disposition", "attachment; filename=" & FileName)
|
Response.AddHeader("Content-Disposition", "attachment; filename=" & FileName)
|
||||||
@@ -3115,6 +3283,17 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
Response.End()
|
Response.End()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkDescargaCuentas3_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim FileName As String = NombreArchivoCIE
|
||||||
|
Dim FilePath As String = $"{UsuarioActual.Empresa.Ruta}Layout\{NombreArchivoCIE}"
|
||||||
|
Response.Clear()
|
||||||
|
Response.ContentType = "application/octet-stream"
|
||||||
|
Response.AddHeader("Content-Disposition", "attachment; filename=" & FileName)
|
||||||
|
Response.TransmitFile(FilePath)
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3123,14 +3302,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
|
||||||
' Dim DT_PagosReporte As New DataTable
|
|
||||||
DT_PagosReporte = DT_PagosReporte.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0").Copy()
|
DT_PagosReporte = DT_PagosReporte.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0").Copy()
|
||||||
|
|
||||||
'DT_PagosReporte.Columns(7).ColumnName = "Proveedor"
|
|
||||||
'DT_PagosReporte.Columns(2).ColumnName = "Importe"
|
|
||||||
'DT_PagosReporte.Columns(22).ColumnName = "Moneda"
|
|
||||||
|
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
If Archivo.Exists Then
|
If Archivo.Exists Then
|
||||||
@@ -3160,33 +3333,20 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
|
Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String, RutaComprobante As String)
|
||||||
|
|
||||||
'If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
|
||||||
'Dim Param As New List(Of String)
|
|
||||||
|
|
||||||
'Param.Add(CorreoNotificarA) 'Para
|
|
||||||
'Param.Add("Notificaciones de pago") 'Asunto
|
|
||||||
'Param.Add(GeneraCorreo(CveIE)) 'Body
|
|
||||||
'Param.Add(CveIE.ToString) 'CveIE
|
|
||||||
Dim Body As String = GeneraCorreo(CveIE)
|
Dim Body As String = GeneraCorreo(CveIE)
|
||||||
|
'Dim Comprobante As String = ""
|
||||||
|
|
||||||
'Dim Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto
|
|
||||||
Dim Comprobante As String = ""
|
|
||||||
Dim File As Byte() = Nothing
|
Dim File As Byte() = Nothing
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then
|
|
||||||
' File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File))
|
Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, RutaComprobante, File))
|
||||||
Hilo.Start()
|
Hilo.Start()
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte())
|
Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte())
|
||||||
'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String))
|
|
||||||
|
|
||||||
Dim Mail As New ClsSisMail()
|
Dim Mail As New ClsSisMail()
|
||||||
Para = If(Para IsNot Nothing, Para, "")
|
Para = If(Para IsNot Nothing, Para, "")
|
||||||
@@ -3290,17 +3450,17 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
strBody.AppendFormat(" <legend><b> </b></legend>")
|
strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||||
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||||
|
|
||||||
If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||||
strBody.Append(" <tr style=""height: 22px""> ")
|
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||||
strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
' strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||||
strBody.Append(" </tr> ")
|
' strBody.Append(" </tr> ")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
'If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||||
strBody.Append(" <tr style=""height: 22px""> ")
|
strBody.Append(" <tr style=""height: 22px""> ")
|
||||||
strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||||
strBody.Append(" </tr> ")
|
strBody.Append(" </tr> ")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
strBody.Append(" <tr style=""height: 22px""> ")
|
strBody.Append(" <tr style=""height: 22px""> ")
|
||||||
strBody.AppendFormat(" <td> </td> ")
|
strBody.AppendFormat(" <td> </td> ")
|
||||||
@@ -3422,4 +3582,6 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1944,7 +1944,7 @@
|
|||||||
<div runat="server">
|
<div runat="server">
|
||||||
|
|
||||||
<asp:GridView ID="GvBancosCuentas" GridLines="None" BorderColor="#D3D3D3" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true" runat="server"
|
<asp:GridView ID="GvBancosCuentas" GridLines="None" BorderColor="#D3D3D3" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true" runat="server"
|
||||||
DataKeyNames="CveCuentaDeposito,BancoNombre,Sucursal,Cuenta,CLABE,SWIFT,Plaza,CIE,Referencia,RefCrediProveedor,CveMoneda,Estatus,Correo,BBVAAlias,EstatusPagoElectronico,EstatusPagoElectronicoGrupos,CveSATBanco" AutoGenerateColumns="False"
|
DataKeyNames="CveCuentaDeposito,BancoNombre,Sucursal,Cuenta,CLABE,SWIFT,Plaza,CIE,Referencia,RefCrediProveedor,CveMoneda,Estatus,Correo,BBVAAlias,EstatusPagoElectronico,EstatusPagoElectronicoGrupos,CveSATBanco,ConceptoCIE" AutoGenerateColumns="False"
|
||||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias">
|
EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias">
|
||||||
|
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -3568,11 +3568,19 @@
|
|||||||
<%--<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtConvenioCIE" FilterType="Numbers" />--%>
|
<%--<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtConvenioCIE" FilterType="Numbers" />--%>
|
||||||
<label for="<%= TxtConvenioCIE.ClientID.ToString()%>">CIE:</label>
|
<label for="<%= TxtConvenioCIE.ClientID.ToString()%>">CIE:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtReferencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
|
<asp:TextBox ID="TxtReferencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtReferencia" FilterType="UppercaseLetters,LowercaseLetters,Numbers" />
|
<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtReferencia" FilterType="UppercaseLetters,LowercaseLetters,Numbers" />
|
||||||
<label for="<%= TxtReferencia.ClientID.ToString()%>">Referencia:</label>
|
<label for="<%= TxtReferencia.ClientID.ToString()%>">Referencia:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtConceptoCIE" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="30" ></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FilAlfanumerico" runat="server" TargetControlID="TxtConceptoCIE" FilterType="UppercaseLetters,LowercaseLetters,Numbers" />
|
||||||
|
<label for="<%= TxtReferencia.ClientID.ToString()%>">Concepto CIE:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtRefCrediProveedor" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="5" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
|
<asp:TextBox ID="TxtRefCrediProveedor" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="5" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
|
||||||
<label for="<%= TxtRefCrediProveedor.ClientID.ToString()%>">Credito Proveedor:</label>
|
<label for="<%= TxtRefCrediProveedor.ClientID.ToString()%>">Credito Proveedor:</label>
|
||||||
|
|||||||
@@ -3111,30 +3111,53 @@ Partial Class Compras_Proveedores
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
'SI CIE TIENE ALGO DEBE TENER UNA LOGITUD MINIMA DE 5
|
'SI CIE TIENE ALGO DEBE TENER UNA LOGITUD MINIMA DE 5
|
||||||
If TxtConvenioCIE.Text.Trim.Length <> 0 And TxtConvenioCIE.Text.Trim.Length < 5 Then
|
If TxtConvenioCIE.Text.Trim.Length <> 0 And TxtConvenioCIE.Text.Trim.Length < 5 Then
|
||||||
Alert("El Convenio CIE debe tener una longitud de al menos 5 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("El Convenio CIE debe tener una longitud de al menos 5 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If ChkPagoElectronicoGrupos.Checked Then
|
||||||
|
|
||||||
|
If TxtConvenioCIE.Text.Trim.Length > 0 Then
|
||||||
|
|
||||||
|
If TxtConvenioCIE.Text.Trim.Length < 5 Then
|
||||||
|
Alert("El campo CIE debe de tener una tamaño mininmo 5 caracteres.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not DdlSatBanco.SelectedValue.ToEntero > 0 Then
|
||||||
|
Alert("Se debe de especificar el banco.")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Estatus As Boolean
|
Dim Estatus As Boolean
|
||||||
If ChkEstatus.Checked = True Then Estatus = True Else Estatus = False
|
If ChkEstatus.Checked = True Then Estatus = True Else Estatus = False
|
||||||
|
|
||||||
AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABE.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta.Text.Trim, TxtConvenioCIE.Text.Trim, TxtReferencia.Text.Trim, TxtRefCrediProveedor.Text.Trim,
|
AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABE.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta.Text.Trim, TxtConvenioCIE.Text.Trim, TxtReferencia.Text.Trim, TxtRefCrediProveedor.Text.Trim,
|
||||||
DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, Estatus, TxtCorreoCuenta.Text.Trim, TxtBBVAAlias.Text, ChkPagoElectronico.Checked, ChkPagoElectronicoGrupos.Checked, DdlSatBanco.SelectedValue.ToEntero)
|
DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, Estatus, TxtCorreoCuenta.Text.Trim, TxtBBVAAlias.Text, ChkPagoElectronico.Checked, ChkPagoElectronicoGrupos.Checked, DdlSatBanco.SelectedValue.ToEntero, TxtConceptoCIE.Text)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, RefCrediProveedor As String,
|
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, RefCrediProveedor As String,
|
||||||
CveMoneda As Integer, Moneda As String, Estatus As Boolean, Correo As String, BBVAAlias As String, EstatusPagoElectronico As Boolean, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer)
|
CveMoneda As Integer, Moneda As String, Estatus As Boolean, Correo As String, BBVAAlias As String, EstatusPagoElectronico As Boolean, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer,
|
||||||
|
ConceptoCIE As String)
|
||||||
|
|
||||||
Dim ObjCuentasBancos As New ClsGenerales
|
Dim ObjCuentasBancos As New ClsGenerales
|
||||||
If Modalidad = "A" Then
|
If Modalidad = "A" Then
|
||||||
|
|
||||||
If CveProveedor > 0 Then
|
If CveProveedor > 0 Then
|
||||||
|
|
||||||
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveProveedor:=CveProveedor,
|
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveProveedor:=CveProveedor,
|
||||||
Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco) Then
|
Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco, ConceptoCIE:=ConceptoCIE) Then
|
||||||
DTCuentasBancos.Clear()
|
DTCuentasBancos.Clear()
|
||||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
|
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
|
||||||
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
|
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
|
||||||
@@ -3163,6 +3186,7 @@ Partial Class Compras_Proveedores
|
|||||||
Row("Estatus") = "True"
|
Row("Estatus") = "True"
|
||||||
Row("Correo") = Correo
|
Row("Correo") = Correo
|
||||||
Row("CveSATBanco") = CveSATBanco
|
Row("CveSATBanco") = CveSATBanco
|
||||||
|
Row("ConceptoCIE") = ConceptoCIE
|
||||||
|
|
||||||
TempDTCuentasBancos.Rows.Add(Row)
|
TempDTCuentasBancos.Rows.Add(Row)
|
||||||
|
|
||||||
@@ -3177,7 +3201,8 @@ Partial Class Compras_Proveedores
|
|||||||
If CveProveedor > 0 Then
|
If CveProveedor > 0 Then
|
||||||
|
|
||||||
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor,
|
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor,
|
||||||
False, Estatus, CveMoneda, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco) Then
|
False, Estatus, CveMoneda, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco,
|
||||||
|
ConceptoCIE:=ConceptoCIE) Then
|
||||||
DTCuentasBancos.Clear()
|
DTCuentasBancos.Clear()
|
||||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
|
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
|
||||||
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
|
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
|
||||||
@@ -3206,6 +3231,7 @@ Partial Class Compras_Proveedores
|
|||||||
Row("Estatus") = Estatus
|
Row("Estatus") = Estatus
|
||||||
Row("Correo") = Correo
|
Row("Correo") = Correo
|
||||||
Row("CveSATBanco") = CveSATBanco
|
Row("CveSATBanco") = CveSATBanco
|
||||||
|
Row("ConceptoCIE") = ConceptoCIE
|
||||||
|
|
||||||
TempDTCuentasBancos.AcceptChanges()
|
TempDTCuentasBancos.AcceptChanges()
|
||||||
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
|
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
|
||||||
@@ -3227,6 +3253,7 @@ Partial Class Compras_Proveedores
|
|||||||
TxtNumeroCuenta.Text = ""
|
TxtNumeroCuenta.Text = ""
|
||||||
TxtConvenioCIE.Text = ""
|
TxtConvenioCIE.Text = ""
|
||||||
TxtReferencia.Text = ""
|
TxtReferencia.Text = ""
|
||||||
|
TxtConceptoCIE.Text = ""
|
||||||
TxtRefCrediProveedor.Text = ""
|
TxtRefCrediProveedor.Text = ""
|
||||||
TxtCorreoCuenta.Text = ""
|
TxtCorreoCuenta.Text = ""
|
||||||
TxtBBVAAlias.Text = ""
|
TxtBBVAAlias.Text = ""
|
||||||
@@ -4691,6 +4718,7 @@ Partial Class Compras_Proveedores
|
|||||||
TxtPlaza.Text = ""
|
TxtPlaza.Text = ""
|
||||||
TxtConvenioCIE.Text = ""
|
TxtConvenioCIE.Text = ""
|
||||||
TxtReferencia.Text = ""
|
TxtReferencia.Text = ""
|
||||||
|
TxtConceptoCIE.Text = ""
|
||||||
TxtRefCrediProveedor.Text = ""
|
TxtRefCrediProveedor.Text = ""
|
||||||
DdlMoneda.SelectedIndex = 0
|
DdlMoneda.SelectedIndex = 0
|
||||||
TxtCorreoCuenta.Text = ""
|
TxtCorreoCuenta.Text = ""
|
||||||
@@ -4721,6 +4749,7 @@ Partial Class Compras_Proveedores
|
|||||||
TxtPlaza.Text = GvRow.DataKey("Plaza")
|
TxtPlaza.Text = GvRow.DataKey("Plaza")
|
||||||
TxtConvenioCIE.Text = GvRow.DataKey("CIE")
|
TxtConvenioCIE.Text = GvRow.DataKey("CIE")
|
||||||
TxtReferencia.Text = GvRow.DataKey("Referencia")
|
TxtReferencia.Text = GvRow.DataKey("Referencia")
|
||||||
|
TxtConceptoCIE.Text = GvRow.DataKey("ConceptoCIE")
|
||||||
TxtRefCrediProveedor.Text = GvRow.DataKey("RefCrediProveedor")
|
TxtRefCrediProveedor.Text = GvRow.DataKey("RefCrediProveedor")
|
||||||
TxtCorreoCuenta.Text = GvRow.DataKey("Correo")
|
TxtCorreoCuenta.Text = GvRow.DataKey("Correo")
|
||||||
TxtBBVAAlias.Text = GvRow.DataKey("BBVAAlias")
|
TxtBBVAAlias.Text = GvRow.DataKey("BBVAAlias")
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using Extensiones;
|
using Extensiones;
|
||||||
|
using System.Net;
|
||||||
|
using System.IO;
|
||||||
|
using System.Web.Services;
|
||||||
|
using System.Web.Services.Protocols;
|
||||||
|
using GemBox.Spreadsheet;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
public class TareasJam : IHttpHandler
|
public class TareasJam : IHttpHandler
|
||||||
{
|
{
|
||||||
@@ -34,10 +40,147 @@ public class TareasJam : IHttpHandler
|
|||||||
context.Response.End();
|
context.Response.End();
|
||||||
//ModExtensiones.GuardaLogAD(string.Format("{3} CveEmpresa={0} cveTareaProgramada={1} CveTareaProgramadaHistorial={2}", CveEmpresa, cveTareaProgramada, CveTareaProgramadaHistorial, Metodo), "Tareas Programadas");
|
//ModExtensiones.GuardaLogAD(string.Format("{3} CveEmpresa={0} cveTareaProgramada={1} CveTareaProgramadaHistorial={2}", CveEmpresa, cveTareaProgramada, CveTareaProgramadaHistorial, Metodo), "Tareas Programadas");
|
||||||
}
|
}
|
||||||
public bool EjecutaThalamus(int CveEmpresa)
|
private bool EjecutaThalamus(int CveEmpresa)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
string RutaArchivoVentas = $@"C:\Temp\Ventas{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
||||||
|
var DTVentas = new DataTable();
|
||||||
|
DTVentas.Columns.Add("systemId");
|
||||||
|
DTVentas.Columns.Add("Branch");
|
||||||
|
DTVentas.Columns.Add("Code");
|
||||||
|
DTVentas.Columns.Add("Sale Date");
|
||||||
|
DTVentas.Columns.Add("Quantity");
|
||||||
|
DTVentas.Columns.Add("Amount");
|
||||||
|
DTVentas.Columns.Add("Transaction ID");
|
||||||
|
for (int x = 0; x <= 50; x++)
|
||||||
|
{
|
||||||
|
DataRow dr = DTVentas.NewRow();
|
||||||
|
dr[0] = $"systemId {x}";
|
||||||
|
dr[1] = $"Branch {x}";
|
||||||
|
dr[2] = $"{x}";
|
||||||
|
dr[3] = $"{ DateTime.Now.ToString("yyyy-MM-dd")}";
|
||||||
|
dr[4] = $"{x}";
|
||||||
|
dr[5] = $"{x}.00";
|
||||||
|
dr[6] = $"{x}";
|
||||||
|
DTVentas.Rows.Add(dr);
|
||||||
|
}
|
||||||
|
|
||||||
|
SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet());
|
||||||
|
var workbook = new ExcelFile();
|
||||||
|
var worksheet = workbook.Worksheets.Add("Ventas");
|
||||||
|
worksheet.InsertDataTable(DTVentas, new InsertDataTableOptions()
|
||||||
|
{
|
||||||
|
ColumnHeaders = true,
|
||||||
|
StartRow = 0
|
||||||
|
});
|
||||||
|
workbook.Save(RutaArchivoVentas);
|
||||||
|
string FTPServer = "ftp://127.0.0.1/";
|
||||||
|
string TFPUsr = "Toor";
|
||||||
|
string FTPPass = "agj-3500";
|
||||||
|
var FInfo = new FileInfo(RutaArchivoVentas);
|
||||||
|
bool Carga = CargarArchivos(FInfo.FullName, FTPServer, TFPUsr, FTPPass);
|
||||||
|
if (Carga)
|
||||||
|
{
|
||||||
|
Carga = VerificarArchivo(FInfo.Name, FInfo.Length, FTPServer, TFPUsr, FTPPass);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Carga;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private bool CargarArchivos(string RutaArchivo, string FTPServer, string FTPUsr, string FTPPass)
|
||||||
|
{
|
||||||
|
bool Respuesta;
|
||||||
|
var FInfo = new FileInfo(RutaArchivo);
|
||||||
|
if (FInfo.Exists)
|
||||||
{
|
{
|
||||||
return true;
|
FtpWebRequest request = (FtpWebRequest)WebRequest.Create($"{FTPServer}/{FInfo.Name}");
|
||||||
|
request.Method = WebRequestMethods.Ftp.UploadFile;
|
||||||
|
int tamanio = 1024;
|
||||||
|
var buffer = new byte[tamanio + 1];
|
||||||
|
int byteRead = 0;
|
||||||
|
bool Conected = false;
|
||||||
|
request.Credentials = new NetworkCredential(FTPUsr, FTPPass);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
request.GetResponse();
|
||||||
|
Conected = true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Conected)
|
||||||
|
{
|
||||||
|
Stream ftpStream;
|
||||||
|
FileStream f;
|
||||||
|
ftpStream = request.GetRequestStream();
|
||||||
|
f = File.OpenRead(FInfo.FullName);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
byteRead = f.Read(buffer, 0, tamanio);
|
||||||
|
ftpStream.Write(buffer, 0, byteRead);
|
||||||
|
}
|
||||||
|
while (byteRead != 0);
|
||||||
|
Respuesta = true;
|
||||||
|
}
|
||||||
|
// validar si existe archivo si coincide en tamaño
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Respuesta = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (f is object)
|
||||||
|
{
|
||||||
|
f.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ftpStream is object)
|
||||||
|
{
|
||||||
|
ftpStream.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Respuesta = false;
|
||||||
|
// no se conecto al ftp probablemente credenciales erroneas
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Respuesta = false;
|
||||||
|
// El archivo no existe en el disco local
|
||||||
|
}
|
||||||
|
|
||||||
|
return Respuesta;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private bool VerificarArchivo(string Archivo, long Tamanio, string FTPServer, string FTPUsr, string FTPPass)
|
||||||
|
{
|
||||||
|
bool Respuesta = false;
|
||||||
|
FtpWebRequest reqSize = (FtpWebRequest)FtpWebRequest.Create(new Uri(FTPServer + Archivo));
|
||||||
|
reqSize.Credentials = new NetworkCredential(FTPUsr, FTPPass);
|
||||||
|
reqSize.Method = WebRequestMethods.Ftp.GetFileSize;
|
||||||
|
reqSize.UseBinary = true;
|
||||||
|
FtpWebResponse loginresponse = (FtpWebResponse)reqSize.GetResponse();
|
||||||
|
FtpWebResponse respSize = (FtpWebResponse)reqSize.GetResponse();
|
||||||
|
respSize = (FtpWebResponse)reqSize.GetResponse();
|
||||||
|
long size = respSize.ContentLength;
|
||||||
|
respSize.Close();
|
||||||
|
if (Tamanio == size)
|
||||||
|
{
|
||||||
|
Respuesta = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Respuesta;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public bool IsReusable
|
public bool IsReusable
|
||||||
{
|
{
|
||||||
get { return false; }
|
get { return false; }
|
||||||
|
|||||||
Reference in New Issue
Block a user