Correcion Anexo
This commit is contained in:
@@ -4198,7 +4198,7 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer) As Boolean
|
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer, CveUsuario As Integer ) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
|
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
|
||||||
|
|||||||
@@ -66,6 +66,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkBitacotaFacturas" runat="server" OnClick="LnkBitacotaFacturas_Click"><i class="fa fa-book" ></i> Bitácora Facturas</asp:LinkButton>
|
<asp:LinkButton ID="LnkBitacotaFacturas" runat="server" OnClick="LnkBitacotaFacturas_Click"><i class="fa fa-book" ></i> Bitácora Facturas</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkVinculacionMasivaComplementos" runat="server" OnClick="LnkVinculacionMasivaComplementos_Click" Visible ="true" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea realizar la vinculación masiva de complementos?" data-btn-ok-label="si"><i class="fa fa-tasks" ></i> Vinculación Masiva Complementos</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LnkPdf"/>
|
<asp:PostBackTrigger ControlID="LnkPdf"/>
|
||||||
@@ -374,7 +377,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<asp:LinkButton ID="LnkOP" runat="server" AlternateText="Omitir" ToolTip="Omitir Factura" CommandArgument='<%# Eval("CveFactura") %>' Visible='<%# Eval("CveCompra").ToString = "" AndAlso Eval("CveFactura").ToString <> "" AndAlso Eval("FueValidado").ToString <> "3" %>'
|
<asp:LinkButton ID="LnkOP" runat="server" AlternateText="Omitir" ToolTip="Omitir Factura" CommandArgument='<%# Eval("CveFactura") %>' Visible='<%# Eval("CveCompra").ToString = "" AndAlso Eval("CveFactura").ToString <> "" AndAlso Eval("FueValidado").ToString <> "3" %>'
|
||||||
CssClass="btn btn-circle btn-sm grey-cascade" CausesValidation="False" CommandName="Omitir" OnClientClick="javascript:return confirm('¿Está seguro que desea omitir la factura?');">
|
CssClass="btn btn-circle btn-sm grey-cascade" CausesValidation="False" CommandName="Omitir" OnClientClick="javascript:return confirm('¿Está seguro que desea omitir la factura?');">
|
||||||
<i class='fa fa-eye-slash fa-2x'></i>
|
<i class='fa fa-eye-slash fa-2x'></i>
|
||||||
</asp:LinkButton>
|
</asp:LinkButton>
|
||||||
</div>
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -2770,23 +2770,7 @@ Partial Class Compras_eFacturas
|
|||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'ImportePago
|
|
||||||
'For Each node As XmlNode In nodePago
|
|
||||||
|
|
||||||
' Dim Nrow As DataRow = DTDocumentosRelacionados.NewRow
|
|
||||||
|
|
||||||
' Nrow("Serie") = ValorXML(node, "Serie")
|
|
||||||
' Nrow("Folio") = ValorXML(node, "Folio").ToEntero
|
|
||||||
' Nrow("SerieFolio") = ValorXML(node, "Serie") & "-" & ValorXML(node, "Folio").ToEntero
|
|
||||||
' Nrow("IdDocumento") = ValorXML(node, "IdDocumento")
|
|
||||||
' Nrow("MonedaDR") = ValorXML(node, "MonedaDR")
|
|
||||||
' Nrow("MetodoDePagoDR") = ValorXML(node, "MetodoDePagoDR")
|
|
||||||
' Nrow("ImpPagado") = ValorXML(node, "ImpPagado").ToDecimal
|
|
||||||
' Nrow("Fecha") = FechaPago
|
|
||||||
|
|
||||||
' DTDocumentosRelacionados.Rows.Add(Nrow)
|
|
||||||
' StrUUID.AppendFormat("'{0}',", ValorXML(node, "IdDocumento").Replace("'", ""))
|
|
||||||
'Next
|
|
||||||
|
|
||||||
Dim ObjCompraFolios As New ClsCompras
|
Dim ObjCompraFolios As New ClsCompras
|
||||||
If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa, OP:=2) Then
|
If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa, OP:=2) Then
|
||||||
@@ -3031,12 +3015,10 @@ Partial Class Compras_eFacturas
|
|||||||
|
|
||||||
If HdnCveIE.Value.ToEntero > 0 Then
|
If HdnCveIE.Value.ToEntero > 0 Then
|
||||||
|
|
||||||
|
|
||||||
For Each dRow As DataRow In DT_ComprasSinIE.Rows
|
For Each dRow As DataRow In DT_ComprasSinIE.Rows
|
||||||
objEventos.AddEventoBitacora($"Complemento { dRow("SerieFolioPago").ToString } vinculado manualmente a compra {dRow("SerieFolioCompra").ToString}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=dRow("CveCompra").ToString.ToEntero)
|
objEventos.AddEventoBitacora($"Complemento { dRow("SerieFolioPago").ToString } vinculado manualmente a compra {dRow("SerieFolioCompra").ToString}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=dRow("CveCompra").ToString.ToEntero)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -3452,4 +3434,361 @@ Partial Class Compras_eFacturas
|
|||||||
Alert("no se pudo procesar el archivo xml")
|
Alert("no se pudo procesar el archivo xml")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub VinculacionMasivaComplementos()
|
||||||
|
|
||||||
|
Dim CountVinculados As Integer = 0
|
||||||
|
Dim ValidadoSAT As Boolean = False
|
||||||
|
Dim VinculacionValida As Boolean = False
|
||||||
|
|
||||||
|
For Each gvRow As GridViewRow In GvPagos.Rows
|
||||||
|
|
||||||
|
Dim DTDocumentosRelacionados As New DataTable
|
||||||
|
Dim DTVinculacion As New DataTable
|
||||||
|
|
||||||
|
Dim ObjValidacion As New ClsValidaCFDi(gvRow.DataKey("UUID"), gvRow.DataKey("RFCDe"), gvRow.DataKey("RFCPara"), 0)
|
||||||
|
|
||||||
|
If ObjValidacion.EsValida > 0 Then
|
||||||
|
|
||||||
|
If ObjValidacion.EsValida = 2 Then
|
||||||
|
ValidadoSAT = False
|
||||||
|
Else
|
||||||
|
Dim ObjDatos As New ClsCompras
|
||||||
|
ValidadoSAT = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, gvRow.DataKey("CveFactura").ToEntero)
|
||||||
|
ObjDatos.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
ValidadoSAT = False
|
||||||
|
End If
|
||||||
|
ObjValidacion.Dispose()
|
||||||
|
|
||||||
|
If Not ValidadoSAT Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim sbSinIE As New StringBuilder
|
||||||
|
|
||||||
|
HdnCveIE.Value = ""
|
||||||
|
MSGComplemento = ""
|
||||||
|
ViculacionConPUE = False
|
||||||
|
ListaComprasPUE.Clear()
|
||||||
|
ComplementoConPUE = ""
|
||||||
|
|
||||||
|
DT_ComprasSinIE = New DataTable
|
||||||
|
|
||||||
|
Dim ListaComprasPUEInterna As New List(Of Integer)
|
||||||
|
|
||||||
|
Dim CveComplementoPagoCompra As Integer = gvRow.DataKey("CveComplementoPagoCompra").ToString.ToEntero
|
||||||
|
|
||||||
|
If CveComplementoPagoCompra > 0 Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim SerieFolioIE As String = ""
|
||||||
|
Dim UUIDPago As String = ""
|
||||||
|
'Dim ImportePago As Decimal = 0
|
||||||
|
Dim StrUUID As New StringBuilder
|
||||||
|
Dim Monto As Decimal = 0
|
||||||
|
Dim nodePagos As XmlNode = Nothing
|
||||||
|
Dim nodePagos2 As XmlNode = Nothing
|
||||||
|
Dim nodeComp As XmlNode = Nothing
|
||||||
|
Dim nodeaGral As XmlNode = Nothing
|
||||||
|
Dim nodeTFD As XmlNode = Nothing
|
||||||
|
Dim ImporteIES As Double = 0
|
||||||
|
Dim DiferenciaImportes As Double = 0
|
||||||
|
Dim TextoDiferenciaImporte As String = ""
|
||||||
|
Dim FechaPago As Date
|
||||||
|
Dim PagosCantidad As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim XMLDoc As New XmlDocument
|
||||||
|
Dim Archivo As String = String.Format("{0}Empresas\{1}\Compras\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
||||||
|
If IO.File.Exists(Archivo) Then
|
||||||
|
|
||||||
|
|
||||||
|
Dim SXML As String = File.ReadAllText(Archivo).Replace(vbLf, " ").Replace(vbCrLf, " ")
|
||||||
|
|
||||||
|
SXML = SXML.Trim((Convert.ToChar(0)))
|
||||||
|
|
||||||
|
XMLDoc.LoadXml(SXML)
|
||||||
|
|
||||||
|
Dim Xml As New StringBuilder
|
||||||
|
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||||
|
|
||||||
|
namespaces.AddNamespace(XMLDoc.DocumentElement.Prefix, "http://www.sat.gob.mx/cfd/3")
|
||||||
|
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
|
||||||
|
namespaces.AddNamespace("pago10", "http://www.sat.gob.mx/Pagos")
|
||||||
|
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)
|
||||||
|
nodePagos = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos/{0}:Pago", "pago10"), namespaces)
|
||||||
|
nodePagos2 = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos", "pago10"), namespaces)
|
||||||
|
'Monto = ValorXML(nodePagos, "Monto").ToDecimal
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
DTDocumentosRelacionados.Columns.Add("Serie")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("SerieFolio")
|
||||||
|
|
||||||
|
DTDocumentosRelacionados.Columns.Add("IdDocumento")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("Folio", GetType(Integer))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("MonedaDR")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("MetodoDePagoDR")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("ImpPagado", GetType(Decimal))
|
||||||
|
|
||||||
|
DTDocumentosRelacionados.Columns.Add("CveFactura", GetType(Integer))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("CveCompra", GetType(Integer))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("CveIE", GetType(Integer))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("Fecha", GetType(Date))
|
||||||
|
|
||||||
|
DTDocumentosRelacionados.Columns.Add("FolioPago")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("ImportePago", GetType(Decimal))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("FechaPago", GetType(Date))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim nodePagosN As XmlNodeList
|
||||||
|
nodePagosN = nodeComp.SelectNodes(String.Format("//{0}:Pagos", "pago10"), namespaces)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
For Each NodosPagos As XmlNode In nodePagosN
|
||||||
|
For Each innernode As XmlNode In NodosPagos
|
||||||
|
|
||||||
|
FechaPago = ValorXML(innernode, "FechaPago").ToDate
|
||||||
|
PagosCantidad = PagosCantidad + 1
|
||||||
|
|
||||||
|
For Each node As XmlNode In innernode
|
||||||
|
|
||||||
|
Dim Nrow As DataRow = DTDocumentosRelacionados.NewRow
|
||||||
|
|
||||||
|
Nrow("Serie") = ValorXML(node, "Serie")
|
||||||
|
Nrow("Folio") = ValorXML(node, "Folio").ToEntero
|
||||||
|
Nrow("SerieFolio") = ValorXML(node, "Serie") & "-" & ValorXML(node, "Folio").ToEntero
|
||||||
|
Nrow("IdDocumento") = ValorXML(node, "IdDocumento")
|
||||||
|
Nrow("MonedaDR") = ValorXML(node, "MonedaDR")
|
||||||
|
Nrow("MetodoDePagoDR") = ValorXML(node, "MetodoDePagoDR")
|
||||||
|
|
||||||
|
Monto = Monto + ValorXML(node, "ImpPagado").ToDecimal
|
||||||
|
|
||||||
|
Nrow("ImpPagado") = ValorXML(node, "ImpPagado").ToDecimal
|
||||||
|
Nrow("Fecha") = FechaPago
|
||||||
|
|
||||||
|
DTDocumentosRelacionados.Rows.Add(Nrow)
|
||||||
|
StrUUID.AppendFormat("'{0}',", ValorXML(node, "IdDocumento").Replace("'", ""))
|
||||||
|
Next
|
||||||
|
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjCompraFolios As New ClsCompras
|
||||||
|
If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa, OP:=2) Then
|
||||||
|
'
|
||||||
|
'.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjCompraFolios.DtResultados.Rows.Count > 0 Then
|
||||||
|
For Each drow As DataRow In ObjCompraFolios.DtResultados.Rows
|
||||||
|
|
||||||
|
For Each dRow2 As DataRow In DTDocumentosRelacionados.Rows
|
||||||
|
|
||||||
|
If dRow2("IdDocumento").ToString.ToUpper = drow("IdDocumento").ToString.ToUpper Then
|
||||||
|
|
||||||
|
dRow2("CveCompra") = drow("CveCompra").ToString.ToEntero
|
||||||
|
dRow2("CveFactura") = drow("CveFactura").ToString.ToEntero
|
||||||
|
dRow2("CveMetodoPago") = drow("CveMetodoPago").ToString.ToEntero
|
||||||
|
dRow2("SerieFolioCompra") = drow("SerieFolioCompra").ToString
|
||||||
|
|
||||||
|
|
||||||
|
If drow("CveIE").ToString.ToEntero > 0 Then
|
||||||
|
|
||||||
|
dRow2("CveIE") = drow("CveIE").ToString.ToEntero
|
||||||
|
dRow2("ImportePago") = drow("Importe").ToString.ToDecimal
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
dRow2("FolioPago") = drow("FolioIE")
|
||||||
|
dRow2("FechaPago") = drow("FechaDocumento")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjCompraFolios.Dispose()
|
||||||
|
|
||||||
|
'GVPDocumentosRelacionadosPagos.DataSource = DTDocumentosRelacionados
|
||||||
|
'GVPDocumentosRelacionadosPagos.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
For Each dRow2 As DataRow In DTDocumentosRelacionados.Rows
|
||||||
|
If dRow2("CveMetodoPago").ToString.ToEntero > 0 Then
|
||||||
|
If dRow2("CveMetodoPago").ToString.ToEntero = 1 Then
|
||||||
|
MSGComplemento = MSGComplemento & $" Compra {dRow2("SerieFolioCompra").ToString } bloqueado Tipo ""PUE"". "
|
||||||
|
|
||||||
|
ListaComprasPUEInterna.Add(dRow2("CveCompra").ToString.ToEntero)
|
||||||
|
|
||||||
|
ComplementoConPUE = $"{SeriePago}-{FolioPago}"
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
DT_ComprasSinIE.Columns.Add("CveCompra", GetType(Integer))
|
||||||
|
DT_ComprasSinIE.Columns.Add("CveFactura", GetType(Integer))
|
||||||
|
DT_ComprasSinIE.Columns.Add("SerieFolioPago")
|
||||||
|
DT_ComprasSinIE.Columns.Add("SerieFolioCompra")
|
||||||
|
|
||||||
|
For Each dRow As DataRow In DTDocumentosRelacionados.Rows
|
||||||
|
Dim nRow As DataRow = DT_ComprasSinIE.NewRow
|
||||||
|
nRow("CveCompra") = dRow("CveCompra").ToString.ToEntero
|
||||||
|
' nRow("CveFactura") = dRow("CveFactura").ToString.ToEntero
|
||||||
|
nRow("SerieFolioPago") = $"{SeriePago}-{FolioPago}"
|
||||||
|
nRow("SerieFolioCompra") = dRow("SerieFolioCompra").ToString
|
||||||
|
|
||||||
|
DT_ComprasSinIE.Rows.Add(nRow)
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Else
|
||||||
|
VinculacionValida = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
CveFacturaPago = gvRow.DataKey("CveFactura").ToEntero
|
||||||
|
CveProveedor = gvRow.DataKey("CveProveedor").ToEntero
|
||||||
|
Dim ObjCompras As New ClsCompras
|
||||||
|
|
||||||
|
|
||||||
|
Dim TieneRegistros As Boolean = False
|
||||||
|
|
||||||
|
If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then
|
||||||
|
' GvVincularPago.DataSource = ObjCompras.DtResultados
|
||||||
|
DTVinculacion = ObjCompras.DtResultados
|
||||||
|
If ObjCompras.DtResultados.Rows.Count > 0 Then
|
||||||
|
SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString
|
||||||
|
'DivVincularPagoManualmente.Visible = False
|
||||||
|
VinculacionValida = True
|
||||||
|
TieneRegistros = True
|
||||||
|
Else
|
||||||
|
'DivVincularPagoManualmente.Visible = True
|
||||||
|
VinculacionValida = False
|
||||||
|
End If
|
||||||
|
'ImportePago = ObjCompras.DtResultados.SUMD("Monto")
|
||||||
|
Else
|
||||||
|
'DivVincularPagoManualmente.Visible = False
|
||||||
|
VinculacionValida = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
For Each dRow As DataRow In DTDocumentosRelacionados.Rows
|
||||||
|
|
||||||
|
Dim FechaDocumento As Date = dRow("FechaPago").ToString.ToDate
|
||||||
|
Dim FechaDoRecibo As Date = dRow("Fecha").ToString.ToDate
|
||||||
|
Dim CveIEDocumento As Integer = dRow("CveIE").ToString.ToEntero
|
||||||
|
|
||||||
|
If CveIEDocumento > 0 And FechaDocumento > New Date(1, 1, 1) Then
|
||||||
|
|
||||||
|
Dim FT1 As Date = FechaDocumento
|
||||||
|
|
||||||
|
If FechaDocumento <> New Date(1, 1, 1) Then
|
||||||
|
FT1 = FechaDocumento.AddDays(-6)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim FT2 As Date = FechaDocumento.AddDays(7)
|
||||||
|
|
||||||
|
If Not (FechaDoRecibo >= FT1 And FechaDoRecibo < FT2) Then
|
||||||
|
|
||||||
|
VinculacionValida = False
|
||||||
|
'MSGComplemento = MSGComplemento & " Existen mas de 3 días de diferencia entre la fecha del documento y la fecha de complemento. "
|
||||||
|
Exit For
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
ObjCompras.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If VinculacionValida Then
|
||||||
|
|
||||||
|
Dim TieneError = False
|
||||||
|
Dim ObjCompra As New ClsCompras
|
||||||
|
ObjCompra.IniciaTransacSQL()
|
||||||
|
|
||||||
|
|
||||||
|
For Each DTRow As DataRow In DTVinculacion.Rows
|
||||||
|
|
||||||
|
If Not ObjCompra.AddComplementoPago(DTRow("CveIE").ToString.ToEntero, DTRow("CveCompra").ToString.ToEntero, DTRow("Monto").ToString.ToDecimal, DTRow("CvePrePolizaDetalle").ToString.ToEntero, CveFacturaPago) > 0 Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not TieneError AndAlso Not ObjCompra.AddVincularPago(CveFacturaPago) Then
|
||||||
|
TieneError = True
|
||||||
|
Else
|
||||||
|
CountVinculados = CountVinculados + 1
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not TieneError Then
|
||||||
|
ObjCompra.Commit()
|
||||||
|
Else
|
||||||
|
ObjCompra.RollBack()
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjCompra.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
If CountVinculados > 0 Then
|
||||||
|
|
||||||
|
Alert($"Se vincularon {CountVinculados} complementos")
|
||||||
|
CargaDatos()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkVinculacionMasivaComplementos_Click(sender As Object, e As EventArgs)
|
||||||
|
VinculacionMasivaComplementos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoCC.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoCC" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAnexoCatalogoCC.aspx.vb" Inherits="Contabilidad2_RepAnexoCatalogoCC" EnableEventValidation="false" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
|||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim Conta As New ClsContabilidad
|
Dim Conta As New ClsContabilidad
|
||||||
|
|
||||||
If Conta.GetAnexoCatalagoCC(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero) Then
|
If Conta.GetAnexoCatalagoCC(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
||||||
|
|
||||||
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0)
|
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0)
|
||||||
GvCC.DataSource = Conta.DSResultados.Tables(1)
|
GvCC.DataSource = Conta.DSResultados.Tables(1)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosHorizontal.aspx.vb" Inherits="Contabilidad_RepEstadoResultadosHorizontal" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosHorizontal.aspx.vb" Inherits="Contabilidad_RepEstadoResultadosHorizontal" EnableEventValidation="false" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
Reference in New Issue
Block a user