FolioFechaCacnelacion Inicial, Bancos IE no eliminar movmientos con cancelaciones
This commit is contained in:
117
General/FolioFechaCancelacion.aspx
Normal file
117
General/FolioFechaCancelacion.aspx
Normal file
@@ -0,0 +1,117 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="FolioFechaCancelacion.aspx.vb" Inherits="Generales_FolioFechaCancelacion" EnableEventValidation="false" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
<style>
|
||||
#DivAgregarUnidad > div.modal-dialog > div label input {
|
||||
padding: 0px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Folio Fecha Cancelación
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkExportarExcel" OnClick="LnkExportarExcel_Click" data-toggle="tooltip" data-placement="left" title="Exportar Excel" Text="Exportar Excel" Visible="false"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportarExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnBuscar" runat="server" Text="Consultar" ValidationGroup="GrpBuscar" class="btn btn-primary" OnClick="BtnBuscar_Click" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" style="text-align: right;">Empresa:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlEmpresa" runat="server" DataValueField="CveEmpresa" DataTextField="Empresa" CssClass="form-control input-sm select2me" Width="150px" ></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate" style="text-align: right;">Tipo:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipo" runat="server" CssClass="form-control input-sm select2me" Width="150px">
|
||||
<asp:ListItem Value="1">Tipo 1</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<label class="col-md-1 truncate">Descripción:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:Label ID="lbDescripcion" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveEmpresa,CvePrePoliza,Fecha,CveVenta,ImporteMN,CveConceptoContable,TipoDocto,CveEstatusFactura,FechaVenta,CveSubProyecto,CveCliente,CveVendedor,CveUsuario,Origen,FolioFiscal,CvePACCancelacion,FechaCancelacion"
|
||||
EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="CveEmpresa" DataField="CveEmpresa" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="CvePrePoliza" DataField="CvePrePoliza" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="CveVenta" DataField="CveVenta" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="ImporteMN" DataField="ImporteMN" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="CveConceptoContable" DataField="CveConceptoContable" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="CveEstatusFactura" DataField="CveEstatusFactura" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="FechaVenta" DataField="FechaVenta" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="CveSubProyecto" DataField="CveSubProyecto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="CveCliente" DataField="CveCliente" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="CveVendedor" DataField="CveVendedor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="CveUsuario" DataField="CveUsuario" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Origen" DataField="Origen" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="FolioFiscal" DataField="FolioFiscal" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="RFCEmisor" DataField="RFCEmisor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="RFCReceptor" DataField="RFCReceptor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="CvePACCancelacion" DataField="CvePACCancelacion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="FechaCancelacion" DataField="FechaCancelacion" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
151
General/FolioFechaCancelacion.aspx.vb
Normal file
151
General/FolioFechaCancelacion.aspx.vb
Normal file
@@ -0,0 +1,151 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Partial Class Generales_FolioFechaCancelacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveCamion As Integer
|
||||
Get
|
||||
|
||||
If ViewState("CveCamion") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveCamion").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
ViewState("CveCamion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub Generales_FolioFechaCancelacion_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
'CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub CargaDatos()
|
||||
|
||||
LnkExportarExcel.Visible = False
|
||||
Dim DT_Temp As New DataTable
|
||||
|
||||
|
||||
Dim ObjGeenrales As New ClsGenerales
|
||||
|
||||
If ObjGeenrales.GetFolioFechaCancelacion(DdlEmpresa.SelectedValue.ToEntero, DdlTipo.SelectedValue.ToEntero) Then
|
||||
|
||||
DT_Temp = ObjGeenrales.DtResultados
|
||||
|
||||
If DT_Temp.Rows.Count > 0 Then
|
||||
LnkExportarExcel.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
DT_Temp = Nothing
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjGeenrales.Dispose()
|
||||
|
||||
|
||||
|
||||
If DT_Temp IsNot Nothing Then
|
||||
|
||||
DT_Temp.Columns.Add("FechaCancelacion", GetType(Date))
|
||||
|
||||
|
||||
|
||||
'DT_Temp = DT_Temp.FiltraParametros("CvePACCancelacion = 4")
|
||||
DT_Temp.AcceptChanges()
|
||||
|
||||
For Each DRow As DataRow In DT_Temp.Rows
|
||||
|
||||
Dim CancelacionAcuse As String = ""
|
||||
Dim CancelacionState As Integer = 0
|
||||
Dim CancelacionFecha As Date = Now
|
||||
Dim Consula As Boolean = False
|
||||
|
||||
Dim solicitud As New WSGF.Service1SoapClient
|
||||
Dim resp As New WSGF.StructXml()
|
||||
|
||||
Try
|
||||
resp = solicitud.GetAcuse(DRow("RFCEmisor").ToString, "rene.molina@adsistemas.mx", "rene2018", DRow("FolioFiscal"))
|
||||
If (resp.Estado = 0) Then
|
||||
|
||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.CfdiB64)))
|
||||
Dim xpath As String = "Acuse/Folios"
|
||||
Dim nodes = xmlDoc.SelectNodes(xpath)
|
||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
||||
|
||||
xpath = "Acuse/Signature"
|
||||
nodes = xmlDoc.SelectNodes(xpath)
|
||||
|
||||
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
||||
|
||||
DRow("FechaCancelacion") = CancelacionFecha
|
||||
Consula = True
|
||||
Else
|
||||
CancelacionAcuse = resp.Descripcion
|
||||
Consula = False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
solicitud = Nothing
|
||||
|
||||
Next
|
||||
|
||||
DT_Temp.AcceptChanges()
|
||||
|
||||
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
If DT_Temp IsNot Nothing Then
|
||||
GvDatos.DataSource = DT_Temp
|
||||
End If
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
UpAcciones.Update()
|
||||
|
||||
'ObtenerAcuse
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
|
||||
DdlEmpresa.DataSource = GlobalDTEmpresas
|
||||
DdlEmpresa.DataBind()
|
||||
DdlEmpresa.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkExportarExcel_Click(sender As Object, e As EventArgs)
|
||||
GvDatos.ExportToExcel2("ReporteCancelaciones.xlsx")
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user