Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -4198,7 +4198,7 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
|
||||
|
||||
@@ -43,13 +43,12 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
|
||||
private void RecargarGlobal()
|
||||
{
|
||||
set_GlobalDTTiposGastos(UsuarioActual.CveEmpresa, -1, null);
|
||||
//ClsCompras ObjCompras = new ClsCompras();
|
||||
//if (ObjCompras.GetTipoGasto(-1, -1))
|
||||
//{
|
||||
// set_GlobalDTTiposGastos(UsuarioActual.CveEmpresa, ObjCompras.DtResultados);
|
||||
//}
|
||||
//ObjCompras.Dispose();
|
||||
ClsCompras ObjCompras = new ClsCompras();
|
||||
if (ObjCompras.GetTipoGasto(-1, -1))
|
||||
{
|
||||
set_GlobalDTTiposGastos(UsuarioActual.CveEmpresa, ObjCompras.DtResultados);
|
||||
}
|
||||
ObjCompras.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarTipoGastoD_Click(object sender, EventArgs e)
|
||||
@@ -93,8 +92,8 @@ public partial class Compras_CatTipoGasto : ClsPaginas
|
||||
ClsCompras ObjCompras = new ClsCompras();
|
||||
if (BtnAgregarTipoGasto.Text == "Agregar")
|
||||
{
|
||||
if (ObjCompras.AddTipoGasto(TxtTipoGasto.Text, ChkEstatus.Checked, DateTime.Now.ToString(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
if (ObjCompras.AddTipoGasto(TxtTipoGasto.Text,ChkEstatus.Checked,DateTime.Now.ToString(),UsuarioActual.CveUsuario,UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Alert("Se agregó el Tipo de Gasto correctamente");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,6 +401,15 @@
|
||||
<asp:Literal ID="LtlFechaInv" runat="server" Text='<%# Eval("FechaInv", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="60">
|
||||
<HeaderTemplate>
|
||||
Observaciones
|
||||
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlObs" runat="server" Text='<%# Eval("Observaciones") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -464,24 +473,29 @@
|
||||
<asp:CheckBox ID="ChkIVA" runat="server" Text="IVA" /></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" /></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkObs" runat="server" Text="Observaciones"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkDesc" runat="server" Text="Descuentos" /></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text="Total" /></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkAbre" runat="server" Text="Moneda" /></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkRazon" runat="server" Text="Proveedor" /></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkFolio" runat="server" Text="Folio Inv" /></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkFecha" runat="server" Text="Fecha Movimiento" /></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -168,6 +168,7 @@ Partial Class Compras_RepComprasDetalle
|
||||
ChkRazon.Checked = True
|
||||
ChkFolio.Checked = True
|
||||
ChkFecha.Checked = True
|
||||
ChkObs.Checked = True
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -597,54 +598,15 @@ Partial Class Compras_RepComprasDetalle
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
If ChkIVA.Checked Then
|
||||
GvDatos.Columns(4).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(4).Visible = False
|
||||
End If
|
||||
|
||||
If ChkIEPS.Checked Then
|
||||
GvDatos.Columns(5).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
If ChkDesc.Checked Then
|
||||
GvDatos.Columns(6).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(6).Visible = False
|
||||
End If
|
||||
|
||||
If ChkTotal.Checked Then
|
||||
GvDatos.Columns(7).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(7).Visible = False
|
||||
End If
|
||||
|
||||
If ChkAbre.Checked Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRazon.Checked Then
|
||||
GvDatos.Columns(9).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(9).Visible = False
|
||||
End If
|
||||
|
||||
If ChkFolio.Checked Then
|
||||
GvDatos.Columns(10).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(10).Visible = False
|
||||
End If
|
||||
|
||||
If ChkFecha.Checked Then
|
||||
GvDatos.Columns(11).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(11).Visible = False
|
||||
End If
|
||||
|
||||
GvDatos.Columns(4).Visible = ChkIVA.Checked
|
||||
GvDatos.Columns(5).Visible = ChkIEPS.Checked
|
||||
GvDatos.Columns(6).Visible = ChkDesc.Checked
|
||||
GvDatos.Columns(7).Visible = ChkTotal.Checked
|
||||
GvDatos.Columns(8).Visible = ChkAbre.Checked
|
||||
GvDatos.Columns(9).Visible = ChkRazon.Checked
|
||||
GvDatos.Columns(10).Visible = ChkFolio.Checked
|
||||
GvDatos.Columns(11).Visible = ChkFecha.Checked
|
||||
GvDatos.Columns(12).Visible = ChkObs.Checked
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -66,6 +66,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkBitacotaFacturas" runat="server" OnClick="LnkBitacotaFacturas_Click"><i class="fa fa-book" ></i> Bitácora Facturas</asp:LinkButton>
|
||||
</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>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPdf"/>
|
||||
@@ -374,7 +377,7 @@
|
||||
<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" %>'
|
||||
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>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -2770,23 +2770,7 @@ Partial Class Compras_eFacturas
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
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)
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -3452,4 +3434,361 @@ Partial Class Compras_eFacturas
|
||||
Alert("no se pudo procesar el archivo xml")
|
||||
End If
|
||||
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
|
||||
@@ -6,28 +6,28 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>1.86091cm</Width>
|
||||
<Width>2.28424cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.28292cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.49458cm</Width>
|
||||
<Width>1.5475cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>7.13431cm</Width>
|
||||
<Width>5.78365cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.99729cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.10313cm</Width>
|
||||
<Width>2.10377cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.1825cm</Width>
|
||||
<Width>2.10378cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.31479cm</Width>
|
||||
<Width>3.26728cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -149,11 +149,84 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<ColSpan>3</ColSpan>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell />
|
||||
<TablixCell />
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox16">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontFamily>Verdana</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox16</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>Black</Color>
|
||||
<Style>Solid</Style>
|
||||
<Width>1pt</Width>
|
||||
</TopBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox18">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontFamily>Verdana</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox18</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>Black</Color>
|
||||
<Style>Solid</Style>
|
||||
<Width>1pt</Width>
|
||||
</TopBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox22">
|
||||
@@ -605,10 +678,40 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<ColSpan>2</ColSpan>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell />
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox15">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontFamily>Verdana</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox15</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox21">
|
||||
@@ -1221,9 +1324,8 @@
|
||||
<Source>External</Source>
|
||||
<Value>=Parameters!pImg.Value</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Left>0.09633cm</Left>
|
||||
<Height>1.5cm</Height>
|
||||
<Width>1.5cm</Width>
|
||||
<Height>2.07257cm</Height>
|
||||
<Width>3.56716cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1251,9 +1353,8 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>0.25646cm</Top>
|
||||
<Left>2.87447cm</Left>
|
||||
<Height>0.81167cm</Height>
|
||||
<Width>12.68053cm</Width>
|
||||
<Width>20.37043cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1285,9 +1386,8 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>1.12429cm</Top>
|
||||
<Left>2.87447cm</Left>
|
||||
<Height>0.94828cm</Height>
|
||||
<Width>12.68053cm</Width>
|
||||
<Width>20.37043cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<ToolTip>="Moviemtos, Auxiliares del Catalogo" & System.Environment.NewLine & "al " &Parameters!pFechaFin.Value</ToolTip>
|
||||
<Style>
|
||||
@@ -1321,9 +1421,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.25646cm</Top>
|
||||
<Left>16.87794cm</Left>
|
||||
<Left>14.99937cm</Left>
|
||||
<Height>0.81167cm</Height>
|
||||
<Width>3.49249cm</Width>
|
||||
<Width>5.37106cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1336,7 +1436,7 @@
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>2.0944in</Height>
|
||||
<Height>2.2819in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>8.01986in</Width>
|
||||
@@ -1346,6 +1446,41 @@
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
<Textbox Name="Textbox8">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>="Libro Mayor" & System.Environment.NewLine & "al " &Parameters!pFechaFin.Value</Value>
|
||||
<Style>
|
||||
<FontSize>11pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Height>0.89958cm</Height>
|
||||
<Width>20.37043cm</Width>
|
||||
<Visibility>
|
||||
<Hidden>= (Globals.PageNumber=1)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox12">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
@@ -1367,43 +1502,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>0.02088cm</Top>
|
||||
<Left>16.87794cm</Left>
|
||||
<Height>0.57912cm</Height>
|
||||
<Width>3.49249cm</Width>
|
||||
<Visibility>
|
||||
<Hidden>= (Globals.PageNumber=1)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox8">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>="Libro Mayor" & System.Environment.NewLine & "al " &Parameters!pFechaFin.Value</Value>
|
||||
<Style>
|
||||
<FontSize>11pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Left>2.87447cm</Left>
|
||||
<Height>0.89958cm</Height>
|
||||
<Width>12.68053cm</Width>
|
||||
<Left>14.99937cm</Left>
|
||||
<Height>0.8787cm</Height>
|
||||
<Width>5.37106cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>= (Globals.PageNumber=1)</Hidden>
|
||||
@@ -1414,8 +1515,6 @@
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
@@ -1451,9 +1550,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>0.0703cm</Top>
|
||||
<Left>14.85419cm</Left>
|
||||
<Left>14.99937cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>5.51625cm</Width>
|
||||
<Width>5.37107cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -115,7 +115,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
Private Sub CargaDatos()
|
||||
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)
|
||||
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>
|
||||
|
||||
@@ -100,93 +100,7 @@ Partial Class Ventas_AuxiliarCliente
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
Public Sub ExportToExcelGTest(Gv As GridView, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing)
|
||||
Dim sw As New StringWriter()
|
||||
Dim htw As New HtmlTextWriter(sw)
|
||||
Gv.RenderControl(htw)
|
||||
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("ESWN-4QFD-26JF-1SZ8")
|
||||
|
||||
Dim excel As GemBox.Spreadsheet.ExcelFile
|
||||
Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
|
||||
Using htmlStream = New MemoryStream(options.Encoding.GetBytes(sw.ToString()))
|
||||
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream, options)
|
||||
If Usuario IsNot Nothing Then
|
||||
Dim worksheet = excel.Worksheets(0)
|
||||
Dim num As Integer = worksheet.Rows.Count
|
||||
If num > 128 Then num = 128
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
'If columnCount > 1 Then
|
||||
' For i As Integer = 1 To columnCount - 1
|
||||
' worksheet.Columns(i).AutoFit(1, worksheet.Rows(1), worksheet.Rows(num - 1))
|
||||
' Next
|
||||
'End If
|
||||
|
||||
worksheet.Rows.InsertEmpty(0, 7)
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Usuario.CveEmpresa)
|
||||
|
||||
If Imagen.Exists Then
|
||||
worksheet.Pictures.Add(logouri.ToString(), "A1", "B4")
|
||||
End If
|
||||
|
||||
Dim celdasConTexto = worksheet.GetUsedCellRange(True)
|
||||
celdasConTexto.Style.Font.Name = "Calibri Light"
|
||||
|
||||
Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
|
||||
RangoNombreEmpresa.Merged = True
|
||||
RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
|
||||
RangoNombreEmpresa.Style.Font.Size = 18 * 20
|
||||
RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
|
||||
RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
|
||||
RangoTitulo.Merged = True
|
||||
RangoTitulo.Value = Titulo
|
||||
RangoTitulo.Style.Font.Size = 20 * 20
|
||||
RangoTitulo.Style.Font.Name = "Calibri Light"
|
||||
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
Dim FiltroCliente = worksheet.Cells.GetSubrangeAbsolute(5, celdasConTexto.FirstColumnIndex, 5, celdasConTexto.LastColumnIndex)
|
||||
FiltroCliente.Merged = True
|
||||
FiltroCliente.Value = String.Format("Cliente: {0} Fecha Inicio: {1} Fecha Fin: {2} Opción: {3}", DdlClientes.SelectedText, txtFechaI.Text, txtFechaF.Text, DdlOpcion.SelectedItem.Text)
|
||||
FiltroCliente.Style.Font.Size = 12 * 20
|
||||
FiltroCliente.Style.Font.Name = "Calibri Light"
|
||||
FiltroCliente.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
|
||||
FiltroCliente.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||
worksheet.Rows(7).Cells(i).Style.Font.Size = 12 * 20
|
||||
worksheet.Rows(7).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
worksheet.Rows(7).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
worksheet.Rows(7).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(7).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
'If i > 0 Then
|
||||
' Try
|
||||
' worksheet.Columns(i).AutoFit(1)
|
||||
' Catch ex As Exception
|
||||
' End Try
|
||||
'End If
|
||||
Next
|
||||
|
||||
|
||||
Dim IndexEndTable As Integer = Gv.Rows.Count + 9
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(0).Value = "Usuario Imprimió:"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(4).Value = "Fecha Impresión: "
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(4).Value = DateTime.Now.ToString()
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(8).Value = "Impreso en SIG"
|
||||
End If
|
||||
|
||||
End Using
|
||||
htw.Dispose()
|
||||
|
||||
excel.Save(HttpContext.Current.Response, NombreArchivoXLSx)
|
||||
ExportToExcelGembox(Gv, NombreArchivoXLSx, Usuario, txtFechaI.Text, txtFechaF.Text, Titulo, "", 1)
|
||||
|
||||
End Sub
|
||||
Protected Sub GvAuxCliente_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
Reference in New Issue
Block a user