This commit is contained in:
rrene
2020-07-11 12:41:57 -07:00
8 changed files with 153 additions and 6 deletions

View File

@@ -225,6 +225,37 @@ Public Class ClsGenerales
End Try End Try
Return retorno Return retorno
End Function End Function
Public Function SAT_DescargaSolicitudesAddNotificaciones(CveEmpresa As Int32, CveSolicitudSat As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("[PA_Gral_SAT_DescargaSolicitudesAddNotificaciones]", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSolicitudSat", SqlDbType.Int).Value = CveSolicitudSat
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function SAT_DescargaSolicitudesAddNotificacionesCOUNT(CveEmpresa As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("[PA_Gral_SAT_DescargaSolicitudesAddNotificacionesCOUNT]", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
#Region " I N D I C A D O R E S Y G R A F I C A S" #Region " I N D I C A D O R E S Y G R A F I C A S"
Public Function GetIndicadores(CveEmpresa As Integer) As DataSet Public Function GetIndicadores(CveEmpresa As Integer) As DataSet
'Dim Retorno As Boolean = False 'Dim Retorno As Boolean = False

View File

@@ -463,10 +463,10 @@ Namespace Extensiones
''' <param name="ico">Icono clase example fa fa-bell-o</param> ''' <param name="ico">Icono clase example fa fa-bell-o</param>
''' <param name="tipo">'danger','success','warning','info'</param> ''' <param name="tipo">'danger','success','warning','info'</param>
''' <remarks></remarks> ''' <remarks></remarks>
Public Function ItemNotificaciones(Mensaje As String, Optional Fecha As String = "", Optional Ico As String = "fa fa-bell-o", Optional Tipo As String = "info", Optional Link As String = "javascript:;") As String Public Function ItemNotificaciones(Mensaje As String, Optional Fecha As String = "", Optional Ico As String = "fa fa-bell-o", Optional Tipo As String = "info", Optional Link As String = "javascript:;", Optional tonewpage As Boolean = True) As String
Dim Time As String = "" Dim Time As String = ""
If Fecha <> "" Then Time = String.Format("<span class=""time"">{0}</span>", Fecha) If Fecha <> "" Then Time = String.Format("<span class=""time"">{0}</span>", Fecha)
Return String.Format("<li><a href=""{4}"" target=""_blank"">{0}<span class=""details""><span class=""label label-sm label-icon label-{1}""><i class=""{2}""></i></span>{3}</span></a></li>", Time, Tipo, Ico, Mensaje, Link) Return String.Format("<li><a href=""{4}"" {5}>{0}<span class=""details""><span class=""label label-sm label-icon label-{1}""><i class=""{2}""></i></span>{3}</span></a></li>", Time, Tipo, Ico, Mensaje, Link, If(tonewpage, "target=""_blank""", ""))
End Function End Function
'<Runtime.CompilerServices.Extension()> '<Runtime.CompilerServices.Extension()>
'Public Function addindicador(Obj As Object, color As String, icono As String, titulo As String, comentario As String, link As String) As String 'Public Function addindicador(Obj As Object, color As String, icono As String, titulo As String, comentario As String, link As String) As String

View File

@@ -1323,7 +1323,7 @@ Partial Class Sistemas_UsuarioDetalle
'RECARGA GLOBAL ALMACEN 'RECARGA GLOBAL ALMACEN
If ObjUsuarios.GetAlmacen(-1) Then Application("GlobalDTAlmacenUsuarios") = ObjUsuarios.DtResultados Else Application("GlobalDTAlmacenUsuarios") = Nothing If ObjUsuarios.GetAlmacen(-1, UsuarioActual.CveEmpresa) Then Application("GlobalDTAlmacenUsuarios") = ObjUsuarios.DtResultados Else Application("GlobalDTAlmacenUsuarios") = Nothing
'RECARGA GLOBAL EMPRESAS USUARIOS 'RECARGA GLOBAL EMPRESAS USUARIOS
@@ -2068,7 +2068,7 @@ Partial Class Sistemas_UsuarioDetalle
Private Sub CargaDtAlmacen() Private Sub CargaDtAlmacen()
Dim ClsUsuarios As New ClsSisUsuarios Dim ClsUsuarios As New ClsSisUsuarios
If ClsUsuarios.GetAlmacen(CveUsuario) Then If ClsUsuarios.GetAlmacen(CveUsuario, UsuarioActual.CveEmpresa) Then
DtAlmacenes = ClsUsuarios.DtResultados.FiltraParametros(String.Format("CveUsuario = {0}", CveUsuario)) DtAlmacenes = ClsUsuarios.DtResultados.FiltraParametros(String.Format("CveUsuario = {0}", CveUsuario))
Else Else
DtAlmacenes = Nothing DtAlmacenes = Nothing

View File

@@ -666,6 +666,63 @@
<!-- END FOOTER --> <!-- END FOOTER -->
<!-- END JAVASCRIPTS --> <!-- END JAVASCRIPTS -->
<asp:panel runat="server" id="pnlNotificacionSAT" Visible="false" CssClass="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpNotificacionesFoliosSAT" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Folios descargados</h4>
</div>
<div class="modal-body" style="min-width:1000px;">
<asp:TextBox ID="TxtCveNotisat" CssClass="hidden" runat="server"></asp:TextBox><asp:Button ID="btnoknotisat" OnClick="btnoknotisat_Click" CssClass="hidden" runat="server" Text="Button" />
<asp:GridView ID="GVnotiFoliosSAT" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVFoliosSAT" AutoGenerateColumns="False"
DataKeyNames="UUID" data-sort="2">
<Columns>
<asp:TemplateField HeaderText="Folio Fiscal ">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("UUID")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Comprobante">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("TipoComprobante")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RFC">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("RFCDe")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Serie - Folio ">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("SerieFolio")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("FechaFactura","{0: dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("Total","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:panel>
<div id="pogresspostback" class="hidden" style="z-index: 10000;" runat="server"> <div id="pogresspostback" class="hidden" style="z-index: 10000;" runat="server">
<div style="width: 200px; position: absolute; margin: 0 0 0 -100px; top: 50%; left: 50%; background-color: transparent;"> <div style="width: 200px; position: absolute; margin: 0 0 0 -100px; top: 50%; left: 50%; background-color: transparent;">
<div class="loading-spinner" style="width: 300px;"> <div class="loading-spinner" style="width: 300px;">

View File

@@ -448,7 +448,21 @@ Partial Class Site
End If End If
OC.Dispose() OC.Dispose()
End If End If
If UsuarioActual.TienePermisoProceso(303) Then
Using objgen As New ClsGenerales
pnlNotificacionSAT.Visible = True
objgen.SAT_DescargaSolicitudesAddNotificacionesCOUNT(UsuarioActual.CveEmpresa)
If objgen.DtResultados.Rows.Count > 0 Then
For Each dtrow As DataRow In objgen.DtResultados.Rows
If dtrow("Contador").ToString().ToEntero() > 0 Then
Notificaciones.Append(ItemNotificaciones(String.Format("Se registro una solicitud de descarga del sat con {0} XML del SAT", dtrow("Contador")), Ico:="fa fa-tags", Tipo:="info", Link:=String.Format("javascript:$('#{0}').val({1});$('#{2}').click();", TxtCveNotisat.ClientID, dtrow("CveSolicitudSat").ToString().ToEntero(), btnoknotisat.ClientID), tonewpage:=False)) '
countNotificaciones = countNotificaciones + 1
End If
Next
End If
End Using
End If
''OC Pendientes por atender ''OC Pendientes por atender
'Dim OC As New ClsOC 'Dim OC As New ClsOC
@@ -527,6 +541,17 @@ Partial Class Site
#End Region #End Region
Protected Sub btnoknotisat_Click(sender As Object, e As EventArgs)
GVnotiFoliosSAT.DataSource = New DataTable()
Using objgen As New ClsGenerales
objgen.SAT_DescargaSolicitudesAddNotificaciones(UsuarioActual.CveEmpresa, TxtCveNotisat.Text.ToEntero())
GVnotiFoliosSAT.DataSource = objgen.DtResultados
End Using
GVnotiFoliosSAT.DataBind()
UpNotificacionesFoliosSAT.Update()
RegistraScript(String.Format("$('#{0}').modal();", pnlNotificacionSAT.ClientID))
End Sub
End Class End Class
Public Class TipoCambioActual Public Class TipoCambioActual
Public Fecha As Date Public Fecha As Date

View File

@@ -8,7 +8,7 @@
<!-- BEGIN HEAD --> <!-- BEGIN HEAD -->
<head runat="server" id="HeadAD"> <head runat="server" id="HeadAD">
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>SIG GPS</title> <title>SIGNAL GPS</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport" /> <meta content="width=device-width, initial-scale=1" name="viewport" />
<meta content="Preview page of Metronic Admin Theme #3 for " name="description" /> <meta content="Preview page of Metronic Admin Theme #3 for " name="description" />

View File

@@ -185,7 +185,7 @@
</button> </button>
<h4 class="modal-title" runat="server" style="text-align: left">Folios descargados</h4> <h4 class="modal-title" runat="server" style="text-align: left">Folios descargados</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body" style="min-width:1000px;">
<asp:GridView ID="GVFoliosSAT" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVFoliosSAT" AutoGenerateColumns="False" <asp:GridView ID="GVFoliosSAT" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVFoliosSAT" AutoGenerateColumns="False"
DataKeyNames="UUID" data-sort="2"> DataKeyNames="UUID" data-sort="2">
@@ -195,6 +195,31 @@
<asp:Label runat="server" Text='<%# Eval("UUID")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("UUID")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Comprobante">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("TipoComprobante")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RFC">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("RFCDe")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Serie - Folio ">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("SerieFolio")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("FechaFactura","{0: dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("Total","{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View File

@@ -20,6 +20,15 @@ public partial class Ventas_SolicitudesSAT : ClsPaginas
string rfSolInicio = Request["fSolInicio"] == null ? "" : Request["fSolInicio"].ToString().Trim(); string rfSolInicio = Request["fSolInicio"] == null ? "" : Request["fSolInicio"].ToString().Trim();
string rfSolFin = Request["fSolFin"] == null ? "" : Request["fSolFin"].ToString().Trim(); string rfSolFin = Request["fSolFin"] == null ? "" : Request["fSolFin"].ToString().Trim();
if (rfIngInicio == "")
{
rfIngInicio = string.Format("{0:01/MM/yyyy}",DateTime.Now);
}
if (rfIngFin == "")
{
rfIngFin = string.Format("{0:dd/MM/yyyy}",string.Format("{0:01/MM/yyyy}", DateTime.Now).ToDateTime().AddMonths(1).AddDays(-1));
}
DateTime dValor = DateTime.Now; DateTime dValor = DateTime.Now;
dValor = DateTime.Now; if (DateTime.TryParse(rfIngInicio, out dValor)) { rfIngInicio = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngInicio = ""; } dValor = DateTime.Now; if (DateTime.TryParse(rfIngInicio, out dValor)) { rfIngInicio = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngInicio = ""; }
dValor = DateTime.Now; if (DateTime.TryParse(rfIngFin, out dValor)) { rfIngFin = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngFin = ""; } dValor = DateTime.Now; if (DateTime.TryParse(rfIngFin, out dValor)) { rfIngFin = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngFin = ""; }