Cambios en comparativo de compras y ventas
This commit is contained in:
@@ -319,7 +319,7 @@
|
||||
</div>
|
||||
<div class="row" runat="server" id="DVResumen2" visible="false">
|
||||
|
||||
<div class="col-md-7">
|
||||
<div class="col-md-12">
|
||||
<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">
|
||||
@@ -329,12 +329,52 @@
|
||||
<asp:Label ID="LblMes" runat="server" Text='<%# Eval("Mes")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("VIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("VIEPS", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("VRetIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret ISR" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("VRetISR", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TOTAL 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">
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CBTIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CBTIEPS", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CBTRetIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret ISR" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CBTRetISR", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TOTAL SAT" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCBTTotal" runat="server" Text='<%# Eval("CBTTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -368,11 +408,7 @@
|
||||
DataKeyNames="UUID,CountRegistros,VTotal,CBTTotal,CountRegistrosSIG,CountRegistrosSAT,DifImporte,Abreviatura,CBTMoneda,CFDIData,CveSolicitudDetalle,CveVenta,VSerieFolio,Sistema">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblUUID" Text='<%# Eval("UUID")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="NombreCliente" ItemStyle-Width="150px" ></asp:BoundField>
|
||||
|
||||
|
||||
<asp:HyperLinkField HeaderText="Sistema" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Sistema" ControlStyle-CssClass='Texto' Target='_blank'></asp:HyperLinkField>
|
||||
@@ -495,6 +531,17 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblUUID" Text='<%# Eval("UUID")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="RFC">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblRFC" Text='<%# Eval("RFC")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
@@ -75,7 +75,8 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
|
||||
protected void LnkDownloadExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(TipoDescarga == 1) {
|
||||
if (TipoDescarga == 1)
|
||||
{
|
||||
GvResumen.ExportToExcel2($"Resumen{DateTime.Now.ToString("yyyyMMddhhmmss")}");
|
||||
}
|
||||
|
||||
@@ -100,7 +101,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
DVResumen1.Visible = true;
|
||||
DVResumen2.Visible = true;
|
||||
DvDatos1.Visible = false;
|
||||
DvDatos2.Visible = false;
|
||||
DvDatos2.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -108,25 +109,25 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
DVResumen2.Visible = false;
|
||||
DvDatos1.Visible = true;
|
||||
DvDatos2.Visible = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
using (ClsNominas ObjNom = new ClsNominas())
|
||||
{
|
||||
if (ObjNom.SATSolicitudTimbreIngresosRep(UsuarioActual.CveEmpresa, TxtRpdFechaInicio.Text.ToDate(), TxtRpdFechaFin.Text.ToDate(), DdlReporte.SelectedValue.ToEntero(),DdlVista.SelectedValue.ToEntero()))
|
||||
if (ObjNom.SATSolicitudTimbreIngresosRep(UsuarioActual.CveEmpresa, TxtRpdFechaInicio.Text.ToDate(), TxtRpdFechaFin.Text.ToDate(), DdlReporte.SelectedValue.ToEntero(), DdlVista.SelectedValue.ToEntero()))
|
||||
{
|
||||
if (DdlReporte.SelectedValue.ToEntero() == 1 || DdlReporte.SelectedValue.ToEntero() == 3)
|
||||
{
|
||||
GvResumen.DataSource = ObjNom.DtResultados;
|
||||
TipoDescarga = ObjNom.DtResultados.Rows.Count > 0 ? 1:0;
|
||||
TipoDescarga = ObjNom.DtResultados.Rows.Count > 0 ? 1 : 0;
|
||||
LnkDownloadExcel.Visible = true;
|
||||
}
|
||||
else if (DdlReporte.SelectedValue.ToEntero() == 2)
|
||||
{
|
||||
else if (DdlReporte.SelectedValue.ToEntero() == 2)
|
||||
{
|
||||
GvDatos.DataSource = ObjNom.DtResultados;
|
||||
TipoDescarga = ObjNom.DtResultados.Rows.Count > 0 ? 2 : 0;
|
||||
LnkDownloadExcel.Visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GvResumen.DataBind();
|
||||
@@ -141,19 +142,19 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
|
||||
if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud: 3, Estatus: 0,Top:50))
|
||||
if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud: 3, Estatus: 0, Top: 50))
|
||||
{
|
||||
GVSolicitudesPendientes.DataSource = nom.DtResultados;
|
||||
if (nom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
LnkverificarSolicitudes.Visible = true;
|
||||
}
|
||||
GVSolicitudesPendientes.DataBind();
|
||||
GVSolicitudesPendientes.DataBind();
|
||||
}
|
||||
|
||||
if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud: 3, Estatus:1,Top:50))
|
||||
if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, CveTipoSolicitud: 3, Estatus: 1, Top: 50))
|
||||
{
|
||||
GVSolicitudesNominas.DataSource = nom.DtResultados;
|
||||
GVSolicitudesNominas.DataSource = nom.DtResultados.FiltraParametros("EfectoComprobante = 'I'");
|
||||
GVSolicitudesNominas.DataBind();
|
||||
}
|
||||
}
|
||||
@@ -162,8 +163,8 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
protected void LnkShowSolicitudes_Click(object sender, EventArgs e)
|
||||
{
|
||||
TabPanel.ActiveTabIndex = 0;
|
||||
cargasolicitudes();
|
||||
|
||||
cargasolicitudes();
|
||||
|
||||
RegistraScript("$('#ModalViewSolicitudes').modal();");
|
||||
}
|
||||
|
||||
@@ -184,10 +185,10 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
int CveTipoSolicitud = ChkMetaDatos.Checked ? 203 :3;
|
||||
CveSolicitudAgregada = nom.SolicitudesAdd2(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, CveTipoSolicitud: CveTipoSolicitud);
|
||||
|
||||
if(CveSolicitudAgregada > 0)
|
||||
int CveTipoSolicitud = ChkMetaDatos.Checked ? 203 : 3;
|
||||
CveSolicitudAgregada = nom.SolicitudesAdd2(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, CveTipoSolicitud: CveTipoSolicitud);
|
||||
|
||||
if (CveSolicitudAgregada > 0)
|
||||
{
|
||||
Folio = nom.FolioSolicitud;
|
||||
}
|
||||
@@ -198,8 +199,8 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
var api = new GeneralesAPII();
|
||||
JToken ObjApiSolicitud = (JToken)api.GeneraSolicitud(UsuarioActual.CveEmpresa, 3, CveSolicitudAgregada);
|
||||
List<string> resultSolicitud = new List<string>();
|
||||
List<string> resultVerificacion = new List<string>();
|
||||
|
||||
List<string> resultVerificacion = new List<string>();
|
||||
|
||||
var TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion;
|
||||
var ResultadoSolicitudOK = false;
|
||||
|
||||
@@ -218,10 +219,11 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
{
|
||||
sbResultado.Append($"Solicitud registrada. {resultSolicitud[1]}<br> Folio: {Folio}");
|
||||
}
|
||||
else{
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
if(ObjApiSolicitud != null && resultSolicitud.Count == 4)
|
||||
if (ObjApiSolicitud != null && resultSolicitud.Count == 4)
|
||||
{
|
||||
sbResultado.Append($"Solicitud registrada, pendiente de verificar en SAT <br> Folio: {Folio} <br>({resultSolicitud[1]})<br>");
|
||||
}
|
||||
@@ -249,22 +251,22 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
txtFechaFAdd.Text = "";
|
||||
ChkMetaDatos.Checked = false;
|
||||
RegistraScript("$('#ModalAgregarSolicitud').modal('hide');");
|
||||
cargasolicitudes();
|
||||
|
||||
cargasolicitudes();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkverificarSolicitudes_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
StringBuilder sbResultado = new StringBuilder();
|
||||
|
||||
|
||||
foreach(GridViewRow GvRow in GVSolicitudesPendientes.Rows)
|
||||
foreach (GridViewRow GvRow in GVSolicitudesPendientes.Rows)
|
||||
{
|
||||
|
||||
int CveSolicitudActual = GvRow.DataKey("CveSolicitud").ToEntero();
|
||||
@@ -278,12 +280,12 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
var ResultadoVerificaionOK = false;
|
||||
var SeVerifico = false;
|
||||
var TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion;
|
||||
var ResultadoSolicitudOK = false;
|
||||
|
||||
|
||||
var api = new GeneralesAPII();
|
||||
|
||||
|
||||
var ResultadoSolicitudOK = false;
|
||||
|
||||
|
||||
var api = new GeneralesAPII();
|
||||
|
||||
|
||||
if (idSolicitud.Length == 0)
|
||||
{
|
||||
JToken ObjApiSolicitud = (JToken)api.GeneraSolicitud(UsuarioActual.CveEmpresa, CveTipoSolicitud, CveSolicitudActual);
|
||||
@@ -307,13 +309,13 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
resultSolicitud.Add("");
|
||||
|
||||
ResultadoSolicitudOK = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (ResultadoSolicitudOK)
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
JToken ObjApiVerificacion = (JToken)api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, CveTipoSolicitud, CveSolicitudActual);
|
||||
|
||||
|
||||
@@ -330,21 +332,21 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if(resultSolicitud.Count == 4)
|
||||
{
|
||||
|
||||
if (resultSolicitud.Count == 4)
|
||||
{
|
||||
sbResultado.Append($"({resultSolicitud[1]})<br> Folio:{Folio} <br> ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sbResultado.Append($"Solicitud pendiente de verificar en SAT <br> Folio:{Folio} <br>");
|
||||
}
|
||||
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
|
||||
if (SeVerifico && resultVerificacion.Count == 4)
|
||||
{
|
||||
if (ResultadoVerificaionOK)
|
||||
@@ -358,28 +360,28 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
sbResultado.Append($"Se presento un error al verificar la solicitud <br> Folio: {Folio}.");
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia;
|
||||
}
|
||||
|
||||
Alert(sbResultado.ToString(), TipoMensaje);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cargasolicitudes();
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert(ex.StackTrace);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void LnkAgregarSolictud_Click(object sender, EventArgs e)
|
||||
@@ -394,33 +396,79 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
|
||||
protected void GvResumen_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if(e.Row.DataKey("Fecha") == "")
|
||||
{
|
||||
// e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Attributes.Add("class", "Totales");
|
||||
|
||||
}
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.DataKey("Fecha") == "")
|
||||
e.Row.Attributes.Add("class", "Totales");
|
||||
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713) != "1")
|
||||
{
|
||||
e.Row.Cells[2].Visible = false;
|
||||
}
|
||||
|
||||
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713) != "1")
|
||||
{
|
||||
e.Row.Cells[7].Visible = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (e.Row.RowType == DataControlRowType.Header)
|
||||
{
|
||||
e.Row.Cells[1].BackColor = System.Drawing.Color.FromName("#3598dc");
|
||||
e.Row.Cells[2].BackColor = System.Drawing.Color.FromName("#3598dc");
|
||||
e.Row.Cells[3].BackColor = System.Drawing.Color.FromName("#3598dc");
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713) != "1")
|
||||
{
|
||||
e.Row.Cells[2].Visible = false;
|
||||
}
|
||||
|
||||
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("#C46B06");
|
||||
e.Row.Cells[7].BackColor = System.Drawing.Color.FromName("#C46B06");
|
||||
e.Row.Cells[8].BackColor = System.Drawing.Color.FromName("#C46B06");
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713) != "1")
|
||||
{
|
||||
e.Row.Cells[7].Visible = false;
|
||||
}
|
||||
|
||||
e.Row.Cells[9].BackColor = System.Drawing.Color.FromName("#C46B06");
|
||||
e.Row.Cells[10].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");
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
|
||||
|
||||
if (e.Row.DataKey("UUID") == "Totales")
|
||||
{
|
||||
e.Row.Font.Bold = true;
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
|
||||
|
||||
if (e.Row.DataKey("UUID") == "Totales")
|
||||
{
|
||||
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.Cells[2].Text = e.Row.DataKey("CountRegistrosSAT");
|
||||
e.Row.Attributes.Add("class", "Totales");
|
||||
}
|
||||
|
||||
if(e.Row.DataKey("UUID").ToUpper() != "TOTALES")
|
||||
if (e.Row.DataKey("UUID").ToUpper() != "TOTALES")
|
||||
{
|
||||
StringBuilder SBMsgToolTip = new StringBuilder();
|
||||
|
||||
@@ -446,26 +494,27 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
SBMsgToolTip.AppendLine("Comprobante no se encuentra en descargas de SAT.<br>");
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
if (e.Row.DataKey("DifImporte").ToDecimal() != 0)
|
||||
{
|
||||
SBMsgToolTip.AppendLine($" Diferencia importes {e.Row.DataKey("DifImporte").ToDecimal().ToString("###,###,###.00")}");
|
||||
SBMsgToolTip.AppendLine($" Diferencia importes {e.Row.DataKey("DifImporte").ToDecimal().ToString("###,###,###.00")}");
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("Abreviatura").ToUpper() != e.Row.DataKey("CBTMoneda").ToUpper())
|
||||
{
|
||||
{
|
||||
SBMsgToolTip.AppendLine($"Diferencia en monedas.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (SBMsgToolTip.ToString().Length > 0)
|
||||
{
|
||||
e.Row.Attributes.Add("title", SBMsgToolTip.ToString());
|
||||
}
|
||||
|
||||
LinkButton LnkCFDIData = e.Row.FCLinkButton("LnkCFDIData");
|
||||
if((e.Row.DataKey("CFDIData").ToUpper() == "SI"))
|
||||
{
|
||||
if ((e.Row.DataKey("CFDIData").ToUpper() == "SI"))
|
||||
{
|
||||
ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkCFDIData);
|
||||
LnkCFDIData.CssClass = "Texto";
|
||||
}
|
||||
@@ -483,8 +532,8 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
}
|
||||
|
||||
if (e.Row.RowType == DataControlRowType.Header)
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
e.Row.Cells[1].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[2].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
|
||||
@@ -513,9 +562,9 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
e.Row.Cells[14].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
e.Row.Cells[15].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
e.Row.Cells[16].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
e.Row.Cells[17].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
|
||||
|
||||
e.Row.Cells[17].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
|
||||
|
||||
e.Row.Cells[1].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[2].ForeColor = System.Drawing.Color.FromName("white");
|
||||
|
||||
@@ -531,7 +580,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
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[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");
|
||||
|
||||
@@ -541,9 +590,9 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
|
||||
protected void LnkDescargaXML_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
|
||||
var UrlDescarga = $"{UsuarioActual.Empresa.Ruta}NomXMLSAT\\Descargas\\{GvRow.DataKey("ArchivoXML")}";
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
|
||||
var UrlDescarga = $"{UsuarioActual.Empresa.Ruta}NomXMLSAT\\Descargas\\{GvRow.DataKey("ArchivoXML")}";
|
||||
|
||||
var Archivo = new System.IO.FileInfo(UrlDescarga);
|
||||
|
||||
@@ -556,8 +605,8 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
Response.Flush();
|
||||
Response.TransmitFile(Archivo.FullName);
|
||||
Response.End();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void GVSolicitudesNominas_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
@@ -567,9 +616,10 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
{
|
||||
if (e.Row.DataKey("ArchivoXML").Length > 0)
|
||||
{
|
||||
var UrlDescarga = $"{UsuarioActual.Empresa.Ruta}NomXMLSAT\\Descargas\\{e.Row.DataKey("ArchivoXML")}";
|
||||
|
||||
if (System.IO.File.Exists(UrlDescarga)){
|
||||
var UrlDescarga = $"{UsuarioActual.Empresa.Ruta}NomXMLSAT\\Descargas\\{e.Row.DataKey("ArchivoXML")}";
|
||||
|
||||
if (System.IO.File.Exists(UrlDescarga))
|
||||
{
|
||||
LinkButton LnkDescargaXML = e.Row.FCLinkButton("LnkDescargaXML");
|
||||
ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaXML);
|
||||
LnkDescargaXML.Visible = true;
|
||||
@@ -601,9 +651,9 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
IEnumerable<System.IO.FileInfo> files = DirInfo.EnumerateFiles();
|
||||
|
||||
foreach (var f in files)
|
||||
{
|
||||
|
||||
if(f.Extension.ToUpper() == ".XML")
|
||||
{
|
||||
|
||||
if (f.Extension.ToUpper() == ".XML")
|
||||
{
|
||||
string UUID = "";
|
||||
System.Xml.XmlDocument XMLDoc = new System.Xml.XmlDocument();
|
||||
@@ -654,18 +704,20 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
node = XMLDoc.SelectSingleNode(string.Format("//{0}:Emisor", Prefijo), namespaces);
|
||||
|
||||
System.Xml.XmlNode nodeComp = XMLDoc.SelectSingleNode(string.Format("//{0}:Complemento", Prefijo), namespaces);
|
||||
if (node != null )
|
||||
if (node != null)
|
||||
{
|
||||
System.Xml.XmlNode nodeTFD = nodeComp.SelectSingleNode(string.Format("//{0}:TimbreFiscalDigital", "tfd"), namespaces);
|
||||
UUID = ValorXML(nodeTFD, "UUID", "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (UUID.Length > 0)
|
||||
{
|
||||
try {
|
||||
try
|
||||
{
|
||||
System.IO.File.Move(f.FullName, $@"{f.DirectoryName}\{UUID.ToUpper()}.XML");
|
||||
Contador++;
|
||||
} catch (Exception ex3)
|
||||
}
|
||||
catch (Exception ex3)
|
||||
{
|
||||
ModExtensiones.GuardaLog(ex3.StackTrace);
|
||||
}
|
||||
@@ -698,14 +750,14 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
var CveSolicitudDetalle = GvRow.DataKey("CveSolicitudDetalle").ToEntero();
|
||||
var UrlDirectorio = $"{UsuarioActual.Empresa.Ruta}DescargasSATXML\\Ingresos\\{CveSolicitudDetalle}";
|
||||
CargaComprobanteXML(UrlDirectorio, CveSolicitudDetalle);
|
||||
|
||||
CargaComprobanteXML(UrlDirectorio, CveSolicitudDetalle);
|
||||
|
||||
}
|
||||
|
||||
protected void LnkCFDIData_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
|
||||
var CveSolicitudDetalle = GvRow.DataKey("CveSolicitudDetalle");
|
||||
|
||||
var UrlDescargaXML = $"{UsuarioActual.Empresa.Ruta}DescargasSATXML\\Ingresos\\{CveSolicitudDetalle}\\{GvRow.DataKey("UUID")}.XML";
|
||||
|
||||
@@ -499,6 +499,12 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="RFC">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblRFC" Text='<%# Eval("RFC")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -212,6 +212,9 @@ Partial Class SAT_SolicitudesRecibidasSAT
|
||||
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(18).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(19).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")
|
||||
@@ -229,6 +232,8 @@ Partial Class SAT_SolicitudesRecibidasSAT
|
||||
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")
|
||||
e.Row.Cells(18).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(19).ForeColor = System.Drawing.Color.FromName("white")
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Reference in New Issue
Block a user