This commit is contained in:
Oscar Irigoyen
2023-06-21 07:55:37 -07:00
9 changed files with 825 additions and 100 deletions

View File

@@ -3295,6 +3295,32 @@ Public Class ClsCompras
End Function
Public Function GetRepSATSolicitudesRecibidas(CveEmpresa As Integer, FechaInicio As Date, FechaFin As DateTime, Opcion As Integer, Vista As Integer) As Boolean
Dim retorno As Boolean = False
Try
DataAdapter("PA_SAT_SolicitudesRecibidasRepGet", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@Vista", SqlDbType.Int).Value = Vista
End With
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
retorno = False
OnError("Ocurrió un error al consultar el reporte de CFDI contra compras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
End Class

View File

@@ -8545,6 +8545,7 @@ Public Class ClsPaginas
PaginaDict.Add("/OI/CircularDetalle.aspx".ToUpper(), 756)
PaginaDict.Add("/OI/CircularDetalleB.aspx".ToUpper(), 756)
PaginaDict.Add("/Compras/CatTipoGasto.aspx".ToUpper(), 759)
PaginaDict.Add("/SAT/SolicitudesRecibidasSAT.aspx".ToUpper(), 1339)
#End Region
#Region "Contabilidad"
PaginaDict.Add("/Contabilidad/ContabilidadElectronica.aspx".ToUpper(), 566)

View File

@@ -145,7 +145,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveIE" Target="_blank" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Folio" />
<asp:BoundField DataField="FechaDocumento" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="FechaDocumento" ItemStyle-Width="85px" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="Observaciones" ItemStyle-HorizontalAlign="Left" HeaderText="Observaciones" />
<asp:BoundField DataField="Cargo" ItemStyle-HorizontalAlign="Right" HeaderText="Cargo" DataFormatString="{0:N2}" />
<asp:BoundField DataField="Abono" ItemStyle-HorizontalAlign="Right" HeaderText="Abono" DataFormatString="{0:N2}" />

View File

@@ -102,6 +102,10 @@ Partial Class Bancos_ConciliacionesBancariasaspx
ObjBancos.Dispose()
GvDatos.DataBind()
UpDatos.Update()
CeFechaAplicado.StartDate = txtFechaI.Text.ToDate
CeFechaAplicado.EndDate = txtFechaF.Text.ToDate
CeFechaDesconciliado.StartDate = txtFechaI.Text.ToDate
CeFechaDesconciliado.EndDate = txtFechaF.Text.ToDate
If GvDatos.Rows.Count > 0 Then RegistraScript("CalculaSeleccionados();", "1")
End Sub
@@ -178,8 +182,9 @@ Partial Class Bancos_ConciliacionesBancariasaspx
If Not CBool(Dr("FueConciliado").ToString) And Dr("CveIE").ToString.ToEntero > 0 Then
For Each DrE As DataRow In DtDatosEdoCuenta.Rows
If ((Dr("FechaDocumento").ToString.ToDate = DrE("FechaDocumento").ToString.ToDate And Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 1) Or (Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 2)) And Not CBool(DrE("Seleccionado").ToString) And Not CBool(DrE("FueConciliado").ToString) And Not CBool(Dr("Seleccionado").ToString) Then
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate), -1, 1, 1, UsuarioActual.CveUsuario) Or
Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate), DrE("CveIEEstadoCuenta").ToString.ToEntero, 1, 2, UsuarioActual.CveUsuario) Then
Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate)
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, FechaConciliado, -1, 1, 1, UsuarioActual.CveUsuario) Or
Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, FechaConciliado, DrE("CveIEEstadoCuenta").ToString.ToEntero, 1, 2, UsuarioActual.CveUsuario) Then
ErrorTrans = True
Else
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Dr("CveIE").ToString.ToEntero) Then
@@ -283,7 +288,8 @@ Partial Class Bancos_ConciliacionesBancariasaspx
Dim CveIE As Integer = 0
For Each Gvr As GridViewRow In GvDatos.Rows
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate), -1, 1, 1, UsuarioActual.CveUsuario) Then
Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, FechaConciliado, -1, 1, 1, UsuarioActual.CveUsuario) Then
ErrorTrans = True
Else
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
@@ -296,8 +302,10 @@ Partial Class Bancos_ConciliacionesBancariasaspx
Next
For Each Gvr As GridViewRow In GvEdoConciliacion.Rows
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
If Not ObjBancos.UpdateIEEstadoCuenta(Gvr.DataKey("CveIEEstadoCuenta").ToEntero, Gvr.DataKey("Importe").ToDouble, True, CveIE, Gvr.DataKey("Referencia").ToString,
Gvr.DataKey("Tipo").ToString, Gvr.DataKey("FechaDocumento").ToDate, Gvr.DataKey("CveCuenta").ToEntero) Then
Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)
If Not ObjBancos.UpdateConciliacionBancaria(CveIE, FechaConciliado, Gvr.DataKey("CveIEEstadoCuenta").ToEntero, 1, 2, UsuarioActual.CveUsuario) Then
'If Not ObjBancos.UpdateIEEstadoCuenta(Gvr.DataKey("CveIEEstadoCuenta").ToEntero, Gvr.DataKey("Importe").ToDouble, True, CveIE, Gvr.DataKey("Referencia").ToString,
' Gvr.DataKey("Tipo").ToString, Gvr.DataKey("FechaDocumento").ToDate, Gvr.DataKey("CveCuenta").ToEntero) Then
ErrorTrans = True
End If
End If
@@ -382,7 +390,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
Protected Sub LnkDesconciliar_Click(sender As Object, e As EventArgs)
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
ModalidadDesconciliar = "D"
TxtFechaDesconciliado.Text = Now.ToShortDateString
TxtFechaDesconciliado.Text = txtFechaF.Text
CveIEDesconciliar = gvRow.DataKey("CveIE").ToEntero
UpDesconciliar.Update()
RegistraScript("$('#DModalDesconciliar').modal()")

View File

@@ -3,7 +3,14 @@
<%@ Import Namespace="Extensiones" %>
<asp:Content ID="CSS" ContentPlaceHolderID="CSS" runat="Server">
<style>
<style>
.truncate {
width: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#Gv tr {
}
/*#Gv > tbody > tr > td a,*/ #Gv > tbody > tr > th a {
@@ -446,7 +453,7 @@
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="100px">
<HeaderTemplate>
<div>
<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_SubProyecto" runat="server" CausesValidation="false" Text="Proyecto" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,SubProyecto"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_TipoPago" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,SubProyecto" />
@@ -457,17 +464,19 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField ItemStyle-CssClass="truncate">
<HeaderTemplate>
<div>
<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_UsuarioRegistro" runat="server" CausesValidation="false" Text="Usuario Registró" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,UsuarioRegistro"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_UsuarioRegistro" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,UsuarioRegistro" />
</div>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlUsuarioRegistro" runat="server" Text='<%# Eval("UsuarioRegistro")%>'></asp:Literal>
<div class="truncate" style="width: 100px;">
<asp:Literal ID="LtlUsuarioRegistro" runat="server" Text='<%# Eval("UsuarioRegistro")%>' ></asp:Literal>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="100px">
<HeaderTemplate>
<div>
<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_Fecha" runat="server" CausesValidation="false" Text="Fecha F." OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,Fecha"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_Fecha" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,Fecha" />
@@ -477,7 +486,7 @@
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="100px">
<HeaderTemplate>
<div>
<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_FechaVencimiento" runat="server" CausesValidation="false" Text="Vencimiento" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,FechaVencimiento"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_FechaVencimiento" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,FechaVencimiento" />
@@ -487,7 +496,7 @@
<asp:Literal ID="LtlFV" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<asp:TemplateField Visible="false" HeaderStyle-Width="40px">
<%-- <HeaderTemplate>
<div>
<asp:Literal ID="LtlAlm" runat="server" Text="Almacen"></asp:Literal>
@@ -497,7 +506,7 @@
<asp:Label data-toggle="tooltip" data-html="true" Text='' ID="LbEstatusInv" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="125px">
<HeaderTemplate>
<div>
<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_Original" runat="server" CausesValidation="false" Text="Original" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,Original"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_Original" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,Original" />
@@ -518,7 +527,7 @@
<ItemTemplate>
<asp:Literal ID="LtlAbo" runat="server" Text='<%# Eval("Abonado", "{0:N2}")%>'></asp:Literal>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
@@ -527,7 +536,7 @@
</div>
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtS" Style="text-align: right" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>' CssClass="TextBoxAsLabel" Width="85px" ClientIDMode="Predictable"></asp:TextBox><asp:HiddenField ID="HdnSaldo" runat="server" Value='<%# Eval("Saldo")%>'></asp:HiddenField>
<asp:TextBox ID="TxtS" Style="text-align: right" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>' CssClass="TextBoxAsLabel" Width="95px" ClientIDMode="Predictable"></asp:TextBox><asp:HiddenField ID="HdnSaldo" runat="server" Value='<%# Eval("Saldo")%>'></asp:HiddenField>
<asp:HiddenField ID="HdnTC" runat="server" Value='<%# Eval("TipoCambio")%>' ClientIDMode="Predictable"></asp:HiddenField>
</ItemTemplate>

View File

@@ -40,7 +40,6 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
<ContentTemplate>
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
@@ -48,73 +47,71 @@
<div class="portlet-title portlet-filterT smalltitle magindate">
<div class="tools">
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
<a href="javascript:;" class="expand"></a>
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption ">
<ul class="list-inline" style="font-size: 12px;">
<li>
<label style="width:55px">Ejercicio:</label>
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
</li>
<li>
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>
<asp:DropDownList ID="DdlSubProyecto" Width="200px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
</li>
<li>
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl">Periodo: </label>
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
<div class="row">
<div class="col-md-1 truncate">
Cuenta
</div>
<div class="col-md-3">
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>Cuenta:
</li>
<li>
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me"
Enabled="true" Width="250px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
</ul>
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">
Ejercicio:
</div>
<div class="col-md-1" style="min-width: 105px">
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
</div>
<div class="col-md-1 truncate">
Periodo:
</div>
<div class="col-md-1" style="min-width: 105px">
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" CssClass="select2me">
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1 truncate">
<asp:Label ID="LblSubProyecto" runat="server" Text="Label"></asp:Label>
</div>
<div class="col-md-1" style="min-width: 115px">
<asp:DropDownList ID="DdlSubProyecto" Width="200px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none">
<ul class="list-inline" style="font-size: 12px;">
<li> <label style="width:55px">Divisor:</label>
<asp:DropDownList ID="DdlDivisor" Width="80px" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="1,000" Value="1000" Selected="True"></asp:ListItem>
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<div class="col-md-1 truncate">
Divisor:
</div>
<div class="col-md-2 truncate">
<asp:DropDownList ID="DdlDivisor" Width="80px" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="1" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
@@ -290,8 +287,6 @@
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -84,13 +84,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
listacolores.Add("#DDDDDD")
listacolores.Add("#999999")
listacolores.Add("#000000")
listacolores.Add("#FF0F00")
'Dim EjercicioParametro, SubProyectoParametro, DivisorParametro As Integer
'CveCuenta = IfNull(Request("C"), "-1").ToString.ToEntero
'EjercicioParametro = IfNull(Request("E"), "-1").ToString.ToEntero
'SubProyectoParametro = IfNull(Request("S"), "-1").ToString.ToEntero
'DivisorParametro = IfNull(Request("D"), "-1").ToString.ToEntero
listacolores.Add("#FF0F00")
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro, Periodo As Integer
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
@@ -202,7 +196,6 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
GvCC.Columns(Index).HeaderText = Dr("SubProyecto").ToString()
listaCampos.Add(New String() {String.Format("SubProyecto{0}", Dr("SubProyecto")), Dr("SubProyecto").ToString()})
'GvCC.Columns(Index + 1).Visible = True
'CType(GvCC.Columns(Index + 1), BoundField).DataField = String.Format("SubProyecto{0}Porcentaje", Dr("SubProyecto"))
'GvCC.Columns(Index + 1).HeaderText = "%"
@@ -312,18 +305,11 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
Dim SubProyecto As String = ""
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
SubProyecto = DdlSubProyecto.SelectedItem.Text
End If
Dim SbFiltros As New StringBuilder()
SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
SbFiltros.AppendFormat("Estado de Resultados Horizontal por : {0}|", SubProyecto)
SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
SbFiltros.AppendFormat("Periodo : {0}|", DdlPeriodo.SelectedItem.Text)
'SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
SbFiltros.AppendFormat("SubProyecto : {0}|", DdlSubProyecto.SelectedItem.Text)
If DdlDivisor.SelectedValue <> "1" Then SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
SbFiltros.AppendFormat("Ejercicio : {0} Periodo : {1}|", DdlEjercicio.SelectedItem.Text, DdlPeriodo.SelectedItem.Text)
GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", DatoTituloExtra:="", DatosFiltros:=SbFiltros.ToString())

View File

@@ -0,0 +1,478 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="SolicitudesRecibidasSAT.aspx.vb" Inherits="SAT_SolicitudesRecibidasSAT" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.dashboard-stat .visual > i {
font-size: 90px;
}
.dashboard-stat .visual > i {
opacity: 0.1;
filter: alpha(opacity=10);
}
.dashboard-stat.SigData {
color: #FFFFFF;
background-color: #3598dc;
}
.dashboard-stat.XMLData {
color: #FFFFFF;
background-color: #900;
}
.dashboard-stat.SigData .more,
.dashboard-stat.XMLData .more {
color: #FFFFFF;
background-color: rgb(0,0,0,0.4);
}
.ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) {
color: #333333;
background-color: #DDD;
font-weight: bold;
}
.reporte1 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
text-align: right !important;
white-space: nowrap;
}
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(2)
/*,.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) */ {
background-color: #900;
color: #FFF;
}
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(3),
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(4),
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(5) /*,
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3),
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(4),
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(5)*/ {
background-color: #3598dc;
color: #FFF;
}
.reporte2 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
text-align: right !important;
white-space: nowrap;
}
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
background-color: #900;
color: #FFF;
}
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(7)) /*,
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(7))*/ {
background-color: #3598dc;
color: #FFF;
}
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3) {
white-space: nowrap;
}
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(4),
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(8),
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(9),
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+13):not(:nth-child(n+19)),
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(24),
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+28):not(:nth-child(n+33)) {
text-align: right !important;
}
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(2),
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+20) /*,
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2),
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+20)*/ {
background-color: #900;
color: #FFF;
}
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(1),
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+20)) /*,
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(1),
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(n+20))*/ {
background-color: #3598dc;
color: #FFF;
}
.reporte4 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
text-align: right !important;
white-space: nowrap;
}
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
background-color: #900;
color: #FFF;
}
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) /*,
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3)*/ {
background-color: #3598dc;
color: #FFF;
}
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
background-color: #900;
color: #FFF;
}
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(3) /*,
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3)*/ {
background-color: #3598dc;
color: #FFF;
}
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n) {
white-space: nowrap;
}
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n+4),
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4) {
text-align: right !important;
}
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4):not(:nth-child(n+7)) {
background-color: #900;
color: #FFF;
}
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+7):not(:nth-child(n+10)) {
background-color: #3598dc;
color: #FFF;
}
.reporte7 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3),
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3) {
text-align: right !important;
}
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) {
background-color: #900;
color: #FFF;
}
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
background-color: #3598dc;
color: #FFF;
}
.reporte8 .GVSolicitudTimbreNominaGral tr td:nth-child(n+6),
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6) {
text-align: right !important;
}
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
background-color: #900;
color: #FFF;
}
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+9):not(:nth-child(n+12)) {
background-color: #3598dc;
color: #FFF;
}
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(1),
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(4) {
white-space: nowrap;
}
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(2),
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(3),
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(n+40) {
text-align: right !important;
}
/* .ajax_tab_xp .ajax_tab_body {
font-size: 9px !important;
}
*/
.ajax__tab_xp .ajax__tab_body {
font-size: 12px !important;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Comparativo compras
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkDownloadExcel" OnClick="LnkDownloadExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i>Excel</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDownloadExcel" />
</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="upDatosChec" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1">Agrupador: </label>
<div class="col-md-2">
<asp:DropDownList ID="DdlReporte" runat="server" Style="width: 100% !important;" CssClass="select2me" DataValueField="CveUsuario" DataTextField="Nombre">
<asp:ListItem Value="1" Text="Mes Acumulado Pesos"></asp:ListItem>
<asp:ListItem Value="2" Text="Por Comprobante"></asp:ListItem>
<asp:ListItem Value="3" Text="Mes Moneda"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 mediocol">Fecha inicio:</label>
<div class="col-md-1" style="min-width: 120px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkRpdFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtRpdFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtRpdFechaInicio" PopupButtonID="LnkRpdFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvRpdFechaInicio" runat="server" ControlToValidate="TxtRpdFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 mediocol">Fecha fin:</label>
<div class="col-md-1" style="min-width: 120px">
<%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="TxtRpdFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender4" TargetControlID="TxtRpdFechaFin" PopupButtonID="LnkFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvRpdFechaFin" runat="server" ControlToValidate="TxtRpdFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="tools">
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" Visible="true" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
</div>
</div>
<div class="portlet-body" style="display: none">
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" runat="server" id="DVResumen1" visible="false">
<div class="col-md-7" style="text-align: right">
<input type="text" id="TxtBusquedaResumen" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaResumen','{0}')", GvResumen.ClientID) %>" style="display: inline-block; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaResumen','{0}')", GvResumen.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<div class="row" runat="server" id="DVResumen2" visible="false">
<div class="col-md-7">
<asp:GridView ID="GvResumen" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" OnRowDataBound="GvResumen_RowDataBound"
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
DataKeyNames="Fecha">
<Columns>
<asp:TemplateField HeaderText="Mes">
<ItemTemplate>
<asp:Label ID="LblMes" runat="server" Text='<%# Eval("Mes")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIG" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LblVTotal" runat="server" Text='<%# Eval("VTotal","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SAT" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LblCBTTotal" runat="server" Text='<%# Eval("CBTTotal","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LblDif" runat="server" Text='<%# Eval("Dif","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<div class="row" runat="server" id="DvDatos1" visible="false">
<div class="col-md-12">
<div class="col-md-12" style="text-align: right">
<input type="text" id="TxtBusquedaDatos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaDatos','{0}')", GvDatos.ClientID) %>" style="display: inline-block; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaDatos','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div class="row" runat="server" id="DvDatos2" visible="false">
<div class="col-md-12">
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="false" OnRowDataBound="GvDatos_RowDataBound"
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
DataKeyNames="UUID,CountRegistros,VTotal,CBTTotal,CountRegistrosSIG,CountRegistrosSAT,DifImporte,Abreviatura,CBTMoneda,CFDIData,CveSolicitudDetalle,CveCompra,VSerieFolio,Sistema">
<Columns>
<asp:TemplateField HeaderText="Folio">
<ItemTemplate>
<asp:Label runat="server" ID="LblUUID" Text='<%# Eval("UUID")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField HeaderText="Sistema" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataTextField="Sistema" ControlStyle-CssClass='Texto' Target='_blank'></asp:HyperLinkField>
<%-- <asp:TemplateField HeaderText="SIG">
<ItemTemplate>
<asp:Label runat="server" ID="LblEnSistema" Text='<%# Eval("Sistema")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField HeaderText="SAT" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:LinkButton runat="server" ID="LnkCFDIData" Text='<%# Eval("CFDIData")%>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField HeaderText="Serie Folio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataTextField="VSerieFolio" ControlStyle-CssClass='Texto' Target='_blank'></asp:HyperLinkField>
<%-- <asp:TemplateField HeaderText="Serie Folio" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblVSerieFolio" Text='<%# Eval("VSerieFolio")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblVTotal" Text='<%# Eval("VTotal","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblVSubTotal" Text='<%# Eval("VSubTotal","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblVIVA" Text='<%# Eval("VIVA","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblVIEPS" Text='<%# Eval("VIEPS","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblVRetIVA" Text='<%# Eval("VRetIVA","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ret. ISR" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblVRetISR" Text='<%# Eval("VRetISR","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Moneda" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label runat="server" ID="LblAbreviatura" Text='<%# Eval("Abreviatura")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblCBTTotal" Text='<%# Eval("CBTTotal","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblCBTSubTotal" Text='<%# Eval("CBTSubTotal","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblImpIVA" Text='<%# Eval("ImpIVA","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblImpIEPS" Text='<%# Eval("ImpIEPS","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ret. ISR" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblImpRetISR" Text='<%# Eval("ImpRetISR","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" ID="LblImpRetIVA" Text='<%# Eval("ImpRetIVA","{0:N2}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Moneda" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label runat="server" ID="LblCBTMoneda" Text='<%# Eval("CBTMoneda")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,222 @@
Imports Extensiones
Partial Class SAT_SolicitudesRecibidasSAT
Inherits ClsPaginas
Public Property clasegrid As String
Get
If ViewState("clasegrid") Is Nothing Then
Return ""
Else
Return ViewState("clasegrid").ToString()
End If
End Get
Set(ByVal value As String)
ViewState("clasegrid") = value
End Set
End Property
Public Property fechaInicio As String
Get
If ViewState("fechaInicio") Is Nothing Then
Return ""
Else
Return ViewState("fechaInicio").ToString()
End If
End Get
Set(ByVal value As String)
ViewState("fechaInicio") = value
End Set
End Property
Public Property fechaFin As String
Get
If ViewState("fechaFin") Is Nothing Then
Return ""
Else
Return ViewState("fechaFin").ToString()
End If
End Get
Set(ByVal value As String)
ViewState("fechaFin") = value
End Set
End Property
Public Property TipoDescarga As Integer
Get
If ViewState("TipoDescarga") Is Nothing Then
Return 0
Else
Return ViewState("TipoDescarga").ToString().ToEntero()
End If
End Get
Set(ByVal value As Integer)
ViewState("TipoDescarga") = CInt(value)
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
TxtRpdFechaInicio.Text = String.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1))
TxtRpdFechaFin.Text = String.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth())
End If
End Sub
Protected Sub LnkDownloadExcel_Click(sender As Object, e As EventArgs)
If TipoDescarga = 1 Then
GvResumen.ExportToExcel2($"Resumen{DateTime.Now.ToString("yyyyMMddhhmmss")}")
End If
If TipoDescarga = 2 Then
GvDatos.ExportToExcel2($"PorComprobante{DateTime.Now.ToString("yyyyMMddhhmmss")}")
End If
End Sub
Protected Sub GvResumen_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("Fecha") = "" Then
e.Row.Attributes.Add("class", "Totales")
End If
End If
End Sub
Protected Sub GvDatos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("UUID") = "Totales" Then
e.Row.Font.Bold = True
e.Row.Cells(1).Text = e.Row.DataKey("CountRegistrosSIG")
e.Row.Cells(2).Text = e.Row.DataKey("CountRegistrosSAT")
e.Row.Attributes.Add("class", "Totales")
End If
If e.Row.DataKey("UUID").ToUpper() <> "TOTALES" Then
Dim SBMsgToolTip As StringBuilder = New StringBuilder()
If e.Row.DataKey("DifImporte").ToDecimal() <> 0 OrElse (e.Row.DataKey("Abreviatura").ToUpper().Trim() <> e.Row.DataKey("CBTMoneda").ToUpper().Trim()) Then
e.Row.CssClass = "bg-yellow-casablanca bg-font-yellow-casablanca"
End If
e.Row.Attributes.Add("data-html", "true")
e.Row.Attributes.Add("data-toggle", "tooltip")
e.Row.Attributes.Add("data-placement", "top")
If e.Row.DataKey("Sistema").ToUpper() = "NO" OrElse e.Row.DataKey("CFDIData").ToUpper() = "NO" Then
If e.Row.DataKey("Sistema").ToUpper() = "NO" Then
SBMsgToolTip.AppendLine("Comprobante no se encuentra en SIG.<br>")
End If
If e.Row.DataKey("CFDIData").ToUpper() = "NO" Then
SBMsgToolTip.AppendLine("Comprobante no encontrado.<br>")
End If
Else
If e.Row.DataKey("DifImporte").ToDecimal() <> 0 Then
SBMsgToolTip.AppendLine($" Diferencia importes {e.Row.DataKey("DifImporte").ToDecimal().ToString("###,###,###.00")}")
End If
If e.Row.DataKey("Abreviatura").ToUpper().Trim() <> e.Row.DataKey("CBTMoneda").ToUpper().Trim() Then
SBMsgToolTip.AppendLine($"Diferencia en monedas.")
End If
End If
If SBMsgToolTip.ToString().Length > 0 Then
e.Row.Attributes.Add("title", SBMsgToolTip.ToString())
End If
Dim LnkCFDIData As LinkButton = e.Row.FCLinkButton("LnkCFDIData")
If (e.Row.DataKey("CFDIData").ToUpper() = "SI") Then
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkCFDIData)
LnkCFDIData.CssClass = "Texto"
Else
LnkCFDIData.PostBackUrl = "#"
End If
End If
End If
If e.Row.RowType = DataControlRowType.Header Then
e.Row.Cells(1).BackColor = System.Drawing.Color.FromName("#3598dc")
e.Row.Cells(2).BackColor = System.Drawing.Color.FromName("#C46B06")
e.Row.Cells(3).BackColor = System.Drawing.Color.FromName("#3598dc")
e.Row.Cells(4).BackColor = System.Drawing.Color.FromName("#3598dc")
e.Row.Cells(5).BackColor = System.Drawing.Color.FromName("#3598dc")
e.Row.Cells(6).BackColor = System.Drawing.Color.FromName("#3598dc")
e.Row.Cells(7).BackColor = System.Drawing.Color.FromName("#3598dc")
e.Row.Cells(8).BackColor = System.Drawing.Color.FromName("#3598dc")
e.Row.Cells(9).BackColor = System.Drawing.Color.FromName("#3598dc")
e.Row.Cells(10).BackColor = System.Drawing.Color.FromName("#3598dc")
e.Row.Cells(11).BackColor = System.Drawing.Color.FromName("#C46B06")
e.Row.Cells(12).BackColor = System.Drawing.Color.FromName("#C46B06")
e.Row.Cells(13).BackColor = System.Drawing.Color.FromName("#C46B06")
e.Row.Cells(14).BackColor = System.Drawing.Color.FromName("#C46B06")
e.Row.Cells(15).BackColor = System.Drawing.Color.FromName("#C46B06")
e.Row.Cells(16).BackColor = System.Drawing.Color.FromName("#C46B06")
e.Row.Cells(17).BackColor = System.Drawing.Color.FromName("#C46B06")
e.Row.Cells(1).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(2).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(3).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(4).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(5).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(6).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(7).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(8).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(9).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(10).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(11).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(12).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(13).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(14).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(15).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(16).ForeColor = System.Drawing.Color.FromName("white")
e.Row.Cells(17).ForeColor = System.Drawing.Color.FromName("white")
End If
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
DvDatos1.Visible = False
DvDatos2.Visible = False
DVResumen1.Visible = False
DVResumen2.Visible = False
TipoDescarga = 0
LnkDownloadExcel.Visible = False
If (DdlReporte.SelectedValue.ToEntero() = 1 OrElse DdlReporte.SelectedValue.ToEntero() = 3) Then
DVResumen1.Visible = True
DVResumen2.Visible = True
DvDatos1.Visible = False
DvDatos2.Visible = False
Else
DVResumen1.Visible = False
DVResumen2.Visible = False
DvDatos1.Visible = True
DvDatos2.Visible = True
End If
Using ObjCompras As New ClsCompras
If ObjCompras.GetRepSATSolicitudesRecibidas(UsuarioActual.CveEmpresa, TxtRpdFechaInicio.Text.ToDate(), TxtRpdFechaFin.Text.ToDate(), DdlReporte.SelectedValue.ToEntero(), -1) Then
If DdlReporte.SelectedValue.ToEntero() = 1 OrElse DdlReporte.SelectedValue.ToEntero() = 3 Then
GvResumen.DataSource = ObjCompras.DtResultados
TipoDescarga = If(ObjCompras.DtResultados.Rows.Count > 0, 1, 0)
LnkDownloadExcel.Visible = True
ElseIf DdlReporte.SelectedValue.ToEntero() = 2 Then
GvDatos.DataSource = ObjCompras.DtResultados
TipoDescarga = If(ObjCompras.DtResultados.Rows.Count > 0, 2, 0)
LnkDownloadExcel.Visible = True
End If
End If
End Using
GvResumen.DataBind()
GvDatos.DataBind()
UpDatos.Update()
UpAcciones.Update()
End Sub
End Class