This commit is contained in:
2023-06-29 10:25:47 -07:00
8 changed files with 326 additions and 142 deletions

View File

@@ -3,6 +3,7 @@ Option Strict On
Imports System.Data
Imports System.Data.SqlClient
Imports Extensiones
Imports Microsoft.Web.XmlTransform
Public Class ClsInventarios
Implements IDisposable
@@ -148,7 +149,7 @@ Public Class ClsInventarios
Public ReadOnly Property DataSetResultados() As DataSet
Get
DataSetResultados = DataSet
DataSetResultados = Dataset
End Get
End Property
@@ -5630,7 +5631,8 @@ Public Class ClsInventarios
Public Function AddCamiones(Placa As String, Especificacion As String, CveEmpresa As Integer, CveConfigAutoTransporte As Integer, Anio As Integer, CveTipoPermisoSCT As Integer, NumPermisoSCT As String, NombreAseguradora As String,
NumPolizaSeguro As String, CveUsuario As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguroCarga As String,
Optional CveTipoCamion As Integer = 1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1) As Boolean
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1,
Optional Marca As String = "", Optional Color As String = "") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_CamionesAdd")
@@ -5658,6 +5660,8 @@ Public Class ClsInventarios
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@Marca", SqlDbType.VarChar).Value = Marca
.Add("@Color", SqlDbType.VarChar).Value = Color
End With
Try
SqlAdapter.Fill(Data)
@@ -5691,7 +5695,8 @@ Public Class ClsInventarios
Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String, CveConfigAutoTransporte As Integer, Anio As Integer, CveTipoPermisoSCT As Integer, NumPermisoSCT As String, NombreAseguradora As String,
NumPolizaSeguro As String, CveUsuario As Integer, CveEmpresa As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String,
NumPolizaSeguroCarga As String, Optional CveTipoCamion As Integer = -1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1) As Boolean
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1,
Optional Marca As String = "", Optional Color As String = "") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_CamionesUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -5719,6 +5724,8 @@ Public Class ClsInventarios
.Add("@NumeroTrailer", SqlDbType.VarChar).Value = NumeroTrailer
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@Marca", SqlDbType.VarChar).Value = Marca
.Add("@Color", SqlDbType.VarChar).Value = Color
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -210,14 +210,55 @@
<asp:HyperLinkField HeaderText="Proveedor" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataTextField="RazonSocial" ControlStyle-CssClass="truncate2" />
<asp:BoundField HeaderText="F.Compra" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Right" />
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" HeaderText="Folio" />
<asp:BoundField HeaderText="SubTotal 16%" DataField="valorActos1516" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal 8%" DataField="valorActosImp8" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal 0%" DataField="valorActosImp0" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<%-- <asp:BoundField HeaderText="SubTotal 16%" DataField="valorActos1516" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label data-toggle="tooltip" data-placement="top" ToolTip="SubTotal al 16%." runat="server">SubTotal <br/>16%</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("valorActos1516", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:BoundField HeaderText="SubTotal 8%" DataField="valorActosImp8" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label data-toggle="tooltip" data-placement="top" ToolTip="SubTotal al 8%." runat="server">SubTotal <br/>8%</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("valorActosImp8", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:BoundField HeaderText="SubTotal 0%" DataField="valorActosImp0" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label data-toggle="tooltip" data-placement="top" ToolTip="SubTotal al 8%." runat="server">SubTotal <br/>0%</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("valorActosImp0", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="%IVA" DataField="PorcentajeIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<%--<asp:BoundField HeaderText="IVA ND" DataField="IVANoDeducible" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:BoundField HeaderText="IVA ND 8%" DataField="ValorIvaNoDeducible08" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA ND 16%" DataField="ValorIvaNoDeducible16" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--<asp:BoundField HeaderText="IVA ND <br/>8%" DataField="ValorIvaNoDeducible08" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label data-toggle="tooltip" data-placement="top" ToolTip="IVA No deducible al 16%." runat="server">IVA ND <br/>16%</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("ValorIvaNoDeducible16", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label data-toggle="tooltip" data-placement="top" ToolTip="IVA No deducible al 8%." runat="server">IVA ND <br/>8%</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("ValorIvaNoDeducible08", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:BoundField HeaderText="IVA ND 16%" DataField="ValorIvaNoDeducible16" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:BoundField HeaderText="IVA <br/>Importación " HtmlEncode="False" DataField="IVAImportacion" Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField ItemStyle-HorizontalAlign="Right">

View File

@@ -32,7 +32,7 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveProveedor,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer,Estatus"
DataKeyNames="CveCamion,Placa,Especificacion,CveConfigAutoTransporte,Anio,CveTipoCamion,CveProveedor,CveTipoPermisoSCT,NumPermisoSCT,NombreAseguradora,NumPolizaSeguro,NombreAseguradoraMedioAmbiente,NumPolizaSeguroMedioAmbiente,NombreAseguradoraCarga,NumPolizaSeguroCarga,LongitudCaja,LineaTransportacion,SCAC,CAAT,CveTipoRemolque,NumeroTrailer,Marca,Color,Estatus"
EmptyDataText="No se Encontraron Unidades" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
<Columns>
<asp:BoundField HeaderText="Unidad" DataField="Especificacion" ItemStyle-HorizontalAlign="Left" />
@@ -42,6 +42,8 @@
<asp:BoundField HeaderText="Permiso SCT" DataField="NumPermisoSCT" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Aseguradora" DataField="NombreAseguradora" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Póliza Seguro" DataField="NumPolizaSeguro" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Marca" DataField="Marca" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Color" DataField="Color" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Estatus" DataField="EstatuStr" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="5%" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
@@ -249,6 +251,23 @@
</div>
<div class="row" runat="server" id="DivMarcaColor" visible="false">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtMarca" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<label for="<%= TxtMarca.ClientID.ToString()%>">Marca:</label>
<i></i>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtColor" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
<label for="<%= TxtColor.ClientID.ToString()%>">Color:</label>
<i></i>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">

View File

@@ -1,4 +1,6 @@
Imports Extensiones
Imports Stimulsoft.Report.StiOptions.Export
Partial Class Inventarios_CatUnidades
Inherits ClsPaginas
@@ -109,6 +111,8 @@ Partial Class Inventarios_CatUnidades
TxtNumeroTrailer.Text = ""
TxtSCAC.Text = ""
TxtCAAT.Text = ""
TxtMarca.Text = ""
TxtColor.Text = ""
ChkEstatus.Checked = False
RdTipoUnidad.SelectedValue = "1"
@@ -153,6 +157,8 @@ Partial Class Inventarios_CatUnidades
TxtLineaTransportacion.Text = GvRow.DataKey("LineaTransportacion")
TxtSCAC.Text = GvRow.DataKey("SCAC")
TxtCAAT.Text = GvRow.DataKey("CAAT")
TxtMarca.Text = GvRow.DataKey("Marca")
TxtColor.Text = GvRow.DataKey("Color")
ChkEstatus.Checked = If(Boolean.Parse(GvRow.DataKey("Estatus")), True, False)
'ChkesRemolque.Checked = (GvRow.DataKey("CveTipoCamion") = "2")
@@ -207,14 +213,14 @@ Partial Class Inventarios_CatUnidades
If CveCamion <= 0 Then
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario,
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue) Then
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue, Color:=TxtColor.Text, Marca:=TxtMarca.Text) Then
Alert("Unidad agregada correctamente")
Else
ErrorPrceso = True
End If
Else
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue) Then
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue, Color:=TxtColor.Text, Marca:=TxtMarca.Text) Then
Alert("Unidad actualizada correctamente")
Else
ErrorPrceso = True
@@ -256,7 +262,7 @@ Partial Class Inventarios_CatUnidades
DVTiposRemolque.Visible = False
'DVLongitudCaja.Visible = False
DivMarcaColor.Visible = True
DVTiposRemolque.Visible = False
Else
@@ -270,6 +276,7 @@ Partial Class Inventarios_CatUnidades
'DVLineaTransportacion.Visible = False
'DVSCACCAAT.Visible = False
DivMarcaColor.Visible = False
DVTiposRemolque.Visible = True
'DVLongitudCaja.Visible = True

View File

@@ -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>

View File

@@ -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")}");
}
@@ -112,12 +113,12 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
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)
@@ -141,7 +142,7 @@ 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)
@@ -151,9 +152,9 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
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();
}
}
@@ -184,10 +185,10 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
using (ClsNominas nom = new ClsNominas())
{
int CveTipoSolicitud = ChkMetaDatos.Checked ? 203 :3;
int CveTipoSolicitud = ChkMetaDatos.Checked ? 203 : 3;
CveSolicitudAgregada = nom.SolicitudesAdd2(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, CveTipoSolicitud: CveTipoSolicitud);
if(CveSolicitudAgregada > 0)
if (CveSolicitudAgregada > 0)
{
Folio = nom.FolioSolicitud;
}
@@ -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>");
}
@@ -264,7 +266,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
StringBuilder sbResultado = new StringBuilder();
foreach(GridViewRow GvRow in GVSolicitudesPendientes.Rows)
foreach (GridViewRow GvRow in GVSolicitudesPendientes.Rows)
{
int CveSolicitudActual = GvRow.DataKey("CveSolicitud").ToEntero();
@@ -332,7 +334,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
else
{
if(resultSolicitud.Count == 4)
if (resultSolicitud.Count == 4)
{
sbResultado.Append($"({resultSolicitud[1]})<br> Folio:{Folio} <br> ");
}
@@ -373,7 +375,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
cargasolicitudes();
}
catch(Exception ex)
catch (Exception ex)
{
Alert(ex.StackTrace);
}
@@ -394,21 +396,67 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
protected void GvResumen_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType == DataControlRowType.DataRow)
if (e.Row.RowType == DataControlRowType.DataRow)
{
if(e.Row.DataKey("Fecha") == "")
{
// e.Row.Cells[0].Text = "Total";
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.RowType == DataControlRowType.DataRow)
{
@@ -420,7 +468,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
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,7 +494,8 @@ 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")}");
@@ -464,7 +513,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
}
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";
@@ -569,7 +618,8 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
{
var UrlDescarga = $"{UsuarioActual.Empresa.Ruta}NomXMLSAT\\Descargas\\{e.Row.DataKey("ArchivoXML")}";
if (System.IO.File.Exists(UrlDescarga)){
if (System.IO.File.Exists(UrlDescarga))
{
LinkButton LnkDescargaXML = e.Row.FCLinkButton("LnkDescargaXML");
ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaXML);
LnkDescargaXML.Visible = true;
@@ -603,7 +653,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
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,7 +704,7 @@ 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", "");
@@ -662,10 +712,12 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
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);
}

View File

@@ -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>

View File

@@ -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)