This commit is contained in:
@@ -11,6 +11,9 @@
|
||||
#C_Tab_Tlablero tr td:nth-child(n+2) {
|
||||
text-align: center
|
||||
}
|
||||
.spanfoliofiscal{
|
||||
white-space:nowrap;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -36,7 +39,7 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<asp:UpdatePanel runat="server" ID="upPaneldata" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
@@ -111,7 +114,14 @@
|
||||
</asp:Repeater>
|
||||
<th>XML Timbrados</th>
|
||||
<th>PDF Timbrados</th>
|
||||
<th style="width: 85px;"></th>
|
||||
<th style="width: 85px;">
|
||||
<asp:HyperLink ID="hypEnviarDocto" onclick="EnviarCorreo();" CssClass="btn btn-sm btn-primary" runat="server">Enviar</asp:HyperLink>
|
||||
|
||||
|
||||
<asp:TextBox ID="TxtClientescorreo" CssClass="hidden TxtClientescorreo" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="Btnenviardocto" UseSubmitBehavior="false" CssClass="hidden Btnenviardocto" OnClick="Btnenviardocto_Click" runat="server" Text="Button" />
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -149,7 +159,8 @@
|
||||
<%# string.Format("<a href=\"/Documentacion/TableroMaterialidadDetalle.ASPX?CveCliente={2}&anio={3}&mes={4}\" >{1}/{0}</a>",DataBinder.Eval(Container.DataItem, "Personal"),DataBinder.Eval(Container.DataItem, "PersonalPDF"),DataBinder.Eval(Container.DataItem, "CveCliente"),anio,mes) %>
|
||||
</td>
|
||||
<td>
|
||||
<%# string.Format("<a class=\"btn btn-primary\" onclick=\"enviarDocto({0})\">Enviar</a>",DataBinder.Eval(Container.DataItem, "CveCliente"),anio,mes) %>
|
||||
<asp:CheckBox Checked="true" CssClass="Chkenviardocto" runat="server" data-cvecliente='<%# DataBinder.Eval(Container.DataItem, "CveCliente") %>' />
|
||||
<%-- <%# string.Format("<a class=\"btn btn-primary\" onclick=\"enviarDocto({0})\">Enviar</a>",DataBinder.Eval(Container.DataItem, "CveCliente"),anio,mes) %>--%>
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
@@ -159,163 +170,519 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<div id="ModalDoctosxmlpdf" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Agregar documentos XML PDF Timbrados.</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="Upxmlpdf" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
Los documentos cargados serán relacionados en el periodo:
|
||||
<asp:Literal runat="server" ID="LtlPeriodoXMLPDF"></asp:Literal>
|
||||
</div>
|
||||
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-download font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Paso 1: Procesar 'ZIP'</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkCargarZip" CssClass="btn btn-success" OnClick="LnkCargarZip_Click" runat="server">Procesar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding ">
|
||||
<div>
|
||||
<asp:TextBox ID="Anexoxmlpdf" CssClass="ADSdropzone hidden" data-maxfilesize ="500" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-download font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Paso 2: Guardar</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding " style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-sm-offset-3">
|
||||
<div class="dashboard-stat red-intense">
|
||||
<div class="visual"><i class="fa fa-bar-chart-o"></i></div>
|
||||
<div class="details">
|
||||
<div class="number">Documentos</div>
|
||||
<div class="desc">
|
||||
<label class="indicadortipo4 col-md-6 tooltips" data-original-title="">
|
||||
<asp:Literal ID="LtlNoDoctos" runat="server"></asp:Literal></label>
|
||||
<label class="indicadortipo4 col-md-6 tooltips" data-original-title=""></label>
|
||||
<label class="indicadortipo4 col-md-6 tooltips" data-original-title="XML">
|
||||
<asp:Literal ID="LtlNoXml" runat="server"></asp:Literal></label>
|
||||
<label class="indicadortipo4 col-md-6 tooltips" data-original-title="PDF">
|
||||
<asp:Literal ID="LtlNoPDF" runat="server"></asp:Literal></label>
|
||||
</div>
|
||||
</div>
|
||||
<a class="more" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" tabindex="0">Ver Más <i class="m-icon-swapright m-icon-white"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<%--<asp:Button ID="BtnAddClienteDocumentoxmlpd" UseSubmitBehavior="false" OnClick="BtnAddClienteDocumentoxmlpd_Click" runat="server" Text="Guardar" CssClass="btn btn-primary" />--%>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="portlet light smmallpadding bordered procesardiv">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-download font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Historial de envio</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ModalDoctos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="portlet-body rowpadding ">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Agregar documento</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalDoctos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
Los documentos cargados serán relacionados en el periodo:
|
||||
<asp:Literal runat="server" ID="LtlPeriodo"></asp:Literal>
|
||||
</div>
|
||||
<asp:GridView ID="GvHistorialGral" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
|
||||
ShowHeaderWhenEmpty="true" EmptyDataText="No se ha enviado documentos"
|
||||
DataKeyNames="Noarchivos,FechaIng,Usuario">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha ">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaIng" runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy hh}:{0:mm}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Noarchivos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblnoarchivos" runat="server" Text='<%# Eval("Noarchivos")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblusuario" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
<span class="doctitulo"></span>
|
||||
<asp:TextBox ID="TxtcveCliente" CssClass="hidden TxtcveCliente" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtcveDocumentacion" CssClass="hidden TxtcveDocumentacion" runat="server"></asp:TextBox>
|
||||
Tipo documento
|
||||
<asp:DropDownList ID="DdlDocumentacion" DataValueField="CveDocumentacion" DataTextField="Documentacion" Width="100%" runat="server" CssClass="form-control select2me"></asp:DropDownList>
|
||||
<div>
|
||||
<br />
|
||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnAddClienteDocumento" UseSubmitBehavior="false" OnClick="BtnAddClienteDocumento_Click" runat="server" Text="Guardar" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:TextBox ID="TxtcveClienteCorreo" CssClass="hidden TxtcveClienteCorreo" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnEnviarDoctos" UseSubmitBehavior="false" OnClick="BtnEnviarDoctos_Click" runat="server" Text="Enviar" CssClass="btn btn-primary hidden BtnEnviarDoctos" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="ModalDoctosxmlpdf" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog modal-lg">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Agregar documentos XML PDF Timbrados.</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="Upxmlpdf" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
Los documentos cargados serán relacionados en el periodo:
|
||||
<asp:Literal runat="server" ID="LtlPeriodoXMLPDF"></asp:Literal>
|
||||
</div>
|
||||
<div class="portlet light smmallpadding bordered procesardiv">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-download font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Paso 1: Procesar 'ZIP'</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkCargarZip" CssClass="btn btn-success" OnClick="LnkCargarZip_Click" runat="server">Procesar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding ">
|
||||
<div>
|
||||
<asp:TextBox ID="Anexoxmlpdf" CssClass="ADSdropzone hidden" data-maxfilesize="500" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light smmallpadding bordered guardardiv">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-download font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Paso 2: Guardar</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkProcesarDoctos" CssClass="btn btn-success" OnClick="LnkProcesarDoctos_Click" runat="server">Guardar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding" style="display: none">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-sm-offset-4">
|
||||
<div class="dashboard-stat red-intense">
|
||||
<div class="visual"><i class="fa fa-bar-chart-o"></i></div>
|
||||
<div class="details">
|
||||
<div class="number">Documentos</div>
|
||||
<div class="desc">
|
||||
<label class="indicadortipo4 col-md-6 tooltips" data-original-title="XML">
|
||||
<asp:Literal ID="LtlNoXml" runat="server"></asp:Literal></label>
|
||||
<label class="indicadortipo4 col-md-6 tooltips" data-original-title="PDF">
|
||||
<asp:Literal ID="LtlNoPDF" runat="server"></asp:Literal></label>
|
||||
<label class="indicadortipo4 col-md-6 tooltips" data-original-title="Todos">
|
||||
<asp:Literal ID="LtlNoDoctos" runat="server"></asp:Literal></label>
|
||||
<label class="indicadortipo4 col-md-6 tooltips" data-original-title="Otros">
|
||||
<asp:Literal ID="LtlOtrosDoctos" runat="server"></asp:Literal></label>
|
||||
</div>
|
||||
</div>
|
||||
<a class="more" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" tabindex="0">Ver Más <i class="m-icon-swapright m-icon-white"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<asp:Panel runat="server" ID="pnlinconsistencias" Visible="false" CssClass="alert alert-warning" Style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>Se encontraron inconsistencias en los documentos cargados, solo se guardaran los archivos sin inconsistencias.
|
||||
</asp:Panel>
|
||||
<ajax:TabContainer ID="Tabsmodal" runat="server" Width="100%" AutoPostBack="True">
|
||||
<ajax:TabPanel ID="TabDoctos" runat="server" HeaderText="Documentos">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GVmaterialidadDoctos" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD" AutoGenerateColumns="False" OnRowDataBound="GVmaterialidadDoctos_RowDataBound"
|
||||
DataKeyNames="FolioFiscal,nofiles,archivoXML,archivoPDF,Receptor,RfcReceptor,Emisor,RfcEmisor,SubTotal,Descuento,Total,Serie,Folio,Fecha,FechaPago,FechaInicio,FechaFin,TotalPercepciones,TotalDeducciones,NumDiasPagados,CURP,NSS,TN,NDP,TP,Periodo,PeriodoOk,CvePersonal,CvePeriodo,CveNomina"
|
||||
data-height="250">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio Fiscal">
|
||||
<ItemTemplate>
|
||||
<asp:Label CssClass="spanfoliofiscal" runat="server" Text='<%# Eval("FolioFiscal")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Doctos">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("nofiles")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="XML">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("archivoXML").ToString().Length>0?"Si":"No" %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="PDF">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("archivoPDF").ToString().Length>0?"Si":"No" %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Empleado">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Receptor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="RFC">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("RfcReceptor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="CURP">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CURP")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="NSS">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("NSS")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Emisor">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Emisor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Neto">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Total","{0:N2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Periodo">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("PeriodoText")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>
|
||||
Fecha<br />inicio
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>
|
||||
Fecha<br />fin
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>
|
||||
Fecha<br />pago
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FechaPago","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<HeaderTemplate>
|
||||
Días<br />pago
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("NumDiasPagados")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="Tabperiodos" runat="server" HeaderText="Periodos sin registrar">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPeriodo" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD" AutoGenerateColumns="False"
|
||||
DataKeyNames="FechaInicio,FechaFin,TN,TP" data-height="250">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha Inicio">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Fin">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabPersonal" runat="server" HeaderText="Personal sin registrar">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvPersonal" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePersonal,Receptor,CURP,NombreCompleto,Codigo" data-height="250">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Empleado">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblreceptor" runat="server" Text='<%# Eval("Receptor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="CURP">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblcURP" runat="server" Text='<%# Eval("CURP")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabConceptos" runat="server" HeaderText="Conceptos sin registrar" Visible="false">
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<%--<asp:Button ID="BtnAddClienteDocumentoxmlpd" UseSubmitBehavior="false" OnClick="BtnAddClienteDocumentoxmlpd_Click" runat="server" Text="Guardar" CssClass="btn btn-primary" />--%>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ModalDoctos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Agregar documento</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalDoctos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
Los documentos cargados serán relacionados en el periodo:
|
||||
<asp:Literal runat="server" ID="LtlPeriodo"></asp:Literal>
|
||||
</div>
|
||||
|
||||
Tipo documento
|
||||
<asp:DropDownList ID="DdlDocumentacion" DataValueField="CveDocumentacion" DataTextField="Documentacion" Width="100%" runat="server" CssClass="form-control select2me"></asp:DropDownList>
|
||||
<div>
|
||||
<br />
|
||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" Text="" runat="server"></asp:TextBox>
|
||||
Observaciones
|
||||
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="4" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnAddClienteDocumento" UseSubmitBehavior="false" OnClick="BtnAddClienteDocumento_Click" runat="server" Text="Guardar" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ModalShowDoctos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Documentos</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalshowdoctos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<span class="doctitulo"></span>
|
||||
<asp:TextBox ID="TxtcveCliente" CssClass="hidden TxtcveCliente" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtcveDocumentacion" CssClass="hidden TxtcveDocumentacion" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="btnshowdoc" UseSubmitBehavior="false" CssClass="hidden btnshowdoc" OnClick="btnshowdoc_Click" runat="server" Text="Button" />
|
||||
|
||||
<div class="portlet light smmallpadding bordered procesardiv">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-download font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Documentos</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding ">
|
||||
<asp:GridView ID="GVdocelect" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall mysmallbtn" AutoGenerateColumns="False"
|
||||
ShowHeaderWhenEmpty="true"
|
||||
EmptyDataText="No se encontraron documentos"
|
||||
DataKeyNames="CveDocumentacionElectronica,CveDocumentacion,Documentacion,DocumentacionFormato,Orden,Adjunto,CveDocumentacionTipo,Requerido,DocumentacionTipo,SCompleto,Estatus,Observacion,Fecha,FechaIng,FechaLimite,FechaVigencia,Usuario,DiasLimite,CveVenta,Observacion2,AplicaDiasLimite,AplicaFechaVencimiento,Modulo">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Documento">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Observacion2")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Observacion">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblobservacion" runat="server" Text='<%# Eval("Observacion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Archivo" ItemStyle-Width="50">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HypFile" onclick='<%# string.Format("downfile(\"{0}\",\"{1}\");",Eval("Adjunto"),Eval("Observacion2"))%>' CssClass="btn btn-circle btn-sm blue mysmallbtn" runat="server"><i class="fa fa-download"></i></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminardocto" OnClick="LnkEliminardocto_Click" CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='icon-trash'></i>" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el documento?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light smmallpadding bordered procesardiv">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-download font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Historial</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding ">
|
||||
|
||||
<asp:GridView ID="GVMaterialidadEnvios" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveMaterialidadEnvios,CveCliente,Periodo,Noarchivos,Observacion,FechaIng,CveUsuario,CveEmpresa">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha ">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblfechaIng" runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy hh}:{0:mm}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Noarchivos">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblnoarchivos" runat="server" Text='<%# Eval("Noarchivos")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Observacion">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblobservacion" runat="server" Text='<%# Eval("Observacion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblusuario" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:TextBox ID="TxtDoctoName" CssClass="hidden TxtDoctoName" runat="server"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCveDocumentacionElectronica" CssClass="hidden TxtCveDocumentacionElectronica" runat="server"></asp:TextBox>
|
||||
<asp:Button ID="BtnDocumentacionElectronica" UseSubmitBehavior="false" CssClass="hidden BtnDocumentacionElectronica" OnClick="BtnDocumentacionElectronica_Click" runat="server" Text="Button" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
var showhideprocesarguardar = 0;
|
||||
function openguardar() {
|
||||
if (showhideprocesarguardar == 1) {
|
||||
materialidadshowhide('.guardardiv', 1)
|
||||
materialidadshowhide('.procesardiv', 0)
|
||||
} else {
|
||||
materialidadshowhide('.guardardiv', 0)
|
||||
materialidadshowhide('.procesardiv', 1)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function EnviarCorreo() {
|
||||
let clientes = '';
|
||||
let coma = ''
|
||||
$('.Chkenviardocto').each(
|
||||
function () {
|
||||
if ($(this).find('input').is(':checked')) {
|
||||
clientes += coma + $(this).data("cvecliente");
|
||||
coma = ',';
|
||||
}
|
||||
}
|
||||
)
|
||||
$('.TxtClientescorreo').val(clientes);
|
||||
$('.Btnenviardocto').click();
|
||||
}
|
||||
function downfile(file, DoctoName) {
|
||||
|
||||
$('.TxtDoctoName').val(DoctoName);
|
||||
$('.TxtCveDocumentacionElectronica').val(file);
|
||||
$('.BtnDocumentacionElectronica').click();
|
||||
}
|
||||
function materialidadshowhide(porlet, showhide) {
|
||||
var collapseexpand = $(porlet + ' >.portlet-title .collapse,' + porlet + ' >.portlet-title .expand')
|
||||
collapseexpand.removeClass('collapse')
|
||||
collapseexpand.removeClass('expand')
|
||||
if (showhide == 1) {
|
||||
collapseexpand.addClass('collapse')
|
||||
$(porlet + ' >.portlet-body').show();
|
||||
} else {
|
||||
collapseexpand.addClass('expand')
|
||||
$(porlet + ' >.portlet-body').hide();
|
||||
}
|
||||
}
|
||||
function cargarDocto(cveCliente, cveDocumentacion, cliente, documentacion) {
|
||||
$('.TxtcveCliente').val(cveCliente)
|
||||
$('.TxtcveDocumentacion').val(cveDocumentacion)
|
||||
$('.TxtcveCliente').val(cveCliente);
|
||||
$('.TxtcveDocumentacion').val(cveDocumentacion);
|
||||
$('.doctitulo').html(cliente + ' - ' + documentacion);
|
||||
$('#ModalDoctos').modal()
|
||||
$('.btnshowdoc').click();
|
||||
|
||||
//
|
||||
}
|
||||
function enviarDocto(cveCliente) {
|
||||
$('.TxtcveClienteCorreo').val(cveCliente);
|
||||
$('.BtnEnviarDoctos').click();
|
||||
|
||||
}
|
||||
|
||||
function ADSBegin() {
|
||||
openguardar();
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -4,12 +4,16 @@ using System.Data;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using Extensiones;
|
||||
using iTextSharp.text.pdf;
|
||||
using iTextSharp.text.pdf.parser;
|
||||
|
||||
public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
{
|
||||
@@ -25,6 +29,27 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
get { return ViewState["mes"] != null ? ViewState["mes"].ToString().ToEntero() : 0; }
|
||||
set { ViewState["mes"] = value; }
|
||||
}
|
||||
|
||||
public string directorio
|
||||
{
|
||||
get { return ViewState["directorio"] != null ? ViewState["directorio"].ToString() : string.Empty; }
|
||||
set
|
||||
{
|
||||
if (ViewState["directorio"] != null && !string.IsNullOrEmpty(ViewState["directorio"].ToString()))
|
||||
{
|
||||
System.IO.Directory.Delete(ViewState["directorio"].ToString(), true);
|
||||
}
|
||||
ViewState["directorio"] = value;
|
||||
}
|
||||
}
|
||||
public string xmlobject
|
||||
{
|
||||
get { return ViewState["xmlobject"] != null ? ViewState["xmlobject"].ToString() : string.Empty; }
|
||||
set
|
||||
{
|
||||
ViewState["xmlobject"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -51,6 +76,7 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
upPaneldata.Update();
|
||||
}
|
||||
|
||||
protected void RptDatos_ItemDataBound(object sender, RepeaterItemEventArgs e)
|
||||
@@ -65,6 +91,35 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
|
||||
protected void BtnAddClienteDocumento_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<Archivo> litsarchivoxml = Anexo.getfiles().Archivos;
|
||||
int CveDocumentacion = DdlDocumentacion.SelectedValue.ToEntero();
|
||||
int CveDocumentacionElectronica = 0;
|
||||
string obs = TxtObservaciones.Text;
|
||||
string rutaempresa = string.Format("{0}\\materialidad\\", UsuarioActual.Empresa.Ruta);
|
||||
if (!System.IO.Directory.Exists(rutaempresa))
|
||||
{
|
||||
System.IO.Directory.CreateDirectory(rutaempresa);
|
||||
}
|
||||
foreach (Archivo arch in litsarchivoxml)
|
||||
{
|
||||
|
||||
DateTime fecha = string.Format("{0}-{1}-01", anio, mes).ToDateTime();
|
||||
using (ClsEdocumentacion edoc = new ClsEdocumentacion())
|
||||
{
|
||||
CveDocumentacionElectronica = edoc.DocumentacionElectronicaAdd(CveDocumentacion, -1, -1, -1, 1, obs, "", UsuarioActual.CveUsuario, fecha, fecha, Periodo: string.Format("{0}{1}", anio, mes).ToEntero());
|
||||
if (CveDocumentacionElectronica > 0)
|
||||
{
|
||||
|
||||
edoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, -1, 2, obs, string.Format("{0}.{1}", CveDocumentacionElectronica, arch.Extension.ToLower()), UsuarioActual.CveUsuario, fecha, fecha, arch.filenameO);
|
||||
System.IO.File.Move(arch.FileUrl, string.Format("{2}{0}.{1}", CveDocumentacionElectronica, arch.Extension.ToLower(), rutaempresa));
|
||||
Alert("los registros se guardaron correctamente");
|
||||
cargadatos();
|
||||
RegistraScript("$('#ModalDoctos').modal('hide');");
|
||||
Anexo.Text = "[]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -78,10 +133,6 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
cargadatos();
|
||||
}
|
||||
|
||||
protected void BtnAddClienteDocumentoxmlpd_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void LckOpModalDoctos_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -95,21 +146,32 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
{
|
||||
DateTime fecha = string.Format("{0}-{1}-01", anio, mes).ToDateTime();
|
||||
LtlPeriodoXMLPDF.Text = fecha.ToString("MMMM yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("es-MX"));
|
||||
RegistraScript("$('#ModalDoctosxmlpdf').modal();");
|
||||
RegistraScript("$('#ModalDoctosxmlpdf').modal();showhideprocesarguardar =0; openguardar();");
|
||||
Upxmlpdf.Update();
|
||||
}
|
||||
|
||||
protected void LnkCargarZip_Click(object sender, EventArgs e)
|
||||
{
|
||||
string xmlobject = null;
|
||||
List<Archivo> litsarchivoxml = Anexoxmlpdf.getfiles().Archivos;
|
||||
if (litsarchivoxml.Count > 0)
|
||||
{
|
||||
Archivo archivoxml = litsarchivoxml[0];
|
||||
if (archivoxml.Extension.ToLower() == "zip")
|
||||
{
|
||||
xmlobject = null;
|
||||
string text;
|
||||
string[] lines;
|
||||
string[] splitword;
|
||||
List<string> fechas = new List<string>();
|
||||
string foliofiscal = string.Empty;
|
||||
string CURP = string.Empty;
|
||||
directorio = string.Empty;
|
||||
char[] delimiterChars = { ' ', ',', '.', ':', '\t' };
|
||||
Regex rgxfecha = new Regex(@"^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[13-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$");
|
||||
Regex rgxcurp = new Regex("^(([A-ZÑ&]{4})([0-9]{2})([0][13578]|[1][02])(([0][1-9]|[12][\\d])|[3][01])([A-Z0-9]{3}))|(([A-ZÑ&]{4})([0-9]{2})([0][13456789]|[1][012])(([0][1-9]|[12][\\d])|[3][0])([A-Z0-9]{3}))|(([A-ZÑ&]{4})([02468][048]|[13579][26])[0][2]([0][1-9]|[12][\\d])([A-Z0-9]{3}))|(([A-ZÑ&]{4})([0-9]{2})[0][2]([0][1-9]|[1][0-9]|[2][0-8])([A-Z0-9]{3}))$");
|
||||
|
||||
string directorio = archivoxml.FileUrl.Substring(0, archivoxml.FileUrl.Length - 4);
|
||||
|
||||
directorio = archivoxml.FileUrl.Substring(0, archivoxml.FileUrl.Length - 4);
|
||||
System.IO.Directory.CreateDirectory(directorio);
|
||||
ZipFile.ExtractToDirectory(archivoxml.FileUrl, directorio);
|
||||
|
||||
@@ -117,13 +179,14 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
XElement xfolder = new XElement("folder");
|
||||
foreach (var urfile in System.IO.Directory.GetFiles(directorio, "*", SearchOption.AllDirectories))
|
||||
{
|
||||
XElement xfile = new XElement("archivo", urfile);
|
||||
XElement xfile = new XElement("archivo");
|
||||
xfile.SetAttributeValue("URL", urfile);
|
||||
xfile.SetAttributeValue("EXT", Path.GetExtension(urfile).ToLower());
|
||||
if (Path.GetExtension(urfile).ToLower() == ".xml")
|
||||
{
|
||||
var xmlobj = ADSistemaLibrary3.SatXml.XmlSatCFDI.readXML(urfile);
|
||||
|
||||
|
||||
xfile.SetAttributeValue("UUID", xmlobj.complemento.UUID);
|
||||
xfile.SetAttributeValue("Receptor", xmlobj.receptor.Nombre);
|
||||
xfile.SetAttributeValue("RfcReceptor", xmlobj.receptor.Rfc);
|
||||
xfile.SetAttributeValue("RfcEmisor", xmlobj.emisor.Rfc);
|
||||
@@ -131,6 +194,9 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
xfile.SetAttributeValue("SubTotal", xmlobj.comprobante.SubTotal);
|
||||
xfile.SetAttributeValue("Descuento", xmlobj.comprobante.Descuento);
|
||||
xfile.SetAttributeValue("Total", xmlobj.comprobante.Total);
|
||||
xfile.SetAttributeValue("Serie", xmlobj.comprobante.Serie);
|
||||
xfile.SetAttributeValue("Folio", xmlobj.comprobante.Folio);
|
||||
xfile.SetAttributeValue("Fecha", xmlobj.comprobante.Fecha);
|
||||
|
||||
|
||||
xfile.SetAttributeValue("FechaPago", xmlobj.complemento.nomina12.FechaPago);
|
||||
@@ -140,9 +206,113 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
xfile.SetAttributeValue("TotalPercepciones", xmlobj.complemento.nomina12.TotalPercepciones);
|
||||
xfile.SetAttributeValue("TotalDeducciones", xmlobj.complemento.nomina12.TotalDeducciones);
|
||||
xfile.SetAttributeValue("CURP", xmlobj.complemento.nomina12.Receptor.CURP);
|
||||
xfile.SetAttributeValue("NSS", xmlobj.complemento.nomina12.Receptor.NSS);
|
||||
xfile.SetAttributeValue("TN", xmlobj.complemento.nomina12.TipoNomina);
|
||||
xfile.SetAttributeValue("NDP", xmlobj.complemento.nomina12.NumDiasPagados);
|
||||
xfile.SetAttributeValue("TP", xmlobj.complemento.nomina12.Receptor.TipoPeriodo);
|
||||
foreach (var con in xmlobj.complemento.nomina12.Percepciones)
|
||||
{
|
||||
XElement concepto = new XElement("con");
|
||||
concepto.SetAttributeValue("TCon", "P");
|
||||
concepto.SetAttributeValue("SV", "0");
|
||||
concepto.SetAttributeValue("Tipo", con.TipoPercepcion);
|
||||
concepto.SetAttributeValue("Clave", con.Clave);
|
||||
concepto.SetAttributeValue("Concepto", con.Concepto);
|
||||
concepto.SetAttributeValue("Importe", con.ImporteGravado + con.ImporteExento);
|
||||
concepto.SetAttributeValue("ImporteG", con.ImporteGravado);
|
||||
concepto.SetAttributeValue("ImporteE", con.ImporteExento);
|
||||
xfile.Add(concepto);
|
||||
}
|
||||
foreach (var con in xmlobj.complemento.nomina12.OtrosPagos)
|
||||
{
|
||||
XElement concepto = new XElement("con");
|
||||
concepto.SetAttributeValue("TCon", "D");
|
||||
concepto.SetAttributeValue("SV", "0");
|
||||
concepto.SetAttributeValue("Tipo", con.TipoOtroPago);
|
||||
concepto.SetAttributeValue("Clave", con.Clave);
|
||||
concepto.SetAttributeValue("Concepto", con.Concepto);
|
||||
concepto.SetAttributeValue("Importe", -con.Importe);
|
||||
concepto.SetAttributeValue("ImporteG", -con.Importe);
|
||||
concepto.SetAttributeValue("ImporteE", 0);
|
||||
xfile.Add(concepto);
|
||||
}
|
||||
foreach (var con in xmlobj.complemento.nomina12.Deducciones)
|
||||
{
|
||||
if (con.TipoDeduccion == "-001-") { }
|
||||
else
|
||||
{
|
||||
XElement concepto = new XElement("con");
|
||||
concepto.SetAttributeValue("TCon", "D");
|
||||
if (con.TipoDeduccion == "-000-")
|
||||
{
|
||||
concepto.SetAttributeValue("SV", "1");
|
||||
concepto.SetAttributeValue("Tipo", "000");
|
||||
}
|
||||
else
|
||||
{
|
||||
concepto.SetAttributeValue("SV", "0");
|
||||
concepto.SetAttributeValue("Tipo", con.TipoDeduccion);
|
||||
}
|
||||
concepto.SetAttributeValue("Clave", con.Clave);
|
||||
concepto.SetAttributeValue("Concepto", con.Concepto);
|
||||
concepto.SetAttributeValue("Importe", con.Importe);
|
||||
concepto.SetAttributeValue("ImporteG", con.Importe);
|
||||
concepto.SetAttributeValue("ImporteE", 0);
|
||||
xfile.Add(concepto);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (Path.GetExtension(urfile).ToLower() == ".pdf")
|
||||
{
|
||||
try
|
||||
{
|
||||
PdfReader reader = new PdfReader(urfile);
|
||||
|
||||
text = PdfTextExtractor.GetTextFromPage(reader, 1, new LocationTextExtractionStrategy());
|
||||
foliofiscal = string.Empty;
|
||||
CURP = string.Empty;
|
||||
fechas.RemoveAll(z => true);
|
||||
lines = text.Split('\n');
|
||||
foreach (string linea in lines)
|
||||
{
|
||||
foreach (string word in Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(linea)).Split(delimiterChars))
|
||||
{
|
||||
if (word.Length == 36 && (splitword = word.Split('-')).Length == 5 &&
|
||||
splitword[0].Length == 8 && splitword[1].Length == 4 && splitword[2].Length == 4 &&
|
||||
splitword[3].Length == 4 && splitword[4].Length == 12)
|
||||
{
|
||||
foliofiscal = word;
|
||||
}
|
||||
if (rgxcurp.IsMatch(word))
|
||||
{
|
||||
CURP = word;
|
||||
}
|
||||
if (rgxfecha.IsMatch(word))
|
||||
{
|
||||
fechas.Add(word);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
reader.Close();
|
||||
}
|
||||
catch (Exception) { }
|
||||
if (fechas.Count > 2)
|
||||
{
|
||||
|
||||
xfile.SetAttributeValue("FechaInicio", fechas[2].ToDateTime().ToString("yyyy-MM-dd"));
|
||||
}
|
||||
if (fechas.Count > 3)
|
||||
{
|
||||
|
||||
xfile.SetAttributeValue("FechaFin", fechas[3].ToDateTime().ToString("yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
xfile.SetAttributeValue("CURP", CURP);
|
||||
xfile.SetAttributeValue("UUID", foliofiscal);
|
||||
}
|
||||
|
||||
|
||||
@@ -150,24 +320,223 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
}
|
||||
xmlarchivos.Add(xfolder);
|
||||
xmlobject = xmlarchivos.ToString();
|
||||
//System.IO.StreamWriter archivoW = null;
|
||||
//try { archivoW = new System.IO.StreamWriter(string.Format("{0}xml.txt", directorio), true, System.Text.Encoding.UTF8); } catch (Exception) { }
|
||||
//if (archivoW != null)
|
||||
//{
|
||||
// try { archivoW.WriteLine(xmlobject); } catch (Exception) { }
|
||||
// try
|
||||
// {
|
||||
// archivoW.Close();
|
||||
// archivoW.Dispose();
|
||||
// }
|
||||
// catch (Exception) { }
|
||||
//}
|
||||
|
||||
}
|
||||
foreach (Archivo obj in litsarchivoxml)
|
||||
{
|
||||
System.IO.File.Delete(obj.FileUrl);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(xmlobject))
|
||||
{
|
||||
procesararchivo(xmlobject, string.Format("{0}{1}", anio, mes).ToEntero());
|
||||
}
|
||||
Anexoxmlpdf.Text = "[]";
|
||||
RegistraScript("showhideprocesarguardar =1; openguardar();");
|
||||
Upxmlpdf.Update();
|
||||
//RegistraScript("$('#ModalDoctosxmlpdf').modal();");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public void procesararchivo(string xmlobject,int periodo, bool guardarInformacion =false)
|
||||
{
|
||||
|
||||
using (ClsEdocumentacion edoc = new ClsEdocumentacion())
|
||||
{
|
||||
if (edoc.materialidadDoctos(xmlobject,UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, periodo, guardarInformacion))
|
||||
{
|
||||
if (edoc.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow row = edoc.DtResultados.Rows[0];
|
||||
LtlNoDoctos.Text = row["AllFiles"].ToString().ToEntero().ToString("N0");
|
||||
LtlOtrosDoctos.Text = row["OTROSFiles"].ToString().ToEntero().ToString("N0");
|
||||
LtlNoXml.Text = row["XMLFiles"].ToString().ToEntero().ToString("N0");
|
||||
LtlNoPDF.Text = row["PDFFiles"].ToString().ToEntero().ToString("N0");
|
||||
|
||||
}
|
||||
pnlinconsistencias.Visible = (edoc.DSResultados.Tables[2].FiltraParametros("CvePersonal IS NULL OR CvePeriodo IS NULL OR PeriodoOk =0").Rows.Count > 0);
|
||||
if (edoc.DSResultados.Tables.Count > 2)
|
||||
{
|
||||
GVmaterialidadDoctos.DataSource = edoc.DSResultados.Tables[2];
|
||||
GVmaterialidadDoctos.DataBind();
|
||||
}
|
||||
if (edoc.DSResultados.Tables.Count > 3)
|
||||
{
|
||||
GvPersonal.DataSource = edoc.DSResultados.Tables[3].FiltraParametros("CvePersonal IS NULL");
|
||||
GvPersonal.DataBind();
|
||||
}
|
||||
if (edoc.DSResultados.Tables.Count > 4)
|
||||
{
|
||||
GvPeriodo.DataSource = edoc.DSResultados.Tables[4].FiltraParametros("CvePeriodo IS NULL");
|
||||
GvPeriodo.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkProcesarDoctos_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
protected void GVmaterialidadDoctos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
string toolTip = "";
|
||||
int PeriodoOk = e.Row.DataKey("PeriodoOk").ToEntero();
|
||||
int cvePersonal = e.Row.DataKey("CvePersonal").ToEntero();
|
||||
int CvePeriodo = e.Row.DataKey("CvePeriodo").ToEntero();
|
||||
int CveNomina = e.Row.DataKey("CveNomina").ToEntero();
|
||||
if (CveNomina > 0)
|
||||
{
|
||||
e.Row.CssClass = "info";
|
||||
toolTip = string.Format("{0}{1}Nomina registrada.", toolTip, (toolTip.Length > 0 ? " " : ""));
|
||||
}
|
||||
if (PeriodoOk <= 0)
|
||||
{
|
||||
e.Row.CssClass = "warning";
|
||||
toolTip = string.Format("{0}{1}Esta nomina no pertenece a este periodo", toolTip, (toolTip.Length > 0 ? " " : ""));
|
||||
}
|
||||
if (cvePersonal <= 0)
|
||||
{
|
||||
e.Row.CssClass = "danger";
|
||||
toolTip = string.Format("{0}{1}No se encontro el personal", toolTip, (toolTip.Length > 0 ? " " : ""));
|
||||
}
|
||||
if (CvePeriodo <= 0)
|
||||
{
|
||||
e.Row.CssClass = "danger";
|
||||
toolTip = string.Format("{0}{1}No se encontro el periodo", toolTip, (toolTip.Length > 0 ? " " : ""));
|
||||
}
|
||||
|
||||
e.Row.ToolTip = toolTip;
|
||||
}
|
||||
}
|
||||
protected void btnshowdoc_Click(object sender, EventArgs e)
|
||||
{
|
||||
GVdocelect.DataSource = new DataTable();
|
||||
GVMaterialidadEnvios.DataSource = new DataTable();
|
||||
using (ClsEdocumentacion edoc = new ClsEdocumentacion())
|
||||
{
|
||||
if (edoc.DocumentacionElectronicaGet(-1, -1, -1, UsuarioActual.CveEmpresa, -1, -1, -2, string.Format("{0}{1}", anio, mes).ToEntero()))
|
||||
{
|
||||
GVdocelect.DataSource = edoc.DtResultados.FiltraParametros(string.Format("CveDocumentacion ={0}", TxtcveDocumentacion.Text.ToEntero()));
|
||||
}
|
||||
if (edoc.Edoc_MaterialidadEnviosGet(-1, TxtcveCliente.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
|
||||
GVMaterialidadEnvios.DataSource = edoc.DtResultados;
|
||||
}
|
||||
|
||||
}
|
||||
foreach (Archivo obj in litsarchivoxml)
|
||||
{
|
||||
System.IO.File.Delete(obj.FileUrl);
|
||||
}
|
||||
RegistraScript("$('#ModalDoctosxmlpdf').modal();");
|
||||
GVMaterialidadEnvios.DataBind();
|
||||
GVdocelect.DataBind();
|
||||
RegistraScript("$('#ModalShowDoctos').modal()");
|
||||
}
|
||||
|
||||
protected void LnkEliminardocto_Click(object sender, EventArgs e)
|
||||
{
|
||||
int CveDocumentacionElectronica = ((GridViewRow)((LinkButton)sender).NamingContainer).DataKey("CveDocumentacionElectronica").ToEntero();
|
||||
string Adjunto = ((GridViewRow)((LinkButton)sender).NamingContainer).DataKey("Adjunto");
|
||||
using (ClsEdocumentacion edoc = new ClsEdocumentacion())
|
||||
{
|
||||
if (edoc.DocumentacionElectronicaRemove(CveDocumentacionElectronica, -1))
|
||||
{
|
||||
string ruta = string.Format("{0}\\materialidad\\{1}", UsuarioActual.Empresa.Ruta, Adjunto);
|
||||
if (System.IO.File.Exists(ruta))
|
||||
{
|
||||
try
|
||||
{
|
||||
System.IO.File.Delete(ruta);
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
if (edoc.DocumentacionElectronicaGet(-1, -1, -1, UsuarioActual.CveEmpresa, -1, -1, -2, string.Format("{0}{1}", anio, mes).ToEntero()))
|
||||
{
|
||||
GVdocelect.DataSource = edoc.DtResultados.FiltraParametros(string.Format("CveDocumentacion ={0}", TxtcveDocumentacion.Text.ToEntero()));
|
||||
GVdocelect.DataBind();
|
||||
}
|
||||
Alert("El documento se a eliminado");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void BtnDocumentacionElectronica_Click(object sender, EventArgs e)
|
||||
{
|
||||
String Adjunto = TxtCveDocumentacionElectronica.Text;
|
||||
string ruta = string.Format("{0}\\materialidad\\{1}", UsuarioActual.Empresa.Ruta, Adjunto);
|
||||
using (ClsEdocumentacion edoc = new ClsEdocumentacion())
|
||||
{
|
||||
if (System.IO.File.Exists(ruta))
|
||||
{
|
||||
|
||||
|
||||
System.IO.FileInfo file = new System.IO.FileInfo(ruta);
|
||||
string mimeType = "text/plain";
|
||||
try
|
||||
{
|
||||
mimeType = MimeMapping.GetMimeMapping(ruta);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
// Response.Write(path)
|
||||
Response.Clear();
|
||||
Response.ClearHeaders();
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(TxtDoctoName.Text)}");
|
||||
Response.AddHeader("Content-Length", file.Length.ToString());
|
||||
Response.ContentType = mimeType;
|
||||
Response.Flush();
|
||||
Response.TransmitFile(file.FullName);
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("no se encontro el documento.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void Btnenviardocto_Click(object sender, EventArgs e)
|
||||
{
|
||||
int periodo = string.Format("{0}{1}", anio, mes).ToEntero();
|
||||
DataTable dtdoctos = null;
|
||||
DataTable dtdocs = null;
|
||||
string CorreoCumplimiento = string.Empty;
|
||||
using (ClsEdocumentacion edoc = new ClsEdocumentacion())
|
||||
{
|
||||
if (edoc.TableroMaterialidadGET(UsuarioActual.CveEmpresa, anio, mes) && edoc.DSResultados.Tables.Count > 1)
|
||||
{
|
||||
dtdoctos = edoc.DSResultados.Tables[0];
|
||||
}
|
||||
if (edoc.DocumentacionElectronicaGet(-1, -1, -1, UsuarioActual.CveEmpresa, -1, -1, -2, periodo))
|
||||
{
|
||||
dtdocs = edoc.DtResultados.FiltraParametros(string.Format("CveDocumentacionElectronica>0"));
|
||||
}
|
||||
DataRow row = null;
|
||||
foreach (string item in TxtClientescorreo.Text.Split(','))
|
||||
{
|
||||
if (item.ToEntero() > 0 && dtdoctos != null && (row = dtdoctos.FiltroPrimero(string.Format("CveCliente ={0}", item))) != null && dtdocs != null && dtdocs.Rows.Count > 0 && !string.IsNullOrEmpty(CorreoCumplimiento = row["CorreoCumplimiento"].ToString()))
|
||||
{
|
||||
edoc.Edoc_MaterialidadEnviosAdd(item.ToEntero(), periodo, dtdocs.Rows.Count, "Envio", CorreoCumplimiento, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
}
|
||||
}
|
||||
}
|
||||
Alert("El correo se ha enviado.");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
public class archivoxmlpdf
|
||||
{
|
||||
@@ -196,8 +565,6 @@ public class archivoxmlpdf
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace ADSistemaLibrary3.SatXml
|
||||
{
|
||||
public class XmlSatCFDI
|
||||
@@ -515,17 +882,18 @@ namespace ADSistemaLibrary3.SatXml
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.Replace("cfdi:", "") == keyComplemento)
|
||||
{
|
||||
int cDepth = xtr.Depth;
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
while (canread && xtr.Depth > cDepth)
|
||||
bool enterdept = true;
|
||||
bool noavance = true;
|
||||
xmlCFDI.complemento.nomina12 = new CFDINomina();
|
||||
while (canread && (xtr.Depth > cDepth || enterdept))
|
||||
{
|
||||
enterdept = false;
|
||||
if (noavance)
|
||||
{
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
}
|
||||
noavance = true;
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName == "TimbreFiscalDigital" && xmlCFDI.comprobante.Version != null)
|
||||
{
|
||||
xmlCFDI.complemento.xmlns_tfd = xtr.GetAttribute("xmlns:tfd");
|
||||
@@ -539,13 +907,10 @@ namespace ADSistemaLibrary3.SatXml
|
||||
xmlCFDI.complemento.SelloSAT = xmlCFDI.comprobante.Version == "3.3" ? xtr.GetAttribute("SelloSAT") : xtr.GetAttribute("selloSAT");
|
||||
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
noavance = false;
|
||||
}
|
||||
else if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName.ToUpper() == "NOMINA" && xmlCFDI.comprobante.Version != null)
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName.ToUpper() == "NOMINA" && xmlCFDI.comprobante.Version != null)
|
||||
{
|
||||
xmlCFDI.complemento.nomina12 = new CFDINomina();
|
||||
//Version="1.2" TipoNomina="E" FechaPago="2021-12-08"
|
||||
//="2021-12-08" ="2021-12-08"
|
||||
//="1" ="5026.31" ="254.34"
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
@@ -556,14 +921,150 @@ namespace ADSistemaLibrary3.SatXml
|
||||
case "FECHAFINALPAGO": xmlCFDI.complemento.nomina12.FechaFin = xtr.Value; break;
|
||||
case "NUMDIASPAGADOS": xmlCFDI.complemento.nomina12.NumDiasPagados = xtr.Value.ToEntero(); break;
|
||||
case "TIPONOMINA": xmlCFDI.complemento.nomina12.TipoNomina = xtr.Value; break;
|
||||
case "Version": xmlCFDI.complemento.nomina12.Version = xtr.Value; break;
|
||||
case "VERSION": xmlCFDI.complemento.nomina12.Version = xtr.Value; break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
xtr.MoveToFirstAttribute();
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
noavance = false;
|
||||
}
|
||||
else if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName == "Pagos" && xmlCFDI.comprobante.Version != null)
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.ToUpper() == "NOMINA12:RECEPTOR")
|
||||
{
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "CURP": xmlCFDI.complemento.nomina12.Receptor.CURP = xtr.Value; break;
|
||||
case "NUMSEGURIDADSOCIAL": xmlCFDI.complemento.nomina12.Receptor.NSS = xtr.Value; break;
|
||||
case "FECHAINICIORELLABORAL": xmlCFDI.complemento.nomina12.Receptor.FechaInicioContrato = xtr.Value; break;
|
||||
case "ANTIGÜEDAD": xmlCFDI.complemento.nomina12.Receptor.Antiguedad = xtr.Value; break;
|
||||
case "TIPOCONTRATO": xmlCFDI.complemento.nomina12.Receptor.TipoContrato = xtr.Value; break;
|
||||
case "NUMEMPLEADO": xmlCFDI.complemento.nomina12.Receptor.CodigoEmpleado = xtr.Value; break;
|
||||
case "DEPARTAMENTO": xmlCFDI.complemento.nomina12.Receptor.Departamento = xtr.Value; break;
|
||||
case "TIPOREGIMEN": xmlCFDI.complemento.nomina12.Receptor.CodigoRegimenContratacion = xtr.Value; break;
|
||||
case "SINDICALIZADO": xmlCFDI.complemento.nomina12.Receptor.Sindicalizado = xtr.Value; break;
|
||||
case "TIPOJORNADA": xmlCFDI.complemento.nomina12.Receptor.CodigoTipoJornada = xtr.Value; break;
|
||||
case "PUESTO": xmlCFDI.complemento.nomina12.Receptor.Puesto = xtr.Value; break;
|
||||
case "RIESGOPUESTO": xmlCFDI.complemento.nomina12.Receptor.CodigoRiesgoPuesto = xtr.Value; break;
|
||||
case "SALARIOBASECOTAPOR": xmlCFDI.complemento.nomina12.Receptor.SBC = xtr.Value.ToDouble(); break;
|
||||
case "SALARIODIARIOINTEGRADO": xmlCFDI.complemento.nomina12.Receptor.SDI = xtr.Value.ToDouble(); break;
|
||||
case "CLAVEENTFED": xmlCFDI.complemento.nomina12.Receptor.CodigoEntidadFederativa = xtr.Value; break;
|
||||
case "PERIODICIDADPAGO": xmlCFDI.complemento.nomina12.Receptor.TipoPeriodo = xtr.Value; break;
|
||||
case "CUENTABANCARIA": xmlCFDI.complemento.nomina12.Receptor.NumeroCuenta = xtr.Value; break;
|
||||
case "BANCO": xmlCFDI.complemento.nomina12.Receptor.CodigoBanco = xtr.Value; break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
xtr.MoveToFirstAttribute();
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
noavance = false;
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.ToUpper() == "NOMINA12:PERCEPCION")
|
||||
{
|
||||
if (xmlCFDI.complemento.nomina12.Percepciones == null)
|
||||
{
|
||||
xmlCFDI.complemento.nomina12.Percepciones = new List<CFDINominaPercepciones>();
|
||||
}
|
||||
CFDINominaPercepciones concepto = new CFDINominaPercepciones();
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "CLAVE": concepto.Clave = xtr.Value; break;
|
||||
case "TIPOPERCEPCION": concepto.TipoPercepcion = xtr.Value; break;
|
||||
case "IMPORTEGRAVADO": concepto.ImporteGravado = xtr.Value.ToDecimal(); break;
|
||||
case "IMPORTEEXENTO": concepto.ImporteExento = xtr.Value.ToDecimal(); break;
|
||||
case "CONCEPTO": concepto.Concepto = xtr.Value; break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
xmlCFDI.complemento.nomina12.Percepciones.Add(concepto);
|
||||
xtr.MoveToFirstAttribute();
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
noavance = false;
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.ToUpper() == "NOMINA12:DEDUCCION")
|
||||
{
|
||||
if (xmlCFDI.complemento.nomina12.Deducciones == null)
|
||||
{
|
||||
xmlCFDI.complemento.nomina12.Deducciones = new List<CFDINominaDeducciones>();
|
||||
}
|
||||
CFDINominaDeducciones concepto = new CFDINominaDeducciones();
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "CLAVE": concepto.Clave = xtr.Value; break;
|
||||
case "TIPODEDUCCION": concepto.TipoDeduccion = xtr.Value; break;
|
||||
case "IMPORTE": concepto.Importe = xtr.Value.ToDecimal(); break;
|
||||
case "CONCEPTO": concepto.Concepto = xtr.Value; break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
xmlCFDI.complemento.nomina12.Deducciones.Add(concepto);
|
||||
xtr.MoveToFirstAttribute();
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
noavance = false;
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.ToUpper() == "NOMINA12:OTROPAGO")
|
||||
{
|
||||
if (xmlCFDI.complemento.nomina12.OtrosPagos == null)
|
||||
{
|
||||
xmlCFDI.complemento.nomina12.OtrosPagos = new List<CFDINominaOtrosPagos>();
|
||||
}
|
||||
CFDINominaOtrosPagos concepto = new CFDINominaOtrosPagos();
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "CLAVE": concepto.Clave = xtr.Value; break;
|
||||
case "TIPOOTROPAGO": concepto.TipoOtroPago = xtr.Value; break;
|
||||
case "IMPORTE": concepto.Importe = xtr.Value.ToDecimal(); break;
|
||||
case "CONCEPTO": concepto.Concepto = xtr.Value; break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
xmlCFDI.complemento.nomina12.OtrosPagos.Add(concepto);
|
||||
xtr.MoveToFirstAttribute();
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
noavance = false;
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.Name.ToUpper() == "NOMINA12:SUBSIDIOALEMPLEO")
|
||||
{
|
||||
if (xmlCFDI.complemento.nomina12.Deducciones == null)
|
||||
{
|
||||
xmlCFDI.complemento.nomina12.Deducciones = new List<CFDINominaDeducciones>();
|
||||
}
|
||||
CFDINominaDeducciones concepto = new CFDINominaDeducciones();
|
||||
cont = xtr.MoveToFirstAttribute();
|
||||
while (cont)
|
||||
{
|
||||
concepto.TipoDeduccion = "-000-";
|
||||
concepto.Clave = "D025";
|
||||
concepto.Concepto = "Subsidio acreditable";
|
||||
switch (xtr.Name.ToUpper())
|
||||
{
|
||||
case "SubsidioCausado": concepto.Importe = -xtr.Value.ToDecimal(); break;
|
||||
}
|
||||
cont = xtr.MoveToNextAttribute();
|
||||
}
|
||||
CFDINominaDeducciones concepto2 = new CFDINominaDeducciones();
|
||||
concepto2.TipoDeduccion = "-001-";
|
||||
concepto2.Clave = concepto.Clave;
|
||||
concepto2.Concepto = concepto.Concepto;
|
||||
concepto2.Importe = -concepto.Importe;
|
||||
xmlCFDI.complemento.nomina12.Deducciones.Add(concepto2);
|
||||
xmlCFDI.complemento.nomina12.Deducciones.Add(concepto);
|
||||
xtr.MoveToFirstAttribute();
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
noavance = false;
|
||||
}
|
||||
if (xtr.NodeType == XmlNodeType.Element && xtr.LocalName.ToUpper() == "PAGOS" && xmlCFDI.comprobante.Version != null)
|
||||
{
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
xmlCFDI.complemento.Pagos = new CFDIPago();
|
||||
@@ -618,13 +1119,9 @@ namespace ADSistemaLibrary3.SatXml
|
||||
conts = xtr.MoveToFirstAttribute();
|
||||
xmlCFDI.complemento.Pagos.doctosRelacionados.Add(objpago);
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
noavance = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while ((canread = xtr.Read()) && xtr.NodeType != XmlNodeType.Element) { }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1179,8 +1676,4 @@ namespace ADSistemaLibrary3.SatXml
|
||||
public string UUID { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user