- option explicit
This commit is contained in:
@@ -231,7 +231,7 @@
|
||||
<div style="width: 100%;">
|
||||
<asp:UpdatePanel ID="UpRegistroFacturas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light xspadding bordered" id="DVRegistraFacturas" runat="server" visible="false">
|
||||
<div class="portlet light xspadding bordered" id="DivRegistraFacturas" runat="server" visible="false">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
|
||||
@@ -740,9 +740,7 @@ Partial Class Compras_eFacturas
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ChecandoCorreo = False
|
||||
'GvD.Columns(GvD.Columns.Count - 1).Visible = True '(UsuarioActual.CveRol = 1)
|
||||
'GvD.Columns(GvD.Columns.Count - 2).Visible = (UsuarioActual.CveRol = 1)
|
||||
'GvD.Columns(GvD.Columns.Count - 3).Visible = (UsuarioActual.CveRol = 1)
|
||||
|
||||
ViewState("Orden") = String.Empty
|
||||
txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth().ToShortDateString ' String.Format("01/01/{0}", If(NowADS().Month > 6, NowADS().Year, NowADS().Year - 1))
|
||||
|
||||
@@ -768,52 +766,38 @@ Partial Class Compras_eFacturas
|
||||
If UsuarioActual.Sesion("eFact-Proveedor").ToString <> "" Then TxtProveedor.Text = UsuarioActual.Sesion("eFact-Proveedor").ToString.Trim
|
||||
If UsuarioActual.Sesion("eFact-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("eFact-FI").ToString.Trim
|
||||
If UsuarioActual.Sesion("eFact-FF").ToString <> "" Then txtFechaF.Text = UsuarioActual.Sesion("eFact-FF").ToString.Trim
|
||||
'If UsuarioActual.CveUsuario = 100 Then lbDescargar.Visible = True
|
||||
|
||||
'If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(11).Visible = True : GvD.Columns(12).Visible = True
|
||||
'If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(10).Visible = False
|
||||
'If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(5).Visible = True
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(81) Then GvD.Columns(14).Visible = True : GvD.Columns(15).Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(13).Visible = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(7).Visible = True
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) AndAlso UsuarioActual.CveRol = 1 Then
|
||||
LnkRegistarFactura.Visible = True
|
||||
End If
|
||||
|
||||
CargaGvBitacora()
|
||||
CargaDatos()
|
||||
MostrarSolcitudesSAT()
|
||||
CargaDatos()
|
||||
MostrarSolcitudesSAT()
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
GVSolicitudesPendientes.Columns(8).Visible = True
|
||||
End If
|
||||
|
||||
'CARGA REGISTRO DE FACTURA
|
||||
'CARGA REGISTRO DE FACTURA
|
||||
|
||||
CargaClasificacionesComprobaciones()
|
||||
CargaClasificaciones()
|
||||
CargaPS(-1)
|
||||
CargaPersoanlCajaChica()
|
||||
CargaPersonalViaticos()
|
||||
CargaDdlRetIVA()
|
||||
CargaDdlRetISR()
|
||||
|
||||
CargaClasificacionesComprobaciones()
|
||||
CargaClasificaciones()
|
||||
CargaPS(-1)
|
||||
CargaPersoanlCajaChica()
|
||||
CargaPersonalViaticos()
|
||||
CargaDdlRetIVA()
|
||||
CargaDdlRetISR()
|
||||
|
||||
Dim LblSubProyectoTemp As New Label
|
||||
Dim LblSubProyectoTemp As New Label
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyectoTemp, "Seleccione")
|
||||
LblSubProyecto.InnerText = $"{LblSubProyectoTemp.Text}:"
|
||||
|
||||
End If
|
||||
removeasincevent()
|
||||
End Sub
|
||||
'Private Sub CompararString()
|
||||
' Dim cont As Integer = 10000
|
||||
' Dim Sb As New StringBuilder
|
||||
' For i = 0 To cont
|
||||
' Sb.AppendFormat("a{0}", i)
|
||||
' Next
|
||||
'End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
@@ -1045,13 +1029,8 @@ Partial Class Compras_eFacturas
|
||||
|
||||
e.Row.Cells(3).Attributes.Add("data-order", e.Row.DBCampo("FechaFactura").ToDate.Ticks.ToString)
|
||||
|
||||
|
||||
'e.Row.Cells(4).Attributes.Add("data-order", Convert.ToInt64(e.Row.DBCampo("Total").ToDecimal).ToString.PadLeft(10, "0"c))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If File.Exists(String.Format("{0}{1}\{2}", Destino, e.Row.DBCampo("RFCDe"), e.Row.DBCampo("XML"))) Then
|
||||
e.Row.FCLiteral("LtlXML").Text = String.Format("<a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?RFC={0}&File={1}"">Ver</a>", HttpUtility.UrlEncode(e.Row.DBCampo("RFCDe")), HttpUtility.UrlEncode(e.Row.DBCampo("XML")))
|
||||
If e.Row.DBCampo("TipoComprobante") = "P" Then
|
||||
@@ -1123,12 +1102,8 @@ Partial Class Compras_eFacturas
|
||||
Else
|
||||
e.Row.FCHyperLink("HplAgregar").Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
End If
|
||||
|
||||
@@ -3261,26 +3236,17 @@ Partial Class Compras_eFacturas
|
||||
SeVinculoConComprasFaltantes = False
|
||||
Dim sbSinIE As New StringBuilder
|
||||
Dim TieneCompras As Boolean = False
|
||||
|
||||
HdnCveIE.Value = ""
|
||||
MSGComplemento = ""
|
||||
ViculacionConPUE = False
|
||||
ListaComprasPUE.Clear()
|
||||
ComplementoConPUE = ""
|
||||
|
||||
DT_ComprasSinIE = New DataTable
|
||||
|
||||
|
||||
Dim ListaComprasPUEInterna As New List(Of Integer)
|
||||
|
||||
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveFacturaComplemento As Integer = gvRow.DataKey("CveFactura").ToString.ToEntero
|
||||
Dim CveComplementoPagoCompra As Integer = gvRow.DataKey("CveComplementoPagoCompra").ToString.ToEntero
|
||||
|
||||
|
||||
|
||||
Dim SerieFolioIE As String = ""
|
||||
Dim UUIDPago As String = ""
|
||||
'Dim ImportePago As Decimal = 0
|
||||
@@ -3310,10 +3276,6 @@ Partial Class Compras_eFacturas
|
||||
Dim Archivo As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
||||
|
||||
Dim Prefijo As String = ""
|
||||
|
||||
|
||||
|
||||
|
||||
Dim DTDocumentosRelacionados As New DataTable
|
||||
DTDocumentosRelacionados.Columns.Add("Serie")
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolio")
|
||||
@@ -3335,7 +3297,6 @@ Partial Class Compras_eFacturas
|
||||
DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
|
||||
DTDocumentosRelacionados.Columns.Add("CvePrePolizaDetalle", GetType(Integer))
|
||||
|
||||
DTDocumentosRelacionados.Columns.Add("Tipo", GetType(String))
|
||||
DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean))
|
||||
|
||||
@@ -3343,7 +3304,6 @@ Partial Class Compras_eFacturas
|
||||
Dim TieneRegistros As Boolean = False
|
||||
If IO.File.Exists(Archivo) Then
|
||||
|
||||
|
||||
Dim SXML As String = File.ReadAllText(Archivo).Replace(vbLf, " ").Replace(vbCrLf, " ")
|
||||
SXML = SXML.Replace("o;?", "")
|
||||
SXML = SXML.Trim((Convert.ToChar(0)))
|
||||
@@ -3351,10 +3311,7 @@ Partial Class Compras_eFacturas
|
||||
XMLDoc.LoadXml(SXML)
|
||||
|
||||
Dim Xml As New StringBuilder
|
||||
|
||||
|
||||
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||
|
||||
Dim RootDocumento As XmlElement = XMLDoc.DocumentElement
|
||||
Dim VersionCFDI As String = ValorXML(RootDocumento, "version")
|
||||
|
||||
@@ -3367,54 +3324,22 @@ Partial Class Compras_eFacturas
|
||||
namespaces.AddNamespace("pago20", "http://www.sat.gob.mx/Pagos20")
|
||||
namespaces.AddNamespace(XMLDoc.DocumentElement.Prefix, "http://www.sat.gob.mx/cfd/4")
|
||||
End If
|
||||
|
||||
|
||||
namespaces.AddNamespace("aerolineas", "http://www.sat.gob.mx/aerolineas")
|
||||
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
|
||||
|
||||
|
||||
nodeComp = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", XMLDoc.DocumentElement.Prefix), namespaces)
|
||||
|
||||
|
||||
nodeaGral = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante", XMLDoc.DocumentElement.Prefix), namespaces)
|
||||
|
||||
nodeTFD = nodeComp.SelectSingleNode(String.Format("//{0}:TimbreFiscalDigital", "tfd"), namespaces)
|
||||
|
||||
'Dim PrefijoPagos As String = ""
|
||||
|
||||
'For Each nodoPrefijo As XmlNode In nodeComp.ChildNodes
|
||||
' If nodoPrefijo.Prefix <> "tfd" And nodoPrefijo.Prefix.ToUpper.Contains("PAGO") Then
|
||||
' PrefijoPagos = nodoPrefijo.Prefix
|
||||
' End If
|
||||
'Next
|
||||
|
||||
'namespaces.AddNamespace(PrefijoPagos, "http://www.sat.gob.mx/Pagos")
|
||||
nodeComp = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", XMLDoc.DocumentElement.Prefix), namespaces)
|
||||
|
||||
|
||||
nodePagos = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos/{0}:Pago", Prefijo), namespaces)
|
||||
nodePagos2 = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos", Prefijo), namespaces)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
' Dim nodePago As XmlNodeList = nodePagos.SelectNodes(String.Format("//{0}:DoctoRelacionado", "pago10"), namespaces)
|
||||
|
||||
SeriePago = ValorXML(nodeaGral, "Serie")
|
||||
FolioPago = ValorXML(nodeaGral, "Folio")
|
||||
|
||||
UUIDPago = ValorXML(nodeTFD, "UUID")
|
||||
LblUUID.Text = UUIDPago
|
||||
|
||||
|
||||
|
||||
|
||||
Dim nodePagosN As XmlNodeList
|
||||
nodePagosN = nodeComp.SelectNodes(String.Format("//{0}:Pagos", Prefijo), namespaces)
|
||||
|
||||
|
||||
For Each NodosPagos As XmlNode In nodePagosN
|
||||
For Each innernode As XmlNode In NodosPagos
|
||||
|
||||
@@ -4306,10 +4231,6 @@ Partial Class Compras_eFacturas
|
||||
Dim XmlRutaArchivo As String = File.ReadAllText(String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("XML")))
|
||||
Dim PDFRutaArchivo As String = String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("PDF"))
|
||||
Dim RutaRDLC As String = String.Format("{0}{1}", DirectorioBaseEmpresas, "Empresas\Grales\Formatos\ReciboDePagoGOPDF.rdlc")
|
||||
|
||||
|
||||
|
||||
'ModExtensiones.GuardaLog(" '--------PDF GenGoPdf Inicia ")
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim Inicio As DateTime = NowADS()
|
||||
@@ -4317,7 +4238,7 @@ Partial Class Compras_eFacturas
|
||||
Dim logotipo As Byte() = Nothing
|
||||
|
||||
Try
|
||||
Dim result = goPdf.ExportarPdf(XmlRutaArchivo, logotipo, "", RutaRDLC, New GoPdf.Modelos.DatosAdicionales() With {
|
||||
Dim result As Byte() = goPdf.ExportarPdf(XmlRutaArchivo, logotipo, "", RutaRDLC, New GoPdf.Modelos.DatosAdicionales() With {
|
||||
.DomicilioReceptor = ""
|
||||
})
|
||||
Dim Fin As DateTime = NowADS()
|
||||
@@ -5048,8 +4969,8 @@ Partial Class Compras_eFacturas
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim ProcesoOk As Boolean = False
|
||||
|
||||
Dim CveSolicitud = gvRow.DataKey("CveSolicitud").ToEntero
|
||||
Dim Folio = gvRow.DataKey("Folio").ToEntero
|
||||
Dim CveSolicitud As Integer = gvRow.DataKey("CveSolicitud").ToEntero
|
||||
Dim Folio As Integer = gvRow.DataKey("Folio").ToEntero
|
||||
|
||||
Using nom As ClsNominas = New ClsNominas()
|
||||
ProcesoOk = nom.SolicitudesCancelar(CveSolicitud, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)
|
||||
@@ -5266,7 +5187,7 @@ Partial Class Compras_eFacturas
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkRegistarFactura_Click(sender As Object, e As EventArgs)
|
||||
DVRegistraFacturas.Visible = True
|
||||
DivRegistraFacturas.Visible = True
|
||||
GvD.Columns(0).Visible = True
|
||||
|
||||
UpRegistroFacturas.Update()
|
||||
|
||||
Reference in New Issue
Block a user