Pago Electronico Grupos 2020-06-12
This commit is contained in:
@@ -70,6 +70,17 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DT_PagosReporte As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DT_PagosReporte"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_PagosReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property DTAltasPendientes As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTAltasPendientes"), DataTable)
|
||||
@@ -181,6 +192,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
ViewState("NombreArchivoBancomer") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property NombreArchivoInterbancario As String
|
||||
Get
|
||||
Return ViewState("NombreArchivoInterbancario").ToString
|
||||
@@ -190,6 +202,18 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DTSATBancos As DataTable
|
||||
Get
|
||||
If ViewState("DTSATBancos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTSATBancos"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTSATBancos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -273,11 +297,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
GvPendientes.DataBind()
|
||||
UpEnviados.Update()
|
||||
|
||||
|
||||
UpGVDatos.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaDatosInformativos()
|
||||
Dim Altas = 0
|
||||
@@ -369,7 +390,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Response.ContentType = "application/zip"
|
||||
Response.End()
|
||||
End Sub
|
||||
Private Function CreaArchivo(Tipo As Integer, Optional MismoBanco As Boolean = True, Optional NombreArchivoEnviado As String = "") As Boolean
|
||||
Private Function CreaArchivo(Tipo As Integer, Optional MismoBanco As Boolean = True, Optional ByRef NombreArchivoEnviado As String = "") As Boolean
|
||||
|
||||
|
||||
System.Threading.Thread.Sleep(1000) 'Un segundo de diferencia Para doferentes tipos de bancos
|
||||
@@ -386,6 +407,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
If NombreArchivoEnviado.Length > 0 Then
|
||||
NombreArchivo = NombreArchivoEnviado
|
||||
Else
|
||||
NombreArchivoEnviado = NombreArchivo
|
||||
End If
|
||||
|
||||
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||
@@ -428,13 +451,20 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim LnkAyuda As LinkButton = e.Row.FCLinkButton("LnkAyuda")
|
||||
|
||||
'Colorea GV
|
||||
If e.Row.DBCampo("RazonSocial").ToString = "" Then
|
||||
e.Row.BackColor = Drawing.Color.WhiteSmoke
|
||||
Else
|
||||
If e.Row.DBCampo("EstatusPagoElectronicoGrupos").ToString <> "True" Then
|
||||
e.Row.BackColor = Drawing.Color.LightSalmon
|
||||
If e.Row.DBCampo("EstatusPagoElectronicoGrupos").ToString <> "True" Then
|
||||
|
||||
'e.Row.BackColor = Drawing.Color.LightSalmon
|
||||
e.Row.ToolTip = "Cuenta Deposito aun sin dar de Alta."
|
||||
|
||||
LnkAyuda.Attributes.Add("data-content", "Cuenta Deposito aún sin dar de Alta.")
|
||||
LnkAyuda.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveProveedor").ToString.ToEntero > 0 Then
|
||||
@@ -446,13 +476,22 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End If
|
||||
|
||||
If Not e.Row.DBCampo("CveCuentaDeposito").ToString.ToEntero > 0 Then
|
||||
e.Row.Cells(0).BackColor = Drawing.Color.Red
|
||||
'e.Row.Cells(0).BackColor = Drawing.Color.Red
|
||||
e.Row.ToolTip = "Sin Cuenta Deposito asignada"
|
||||
|
||||
LnkAyuda.Attributes.Add("data-content", "Sin Cuenta Deposito asignada")
|
||||
LnkAyuda.Visible = True
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("EstatusCtaDeposito").ToString = "False" Then
|
||||
e.Row.Cells(0).BackColor = Drawing.Color.Red
|
||||
e.Row.ToolTip = "Cuenta Deposito INACTIVA"
|
||||
'e.Row.Cells(0).BackColor = Drawing.Color.Red
|
||||
e.Row.ToolTip = "Cuenta Deposito INACTIVA"
|
||||
LnkAyuda.Attributes.Add("data-content", "Cuenta Deposito INACTIVA")
|
||||
LnkAyuda.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("HLImporte").NavigateUrl = String.Format("IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
@@ -503,7 +542,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
e.Row.FCHyperLink("HLDetalle").NavigateUrl = String.Format("IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
|
||||
|
||||
If e.Row.DataKey("Estatus").ToEntero = 3 Then
|
||||
If e.Row.DataKey("Estatus").ToEntero.contiene(2, 3) Then
|
||||
|
||||
e.Row.FCLinkButton("ImgUpload").Visible = False
|
||||
e.Row.FCLinkButton("LnkGvCancelar").Visible = False
|
||||
@@ -755,6 +794,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
'Mensaje.Append("Descarga Layouts<br><br>")
|
||||
|
||||
DVDescargaPagos.Visible = False
|
||||
DVDescargaReporte.Visible = False
|
||||
|
||||
|
||||
|
||||
@@ -1192,6 +1232,9 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
DVDescargaPagos.Visible = True
|
||||
DVDescargaCuentas1.Visible = False
|
||||
DVDescargaCuentas2.Visible = False
|
||||
DVDescargaReporte.Visible = True
|
||||
|
||||
DT_PagosReporte = DTPendientesTemp.Copy
|
||||
|
||||
LnkDescarga.Text = NombreArchivoPago
|
||||
RegistraScript("$('#ModalDescarga').modal({ backdrop: 'static', keyboard: false});")
|
||||
@@ -1703,6 +1746,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Then
|
||||
|
||||
DVDescargaPagos.Visible = False
|
||||
DVDescargaReporte.Visible = False
|
||||
|
||||
LnkDescargaCuentas1.Text = NombreArchivoBancomer
|
||||
LnkDescargaCuentas2.Text = NombreArchivoInterbancario
|
||||
RegistraScript("$('#ModalDescarga').modal({ backdrop: 'static', keyboard: false});")
|
||||
@@ -1850,18 +1895,19 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
'CORREO
|
||||
#Region " GENERA Y MANDA CORREO "
|
||||
Private Sub MandaCorreo(data As Object)
|
||||
Dim Parametros As List(Of String) = DirectCast(data, List(Of String))
|
||||
|
||||
Dim Mail As New ClsSisMail()
|
||||
Dim Para As String = Parametros(0)
|
||||
Dim Asunto As String = Parametros(1)
|
||||
Dim Body As String = Parametros(2)
|
||||
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub MandaCorreo(data As Object)
|
||||
' Dim Parametros As List(Of String) = DirectCast(data, List(Of String))
|
||||
|
||||
' Dim Mail As New ClsSisMail()
|
||||
' Dim Para As String = Parametros(0)
|
||||
' Dim Asunto As String = Parametros(1)
|
||||
' Dim Body As String = Parametros(2)
|
||||
|
||||
' Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Function GeneraCorreo(CveIE As Integer, objIE As ClsBancos) As String
|
||||
Dim strBody As New StringBuilder
|
||||
|
||||
@@ -2338,42 +2384,49 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
Return strBody.ToString
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
Protected Sub BtnReporteAltaCarga_Click(sender As Object, e As EventArgs)
|
||||
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))
|
||||
|
||||
|
||||
'Estatus visible
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("MostrarEstatus", "True"))
|
||||
|
||||
If Archivo.Exists Then
|
||||
'ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico")
|
||||
ImprimirPDF(String.Format("{0}Formatos\LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico")
|
||||
Else
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion))
|
||||
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnReporteAltaCarga_Click(sender As Object, e As EventArgs)
|
||||
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))
|
||||
|
||||
|
||||
'Estatus visible
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("MostrarEstatus", "True"))
|
||||
|
||||
If Archivo.Exists Then
|
||||
'ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico")
|
||||
ImprimirPDF(String.Format("{0}Formatos\LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico")
|
||||
Else
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion))
|
||||
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnReporteAltaGenera_Click(sender As Object, e As EventArgs)
|
||||
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))
|
||||
@@ -2402,12 +2455,24 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnReportePago_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnReportePago_Click(sender As Object, e As EventArgs)
|
||||
|
||||
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 params As New List(Of ReportParameter)
|
||||
Dim DT_PagosReporte As New DataTable
|
||||
DT_PagosReporte = DTPendientes.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)
|
||||
|
||||
If Archivo.Exists Then
|
||||
ImprimirPDF(String.Format("{0}Formatos\LayoutPagoProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtPago, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2")
|
||||
@@ -2420,14 +2485,23 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion))
|
||||
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/LayoutPagoProveedor.rdlc", DtPago, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2")
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout"))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/LayoutPagoProveedor.rdlc", DT_PagosReporte, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -2444,22 +2518,40 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CargaGVPendintesModal()
|
||||
|
||||
Dim DTGvCuentasPendientes As DataTable = DTPendientes.Copy.FiltraParametros("CveCuentaDeposito > 0", "", {"CveCuentaDeposito", "BancoNombre", "RazonSocial", "Cuenta", "CLABEDestino", "BBVAAlias", "EstatusPagoElectronicoGrupos"})
|
||||
Dim ObjBancos As New ClsBancos
|
||||
|
||||
If ObjBancos.GetBancosSAT Then
|
||||
DTSATBancos = ObjBancos.DtResultados
|
||||
End If
|
||||
|
||||
ObjBancos.Dispose()
|
||||
|
||||
Dim DTGvCuentasPendientes As DataTable = DTPendientes.Copy.FiltraParametros("CveCuentaDeposito > 0", "", {"CveCuentaDeposito", "BancoNombre", "RazonSocial", "Cuenta", "CLABEDestino", "BBVAAlias", "EstatusPagoElectronicoGrupos", "CveSATBanco"})
|
||||
|
||||
GvCuentasModal.DataSource = DTGvCuentasPendientes
|
||||
GvCuentasModal.DataBind()
|
||||
UpModalCuentasCuerpo.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GvCuentasModal_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCCheckBox("ChkCuentasEstatus").Checked = True
|
||||
|
||||
'e.Row.FCCheckBox("ChkCuentasEstatus").Checked = True
|
||||
|
||||
e.Row.FCDropDownList("DdlSatBanco").DataSource = DTSATBancos
|
||||
e.Row.FCDropDownList("DdlSatBanco").DataBind()
|
||||
e.Row.FCDropDownList("DdlSatBanco").Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
e.Row.FCDropDownList("DdlSatBanco").SelectedValueExist(e.Row.DataKey("CveSATBanco"))
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -2475,10 +2567,14 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
ObjGenerales.IniciaTransacSQL()
|
||||
|
||||
For Each GvRow As GridViewRow In GvCuentasModal.Rows
|
||||
|
||||
Dim CveCuentaDeposito As Integer = GvRow.DataKey("CveCuentaDeposito").ToEntero
|
||||
Dim ChkCuentasEstatus As CheckBox = GvRow.FCCheckBox("ChkCuentasEstatus")
|
||||
Dim TxtBBVAAlias As TextBox = GvRow.FCTextBox("TxtBBVAAlias")
|
||||
Dim DdlSatBanco As DropDownList = GvRow.FCDropDownList("DdlSatBanco")
|
||||
|
||||
If Not ObjGenerales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito, ChkCuentasEstatus.Checked) Then
|
||||
|
||||
If Not ObjGenerales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito, ChkCuentasEstatus.Checked, DdlSatBanco.SelectedValue.ToEntero, TxtBBVAAlias.Text) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -2512,7 +2608,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim FechaI = If(IsDate(txtFechaIEnviados.Text.Trim()), txtFechaIEnviados.Text.Trim(), "-1")
|
||||
Dim FechaF = If(IsDate(txtFechaFEnviados.Text.Trim()), txtFechaFEnviados.Text.Trim(), "-1")
|
||||
|
||||
If ObjBancos.GetLayoutPagosEnviados(DdlCuentaEnviados.SelectedValue.ToEntero, DdlEstatusEnviados.SelectedValue.ToEntero, "-1", FechaI, FechaF, PorGrupos:=True) Then
|
||||
If ObjBancos.GetLayoutPagosEnviados(DdlCuentaEnviados.SelectedValue.ToEntero, DdlEstatusEnviados.SelectedValue.ToEntero, DdlTipoGeneracionEnviados.SelectedValue, FechaI, FechaF, PorGrupos:=True) Then
|
||||
DTEnviadas = ObjBancos.DtResultados
|
||||
Else
|
||||
DTEnviadas = Nothing
|
||||
@@ -2651,9 +2747,6 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -2672,6 +2765,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim CveLayoutEnvio As Integer = GvRow.DataKey("CveLayoutEnvio").ToEntero
|
||||
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero
|
||||
Dim CveProveedor As Integer = GvRow.DataKey("CveProveedor").ToEntero
|
||||
Dim NotificarA As String = GvRow.DataKey("NotificarA")
|
||||
|
||||
|
||||
If Not ObjBanco.UpdateLayoutEnviosDetalle(CveLayoutEnvioDetalle, CveLayoutEnvio, CveIE, CveProveedor, 2, "", True) Then
|
||||
@@ -2713,6 +2807,10 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Else
|
||||
ObjBanco.Commit()
|
||||
Alert("Confirmado Correctamente")
|
||||
NotificacionPago(CveIE, NotificarA)
|
||||
|
||||
CargaEnviados()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -2968,4 +3066,312 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Response.TransmitFile(FilePath)
|
||||
Response.End()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkDescargaReporte_Click(sender As Object, e As EventArgs)
|
||||
|
||||
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 DT_PagosReporte As New DataTable
|
||||
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)
|
||||
|
||||
If Archivo.Exists Then
|
||||
ImprimirPDF(String.Format("{0}Formatos\LayoutPagoProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtPago, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2")
|
||||
Else
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion))
|
||||
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout"))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/LayoutPagoProveedor.rdlc", DT_PagosReporte, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA 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 Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto
|
||||
Dim Comprobante As String = ""
|
||||
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))
|
||||
Hilo.Start()
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
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()
|
||||
Para = If(Para IsNot Nothing, Para, "")
|
||||
Asunto = If(Asunto IsNot Nothing, Asunto, "")
|
||||
Body = If(Body IsNot Nothing, Body, "")
|
||||
|
||||
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante})
|
||||
End If
|
||||
|
||||
If File IsNot Nothing Then
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"})
|
||||
End If
|
||||
|
||||
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
Dim objIE As New ClsBancos
|
||||
objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
|
||||
objIE.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function GeneraCorreo(CveIE As Integer) As String
|
||||
|
||||
Dim strBody As New StringBuilder
|
||||
Dim objIE As New ClsBancos
|
||||
|
||||
If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
strBody.Append("<head> ")
|
||||
strBody.Append(" <style type=""text/css""> ")
|
||||
strBody.Append(" body ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" margin:0px; ")
|
||||
strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
strBody.Append(" font-size: 10px; ")
|
||||
strBody.Append(" background-color:#F0F0F0; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" a.Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" font-size:11px; ")
|
||||
strBody.Append(" background-color:#F7F6F3; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .TextoAlterno ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .BarraIdentidad ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" color:#FFFFFF; ")
|
||||
strBody.Append(" background:#F0F0F0; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" font-size:19px; ")
|
||||
strBody.Append(" font-style:oblique; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Titulos ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color: Gray;")
|
||||
strBody.Append(" color:White; ")
|
||||
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
strBody.Append(" .Negro {color: #000000;} ")
|
||||
strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
strBody.Append(" </style> ")
|
||||
strBody.Append("</head> ")
|
||||
strBody.Append("<body> ")
|
||||
strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||
strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat("</div><br/><br/>")
|
||||
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
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(" </tr> ")
|
||||
End If
|
||||
|
||||
If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.AppendFormat(" <td> </td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
strBody.Append(" </table> ")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.Append(" </div> ")
|
||||
|
||||
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <table style='width:100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
|
||||
strBody.AppendFormat(" <table width='100%'>")
|
||||
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Banco:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
If objIE.CuentaDepositado.ToString <> "" Then
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
End If
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Fecha:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Importe:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td colspan='2'>")
|
||||
strBody.AppendFormat(" <hr />")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat("</div>")
|
||||
|
||||
|
||||
'MOVIMIENTOS CHEQUE
|
||||
If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
Dim Textov33 As String = ""
|
||||
If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
End If
|
||||
|
||||
strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||
strBody.AppendFormat(" <table width='1000px'>")
|
||||
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
|
||||
|
||||
For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
Next
|
||||
|
||||
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td colspan='5'>")
|
||||
strBody.AppendFormat(" <hr />")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat("</div>")
|
||||
End If
|
||||
|
||||
strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||
|
||||
strBody.Append("</body></html>")
|
||||
End If
|
||||
|
||||
objIE.Dispose()
|
||||
Return strBody.ToString
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user